<div dir="ltr"><font color="#3366ff"><font><font face="tahoma,sans-serif">Thank you for your reply. I tried what you suggested.</font></font></font><div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div>
<div><font color="#3366ff"><font><font face="tahoma,sans-serif">The problem is when there are multiple locations/registrations per AOR on different ports and doing parallel forking.</font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">Accessing $fs only gives one of the sockets (first or last?), not all of them.</font></font></font></div>
<div><font color="#3366ff" face="tahoma, sans-serif">Accessing $sndfrom gives all of the used outgoing sockets, because it's populated in the onsedn_route route, which is called for every outgoing packet, but in onsend_route I can't use record_route functions, neither mangle with the SIP header anymore in any way. It's too late by the time I get to onsend_route...</font></div>
<div><font color="#3366ff" face="tahoma, sans-serif"><br></font></div><div><font color="#3366ff" face="tahoma, sans-serif">No solution so far..<br></font><div>
<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br clear="all"></font></font></font><div dir="ltr"><font color="#3366ff" face="tahoma, sans-serif"><br></font><div><font color="#3366ff" face="tahoma, sans-serif">Reda</font></div>
</div><br>
<br><br><div class="gmail_quote">On Tue, Jan 17, 2012 at 21:47, Ovidiu Sas <span dir="ltr"><<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When you route through usrloc, there is a PV that should be set - forced socket:<br>
<a href="http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#forced_socket" target="_blank">http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#forced_socket</a><br>
You can check the socket via 'kamctl ul show' command.<br>
If the PV is not populated, check the send attributes:<br>
<a href="http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#send_address_attributes" target="_blank">http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#send_address_attributes</a><br>
Based on that, you should know through which interface the INVITE<br>
should be sent and therefore you should be able to set the proper<br>
Record-Route header.<br>
<br>
Regards,<br>
<span><font color="#888888">Ovidiu Sas<br>
<br>
--<br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" target="_blank">http://www.voipembedded.com</a><br>
</font></span><div><div><br>
<br>
On Tue, Jan 17, 2012 at 3:01 PM, Reda Aouad <<a href="mailto:reda.aouad@gmail.com" target="_blank">reda.aouad@gmail.com</a>> wrote:<br>
> I just tried the record_route_advertised_address("public_ip").<br>
> It doesn't add the port number of the outgoing socket.<br>
><br>
> Any suggestions?<br>
><br>
> RA<br>
><br>
><br>
><br>
> On Mon, Jan 16, 2012 at 15:57, Reda Aouad <<a href="mailto:reda.aouad@gmail.com" target="_blank">reda.aouad@gmail.com</a>> wrote:<br>
>><br>
>> I know about record_route_advertised_address("ip:port") function. If I<br>
>> understood correctly, it inserts a top-most RR header with the public IP if<br>
>> double RR is enabled. But that doesn't solve the multiple ports problem. I<br>
>> would get in the SIP header :<br>
>><br>
>> Record-Route: <public_ip;lr=on><br>
>> Record-Route: <private_ip:port;lr=on><br>
>><br>
>> If user B sees the first Record-Route header, it remembers port=5060 for<br>
>> future requests.<br>
>> I cannot manually set the port in the config file since it depends on<br>
>> which port user B is registered, which I don't have a way to find it.<br>
>><br>
>> RA<br>
>><br>
>><br>
>><br>
>> On Mon, Jan 16, 2012 at 15:51, Andrew Pogrebennyk<br>
>> <<a href="mailto:apogrebennyk@sipwise.com" target="_blank">apogrebennyk@sipwise.com</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> On 01/16/2012 03:41 PM, Reda Aouad wrote:<br>
>>> > I suggest that the function record_route( ) takes a public IP address<br>
>>> > as<br>
>>> > a parameter, still doing what it does (correct record routing and<br>
>>> > cookie<br>
>>> > addition did=xxx and loose route lr=on), but only replacing the private<br>
>>> > IP address on which Kamailio listens with a public IP address. Or that<br>
>>> > the record_route( ) function uses the advertised_address to construct<br>
>>> > the RR header.<br>
>>><br>
>>> maybe you are looking for the function record_route_advertised_address()<br>
>>> which is available in git master:<br>
>>> <a href="http://web.archiveorange.com/archive/v/jZFTGE0yjPqCTTcAkzuf" target="_blank">http://web.archiveorange.com/archive/v/jZFTGE0yjPqCTTcAkzuf</a><br>
>>><br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div></div></div></div>