[OpenSIPS-Users] ACK Timer

Răzvan Crainea razvan at opensips.org
Tue Mar 19 09:24:14 CET 2013


Hi, Khaled!

Not really without an if close. You can use something like:

if (is_method("ACK"))
     $avp(timeout2) = 3540.

Best regards,

Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 03/18/2013 11:15 PM, M.Khaled W Chehab wrote:
>
> Hi, Razvan .
>
> You mean to add     $avp(timeout2) = 3540; before  match dialog with 
> no if close
>
> if (has_totag() && (uri == myself) && 
> is_method("INVITE|ACK|BYE|UPDATE")) {
>
> *$avp(timeout2) = 3540;*
>
> if(match_dialog()) {
>
> xlog("L_INFO", "<<<<< in-dialog topology hiding request - $DLG_dir 
> >>>>> \n");
>
> if (check_route_param("nat=yes")) {
>
> setflag(5);
>
> setbflag(6);
>
> }
>
> if ( is_method("INVITE")) {
>
> $avp(timeout2) = 3;
>
> } else if (is_method("ACK")) {
>
> $avp(timeout2) = 3540;
>
> }
>
> route(1);
>
> Regards
>
> *From:*users-bounces at lists.opensips.org 
> [mailto:users-bounces at lists.opensips.org] *On Behalf Of *Razvan Crainea
> *Sent:* Monday, March 18, 2013 4:53 PM
> *To:* users at lists.opensips.org
> *Subject:* Re: [OpenSIPS-Users] ACK Timer
>
> Hi, Khaled!
>
> The match_dialog() function also matched the dialog and updates the 
> timer, therefore you should also set the pseudo variable for ACK 
> before the match_dialog() call.
>
> Best regards,
>
>
> Razvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 03/18/2013 03:38 PM, M.Khaled W Chehab wrote:
>
>     Dear Bogdan,
>
>     I set the timer as below and all my calls have now 3 sec duration
>     ,please advice
>
>     if (has_totag() && (uri == myself) &&
>     is_method("INVITE|ACK|BYE|UPDATE")) {
>
>     if(match_dialog()) {
>
>     xlog("L_INFO", "<<<<< in-dialog topology hiding request - $DLG_dir
>     >>>>> \n");
>
>     if (check_route_param("nat=yes")) {
>
>     setflag(5);
>
>     setbflag(6);
>
>     }
>
>     if ( is_method("INVITE")) {
>
>     $avp(timeout2) = 3;
>
>     } else if (is_method("ACK")) {
>
>     $avp(timeout2) = 3540;
>
>     }
>
>     route(1);
>
>     exit;
>
>                   }
>
>     if (has_totag()) {
>
>                   if (is_method("ACK")) {
>
>     $avp(timeout2) = 3540;
>
>                   }
>
>                   # sequential request withing a dialog should
>
>                   # take the path determined by record-routing
>
>                   if (loose_route()) {
>
>     etc……..
>
>     } else {
>
>     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;
>
>            } else {
>
>                   if ( is_method("INVITE")) {
>
>     $avp(timeout2) = 3;
>
>                   }
>
>            }
>
>     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  <mailto:Users at lists.opensips.org>
>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130319/f4894042/attachment-0001.htm>


More information about the Users mailing list