[OpenSIPS-Users] ACK Timer
Muhammad Shahzad
shaheryarkh at gmail.com
Sun Mar 17 14:12:26 CET 2013
No Khaled, loose_route is not inside ACK if condition, it should be where
it is in your script. Also the INVITE if he mentioned is in else of
has_totag, not loose_route. Read his reply carefully and you will get the
idea. ;-)
Thank you.
On Sat, Mar 16, 2013 at 10:24 PM, M.Khaled W Chehab <kchehab at icucall.com>wrote:
> Dear Bogdan,****
>
> ** **
>
> Please can you confirm the changes I mark down with red color or please
> correct it if its wrong .****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> if (has_totag()) {****
>
> ** **
>
> ****
>
> *if (is_method("ACK")) {*
>
> * $avp(timeout2) = 3540; *
>
> * *
>
> * *
>
> *###should I add here loose_route();*
>
> * }*
>
> # sequential request withing a dialog should****
>
> # take the path determined by record-routing****
>
> ** **
>
> if (loose_route()) {****
>
> # validate the sequential request against dialog****
>
> #if ( $DLG_status!=NULL && !validate_dialog() ) {****
>
> # xlog("In-Dialog $rm from $si (callid=$ci) is
> not valid according to dialog\n");****
>
> # #exit;****
>
> #}****
>
> ** **
>
> if (is_method("BYE")) {****
>
> end_media_session();****
>
> setflag(1); # do accounting ...****
>
> setflag(3); #transaction falis****
>
> ** **
>
> } else if (is_method("INVITE")) {****
>
> # even if in most of the cases is useless, do
> RR for****
>
> # re-INVITEs alos, as some buggy clients do
> change route set****
>
> # during the dialog.****
>
> record_route();****
>
> }****
>
> ** **
>
> if (check_route_param("nat=yes")) {****
>
> setflag(5);****
>
> }****
>
> ** **
>
> # route it out to whatever destination was set by
> loose_route()****
>
> # in $du (destination URI).****
>
> route(1);****
>
> ** **
>
> } else {****
>
> ** **
>
> *if ( is_method("INVITE")) {**
> ** $avp(timeout2) = 3; **
> ** }***
>
> if ( is_method("ACK") ) {****
>
> if ( t_check_trans() ) {****
>
> # non loose-route, but stateful ACK;
> must be an ACK after ****
>
> # a 487 or e.g. 404 from upstream server
> ****
>
> t_relay();****
>
> exit;****
>
> } else {****
>
> # ACK without matching transaction ->**
> **
>
> # ignore and discard****
>
> exit;****
>
> }****
>
> }****
>
> sl_send_reply("404","Not here");****
>
> }****
>
> exit;****
>
> }****
>
> Regards****
>
> ** **
>
> *From:* Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> *Sent:* Thursday, March 14, 2013 6:59 PM
> *To:* OpenSIPS users mailling list
> *Cc:* M.Khaled W Chehab; 'Brito Nicolas'
>
> *Subject:* Re: [OpenSIPS-Users] ACK Timer****
>
> ** **
>
> Hi Khaled,
>
> your mistake here is to set the timeout for INVITE under the
> has_totag() branch - initial INVITEs do not have TO tags.
>
>
> Try:
>
>
> if (has_totag()) {
> if (is_method("ACK")) {
> $avp(timeout2) = 3540;
> }
> ..... (loose_route)
>
> } else {
>
> if ( is_method("INVITE")) {
> $avp(timeout2) = 3;
> }
>
> .......
>
> }
>
>
>
> Regards,
> Bogdan
>
> ****
>
> Bogdan-Andrei Iancu****
>
> OpenSIPS Founder and Developer****
>
> http://www.opensips-solutions.com****
>
>
>
> ****
>
> ** **
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
--
Mit freundlichen Grüßen
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_786pk at hotmail.com
Email: shaheryarkh at googlemail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130317/9cd928ed/attachment-0001.htm>
More information about the Users
mailing list