You actually have a loop - not actually a loop, but double processing or so. On loose_route() true branch, the route(2) has not "exit" neither at the end (of route 2 block), nor after the route(2) invocation -> your script will continue and probably does moe stuff which was not intended.
Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 05/24/2013 04:58 PM, [email protected] wrote: > Dear Bodgan, > This is what i am doing for ACK path (This is minus all the other crap > like auth, redis stuff). I dont think that there would be any loop here. > > > if (nat_uac_test("19")) { > if (is_method("REGISTER")) { > fix_nated_register(); > } else { > fix_nated_contact(); > }; > } > > force_rport(); > > if (loose_route()) { > if (loose_route()) { > # route it out to whatever destination was set by loose_route() > # in $du (destination URI). > route(2); > } > } else { > if ( is_method("ACK") ) { > if (t_check_trans()) { > t_relay(); > exit; > } else { > exit; > } > } > } > > route[2] { > if (is_direction("downstream")) { > xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Sequencial '$rm' request > from caller '$fU' for call from '$fu' to '$ru' \n"); > } else { > xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Sequencial '$rm' request > from callee '$fU' for call from '$ru' to '$fu' \n"); > }; > if(is_method("ACK")) { > $avp(pdd) = 0; > $avp(pdd) = $Ts - $(avp(pdd){s.int <http://s.int>}); > xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Post Dial Delay of Call-ID > '$ci' from '$fu' to '$ru' is '$avp(pdd)' at '$time(%F %T %Z)' \n"); > } > if (!t_relay()) { > sl_reply_error(); > } > } > > > > > > On Wed, May 22, 2013 at 10:01 PM, Bogdan-Andrei Iancu > <[email protected] <mailto:[email protected]>> wrote: > > No, it is not a retransmission as it is the same process and there > is no second set of logs for receiving a message from network: > > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > DBG:core:parse_msg: SIP Request: > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > DBG:core:parse_msg: method: <ACK> > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > DBG:core:parse_msg: uri: > > <sip:[email protected]:2374;transport=UDP;rinstance=77930ffd530697a7;nat=yes> > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > DBG:core:parse_msg: version: <SIP/2.0> > .... > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > DBG:core:receive_msg: preparing to run routing scripts... > ... > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > DBG:rr:after_loose: Topmost route URI: > 'sip:[email protected]:6000;lr;ftag=2e76e266;did=c7c.34372c92' > is me > ... > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > [udp:[email protected]:7085 > <mailto:udp:[email protected]:7085>]: Sequencial 'ACK' > request from caller '622......' for call from ....... > .... > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > DBG:rr:after_loose: Topmost route URI: > 'sip:[email protected]:6000;lr;ftag=2e76e266;did=c7c.34372c92' > is me > ... > May 20 11:34:52 jkt-svr-mvapp-2 rtsip-service[1411]: > [udp:[email protected]:7085 > <mailto:udp:[email protected]:7085>]: Sequencial 'ACK' > request from caller '622.....' for call from ........ > > > It is clearly a loop. > > Regards, > > Bogdan-Andrei Iancu > OpenSIPS Founder and Developer > http://www.opensips-solutions.com > > > On 05/22/2013 03:21 PM, [email protected] > <mailto:[email protected]> wrote: >> I think that is retransmission of ACK packet because it didn't >> get its 200 ok back. >> >> Regards, >> Qasim >> >> >> On Tue, May 21, 2013 at 10:08 PM, Bogdan-Andrei Iancu >> <[email protected] <mailto:[email protected]>> wrote: >> >> Hi Qasim, >> >> Looking at the ACK related logs, I see you get the script log >> Sequencial 'ACK' request from caller '622190004001' for >> call from ..... >> >> twice - also the logs from the loose_route() function - I >> suspect you loop somehow in your script and a route is >> triggered twice (the route doing loose_route) >> >> Regards, >> >> Bogdan-Andrei Iancu >> OpenSIPS Founder and Developer >> http://www.opensips-solutions.com >> >> >> On 05/20/2013 02:46 PM, [email protected] >> <mailto:[email protected]> wrote: >>> Hi Bodgan, >>> >>> Sorry for the late reply as i was traveling this weekend. >>> Please find attached call logs with debug mode 4. >>> >>> Regards, >>> Qasim >>> >>> >>> On Fri, May 17, 2013 at 8:50 PM, Bogdan-Andrei Iancu >>> <[email protected] <mailto:[email protected]>> wrote: >>> >>> Funny, as I do not see anything wrong on a first look - >>> while running in debug mode (4), please send me the logs >>> corresponding to the ACK processing. >>> >>> Regards, >>> >>> Bogdan-Andrei Iancu >>> OpenSIPS Founder and Developer >>> http://www.opensips-solutions.com >>> >>> >>> On 05/17/2013 02:34 PM, [email protected] >>> <mailto:[email protected]> wrote: >>>> Hi, >>>> >>>> Please find attached trace. This is server on Public IP >>>> that is why i cannot send the trace on the list. I am >>>> listening to IP's as follows >>>> >>>> listen=udp:202.152.203.195:5060 >>>> <http://202.152.203.195:5060> >>>> listen=udp:202.152.203.195:6000 >>>> <http://202.152.203.195:6000> >>>> listen=udp:192.168.226.142:5060 >>>> <http://192.168.226.142:5060> >>>> listen=udp:192.168.226.142:6000 >>>> <http://192.168.226.142:6000> >>>> >>>> disable_tcp=no >>>> listen=tcp:202.152.203.195:5060 >>>> <http://202.152.203.195:5060> >>>> listen=tcp:202.152.203.195:6000 >>>> <http://202.152.203.195:6000> >>>> listen=tcp:192.168.226.142:5060 >>>> <http://192.168.226.142:5060> >>>> listen=tcp:192.168.226.142:6000 >>>> <http://192.168.226.142:6000> >>>> >>>> If you need anything else i would be happy to provide >>>> it to you. >>>> >>>> Regards, >>>> Qasim >>>> >>>> >>>> >>>> On Fri, May 17, 2013 at 3:50 PM, Bogdan-Andrei Iancu >>>> <[email protected] <mailto:[email protected]>> wrote: >>>> >>>> Hello Qasim, >>>> >>>> So you have multiple interfaces in OpenSIPS - are >>>> all of them the same protocol ? >>>> >>>> Please try to post a SIP capture of the full call, >>>> to see how the RR part is done. >>>> >>>> Regards, >>>> >>>> Bogdan-Andrei Iancu >>>> OpenSIPS Founder and Developer >>>> http://www.opensips-solutions.com >>>> >>>> >>>> On 05/16/2013 01:07 PM, [email protected] >>>> <mailto:[email protected]> wrote: >>>>> On further investigation i see that i only face >>>>> this issue when both caller and callee are on the >>>>> same network. If both are on separate network it >>>>> works fine. >>>>> >>>>> Regards, >>>>> Qasim >>>>> >>>>> >>>>> On Thu, May 16, 2013 at 3:05 PM, >>>>> [email protected] <mailto:[email protected]> >>>>> <[email protected] >>>>> <mailto:[email protected]>> wrote: >>>>> >>>>> yes. >>>>> >>>>> Regards, >>>>> Qasim >>>>> >>>>> >>>>> On Thu, May 16, 2013 at 2:50 PM, Bogdan-Andrei >>>>> Iancu <[email protected] >>>>> <mailto:[email protected]>> wrote: >>>>> >>>>> And do you have UDP 202.152.203.195 port >>>>> 6000 as listener defined in OpenSIPS ?? >>>>> >>>>> Regards, >>>>> >>>>> Bogdan-Andrei Iancu >>>>> OpenSIPS Founder and Developer >>>>> http://www.opensips-solutions.com >>>>> >>>>> >>>>> On 05/16/2013 12:32 PM, >>>>> [email protected] >>>>> <mailto:[email protected]> wrote: >>>>>> Hi Bodgan, >>>>>> >>>>>> Yes i see the following route header in >>>>>> my packet. >>>>>> >>>>>> Route: >>>>>> >>>>>> <sip:[email protected]:6000;lr;ftag=3b710c25;did=e55.a77ff685> >>>>>> >>>>>> >>>>>> And yes i am routing it through loose_route. >>>>>> >>>>>> Regards, >>>>>> Qasim >>>>>> >>>>>> >>>>>> On Wed, May 15, 2013 at 10:40 PM, >>>>>> Bogdan-Andrei Iancu <[email protected] >>>>>> <mailto:[email protected]>> wrote: >>>>>> >>>>>> Hello Qasim, >>>>>> >>>>>> The ACK should be routed via >>>>>> loose_route() based on the "Route" >>>>>> headers from it. Could you check if >>>>>> the Route hdrs (from the ACK) are >>>>>> correctly reflecting your opensips >>>>>> interfaces ? >>>>>> >>>>>> Best regards, >>>>>> >>>>>> Bogdan-Andrei Iancu >>>>>> OpenSIPS Founder and Developer >>>>>> http://www.opensips-solutions.com >>>>>> >>>>>> >>>>>> On 05/14/2013 07:55 AM, >>>>>> [email protected] >>>>>> <mailto:[email protected]> wrote: >>>>>>> Hi, >>>>>>> >>>>>>> I am using OpenSIPs in >>>>>>> Public<->Private bridging mode and >>>>>>> have enabled mhomed=1. But the >>>>>>> problem is that when we have a call >>>>>>> in which both parties are on Public >>>>>>> interface the INVITE gets relayed >>>>>>> properly but and ACK of that invite >>>>>>> gives the following error. >>>>>>> >>>>>>> ERROR:core:get_out_socket: no socket >>>>>>> found >>>>>>> ERROR:core:forward_request: cannot >>>>>>> forward to af 2, proto 1 no >>>>>>> correspondinglistening socket >>>>>>> >>>>>>> Regards, >>>>>>> Qasim >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Users mailing list >>>>>>> [email protected] >>>>>>> <mailto:[email protected]> >>>>>>> >>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >> >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
