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