<div dir="ltr">It happens that Kamailio takes the first configured udp address (i believe unless forced, which for me didn't work).<div><br></div><div><br></div><div><br></div><div>If i have:</div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">listen=udp:<a href="http://10.10.0.209:5060">10.10.0.209:5060</a></font></div><div><font face="monospace, monospace">listen=udp:<a href="http://1.2.3.4:5060">1.2.3.4:5060</a></font></div><div><font face="monospace, monospace">listen=tcp:<a href="http://1.2.3.4:5060">1.2.3.4:5060</a></font></div><div><br></div><div>When <font face="monospace, monospace">$fs ="udp:<a href="http://1.2.3.4:5060">1.2.3.4:5060</a>" </font>it just takes the first udp socketm which is the 10.10.0.209.</div><div>but if i have:</div><div><br></div><div><div><font face="monospace, monospace">listen=udp:<a href="http://1.2.3.4:5060">1.2.3.4:5060</a><br></font></div><div><font face="monospace, monospace">listen=tcp:<a href="http://1.2.3.4:5060">1.2.3.4:5060</a></font></div><div><font face="monospace, monospace">listen=udp:<a href="http://10.10.0.209:5060">10.10.0.209:5060</a></font></div><br class="gmail-Apple-interchange-newline"></div><div>It takes the correct public socket.</div><div><br></div><div>I'm positive i'm doing it wrong, but this is my case.</div><div><br></div><div>I believe now i need to remove all cases of ";transport=tcp" ?</div><div><br></div><div><br></div><div>Thanks!</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 8, 2018 at 2:24 AM Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, that could be related. 😂<br>
<br>
--<br>
Sent from mobile. Apologies for brevity and errors. <br>
<br>
-----Original Message-----<br>
From: David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>><br>
To: "Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
Sent: Sun, 07 Oct 2018 9:22 PM<br>
Subject: Re: [SR-Users] force_send_socket<br>
<br>
I think this is related to the fact that the client is TCP and i'm trying<br>
to send to UDP.<br>
I just changed the client to UDP and the branch got sent properly from the<br>
public ip in udp...<br>
<br>
<br>
Regards,<br>
<br>
David Villasmil<br>
email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
phone: +34669448337<br>
<br>
<br>
On Mon, Oct 8, 2018 at 2:07 AM David Villasmil <<br>
<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br>
<br>
> Sorry, mispasted:<br>
><br>
> if (avp_db_load("$to", "$avp(office)")) {<br>
> if ( $avp(office)==1 ) {<br>
> xlog("L_ERR","[REQUEST_ROUTE]: [$rm] callid: $ci DAVID<br>
> Call from=$fU to=$tU is a Office USER ($avp(office)) - Appending branch\n");<br>
> append_branch("sip:$<a href="http://tU@1.2.3.4:5080" rel="noreferrer" target="_blank">tU@1.2.3.4:5080</a>");<br>
> $fs = 'udp:MY_PUBLIC_IP:5060';<br>
> }<br>
> }<br>
><br>
><br>
> Regards,<br>
><br>
> David Villasmil<br>
> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
> phone: +34669448337<br>
><br>
><br>
> On Mon, Oct 8, 2018 at 1:55 AM David Villasmil <<br>
> <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br>
><br>
>> Thanks for replying!<br>
>><br>
>> Yes I have<br>
>><br>
>> children=2<br>
>> listen=udp:<a href="http://10.10.0.209:5060" rel="noreferrer" target="_blank">10.10.0.209:5060</a><br>
>> listen=udp:MY_PUBLIC_IP:5060<br>
>><br>
>> tried:<br>
>><br>
>> # This will check if the TO user is a office user<br>
>> if (avp_db_load("$to", "$avp(gsmoffice")) {<br>
>> if ( $avp(office)==1 ) {<br>
>> xlog("L_ERR","[REQUEST_ROUTE]: [$rm] callid: $ci Call<br>
>> from=$fU to=$tU is a Office USER ($avp(office)) - Appending branch\n");<br>
>> #append_branch("sip:$<a href="http://tU@1.2.3.4:5060" rel="noreferrer" target="_blank">tU@1.2.3.4:5060</a>");<br>
>> $fs = 'udp:MY_PUBLIC_IP:5060';<br>
>> }<br>
>> }<br>
>><br>
>> But no INVITE is ever sent out... with force_send_socket it would only<br>
>> use the private...<br>
>><br>
>> Regards,<br>
>><br>
>> David Villasmil<br>
>> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> phone: +34669448337<br>
>><br>
>><br>
>> On Mon, Oct 8, 2018 at 1:31 AM Alex Balashov <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>><br>
>> wrote:<br>
>><br>
>>> Hi,<br>
>>><br>
>>> 1. force_send_socket() is essentially deprecated in favour of mutating<br>
>>> $fs:<br>
>>><br>
>>> $fs = 'udp:<a href="http://67.215.186.219:5060" rel="noreferrer" target="_blank">67.215.186.219:5060</a>';<br>
>>><br>
>>> 2. Do you have an exact matching[1] listener for this outgoing<br>
>>> interface?<br>
>>><br>
>>> [1] Transport, IP, port.<br>
>>><br>
>>> --<br>
>>> Alex Balashov | Principal | Evariste Systems LLC<br>
>>><br>
>>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
>>> Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
>>><br>
>>> _______________________________________________<br>
>>> Kamailio (SER) - Users Mailing List<br>
>>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>>><br>
>><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>