ACK Timer

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

ACK Timer

M.Khaled W Chehab

Hi ,

 

I face a lot of scenarios where the customer send a cancel while the  trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .

Si I draw this function below

loadmodule "dialog.so"

modparam("dialog", "timeout_avp", "$avp(timeout2)")

 

if (has_totag()) {

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Do this function effect on my calls or cause  any problem

 

Regards

 

 

 

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : [hidden email]

MSN ID :[hidden email]

Skype    : k_chehab

Web Site: http://www.icucall.com

                     http://www.allohi.com

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

shaheryarkh
This may work, only if you create dialog with 'B' flag, also 3 seconds look very short, destination must be very quick to ACK the call.

I think there is a better way to achieve this, you only need to ensure CANCEL is received at destination.

Thank you.


On Tue, Feb 12, 2013 at 1:45 PM, M.Khaled W Chehab <[hidden email]> wrote:

Hi ,

 

I face a lot of scenarios where the customer send a cancel while the  trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .

Si I draw this function below

loadmodule "dialog.so"

modparam("dialog", "timeout_avp", "$avp(timeout2)")

 

if (has_totag()) {

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Do this function effect on my calls or cause  any problem

 

Regards

 

 

 

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : [hidden email]

MSN ID :[hidden email]

Skype    : k_chehab

Web Site: http://www.icucall.com

                     http://www.allohi.com

 




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

M.Khaled W Chehab

Please can you show me by code  the better way(ensure Cancel)  since this is a critical issue and I am relaying the cancel and after that trunk  send me more than 8 time 200 Ok  ,as is there a way to stop/hangup the call since I receive the cancel from the client

 

2-what do you mean destination must be very quick ( since 200 oK is received  the normal reply (ACK) takes  millsec or I am wrong ?

 

 

Regards

 

From: Muhammad Shahzad [mailto:[hidden email]]
Sent: Tuesday, February 12, 2013 3:05 PM
To: M.Khaled W Chehab
Cc: [hidden email]; [hidden email]; [hidden email]; Muhammad Shahzad
Subject: Re: ACK Timer

 

This may work, only if you create dialog with 'B' flag, also 3 seconds look very short, destination must be very quick to ACK the call.

 

I think there is a better way to achieve this, you only need to ensure CANCEL is received at destination.


Thank you.

 

On Tue, Feb 12, 2013 at 1:45 PM, M.Khaled W Chehab <[hidden email]> wrote:

Hi ,

 

I face a lot of scenarios where the customer send a cancel while the  trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .

Si I draw this function below

loadmodule "dialog.so"

modparam("dialog", "timeout_avp", "$avp(timeout2)")

 

if (has_totag()) {

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Do this function effect on my calls or cause  any problem

 

Regards

 

 

 

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : [hidden email]

MSN ID :[hidden email]

Skype    : k_chehab

Web Site: http://www.icucall.com

                     http://www.allohi.com

 



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

shaheryarkh
Sorry i didn't see you are setting dialog timeout for sequential INVITE, instead of initial INVITE, so this timeout would actually have no effect on new call, it will effect only established call (e.g. when caller or callee sets call on hold etc.) and when that sequential INVITE comes in the destination has to accept it within 3 seconds, which is OK, since call is already established, only its state being changed.

Secondly, a call is not considered established till ACK arrives from caller party. Since caller never sends ACK, so destination should end call (after 32 seconds per RFC 3261) even if it does not receives CANCEL from caller. And if destination receives CANCEL, then call should end anyway. Such call can not be billed, since it was never established.

From billing the caller prospective, you should start billing upon receiving 200 OK from destination but you must discard it if CANCEL comes from caller instead of ACK. In fact i have seen some billing systems that actually start billing upon receiving ACK from caller, rather 200 OK from destination. To overcome the loss of few seconds (between 200 OK from destination and ACK from caller), they use a different billing head called "connection charges".

Thank you.


On Tue, Feb 12, 2013 at 2:24 PM, M.Khaled W Chehab <[hidden email]> wrote:

Please can you show me by code  the better way(ensure Cancel)  since this is a critical issue and I am relaying the cancel and after that trunk  send me more than 8 time 200 Ok  ,as is there a way to stop/hangup the call since I receive the cancel from the client

 

2-what do you mean destination must be very quick ( since 200 oK is received  the normal reply (ACK) takes  millsec or I am wrong ?

 

 

Regards

 

From: Muhammad Shahzad [mailto:[hidden email]]
Sent: Tuesday, February 12, 2013 3:05 PM
To: M.Khaled W Chehab
Cc: [hidden email]; [hidden email]; [hidden email]; Muhammad Shahzad
Subject: Re: ACK Timer

 

This may work, only if you create dialog with 'B' flag, also 3 seconds look very short, destination must be very quick to ACK the call.

 

I think there is a better way to achieve this, you only need to ensure CANCEL is received at destination.


Thank you.

 

On Tue, Feb 12, 2013 at 1:45 PM, M.Khaled W Chehab <[hidden email]> wrote:

Hi ,

 

I face a lot of scenarios where the customer send a cancel while the  trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .

Si I draw this function below

loadmodule "dialog.so"

modparam("dialog", "timeout_avp", "$avp(timeout2)")

 

if (has_totag()) {

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Do this function effect on my calls or cause  any problem

 

Regards

 

 

 

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : [hidden email]

MSN ID :[hidden email]

Skype    : k_chehab

Web Site: http://www.icucall.com

                     http://www.allohi.com

 



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

shaheryarkh
Ah, again typo, in last line of previous email, i meant to recover loss of few seconds between 200 OK and CANCEL from caller, (not ACK from caller, since ACK establishes a billable call).

Thank you.


On Tue, Feb 12, 2013 at 2:54 PM, Muhammad Shahzad <[hidden email]> wrote:
Sorry i didn't see you are setting dialog timeout for sequential INVITE, instead of initial INVITE, so this timeout would actually have no effect on new call, it will effect only established call (e.g. when caller or callee sets call on hold etc.) and when that sequential INVITE comes in the destination has to accept it within 3 seconds, which is OK, since call is already established, only its state being changed.

Secondly, a call is not considered established till ACK arrives from caller party. Since caller never sends ACK, so destination should end call (after 32 seconds per RFC 3261) even if it does not receives CANCEL from caller. And if destination receives CANCEL, then call should end anyway. Such call can not be billed, since it was never established.

From billing the caller prospective, you should start billing upon receiving 200 OK from destination but you must discard it if CANCEL comes from caller instead of ACK. In fact i have seen some billing systems that actually start billing upon receiving ACK from caller, rather 200 OK from destination. To overcome the loss of few seconds (between 200 OK from destination and ACK from caller), they use a different billing head called "connection charges".

Thank you.


On Tue, Feb 12, 2013 at 2:24 PM, M.Khaled W Chehab <[hidden email]> wrote:

Please can you show me by code  the better way(ensure Cancel)  since this is a critical issue and I am relaying the cancel and after that trunk  send me more than 8 time 200 Ok  ,as is there a way to stop/hangup the call since I receive the cancel from the client

 

2-what do you mean destination must be very quick ( since 200 oK is received  the normal reply (ACK) takes  millsec or I am wrong ?

 

 

Regards

 

From: Muhammad Shahzad [mailto:[hidden email]]
Sent: Tuesday, February 12, 2013 3:05 PM
To: M.Khaled W Chehab
Cc: [hidden email]; [hidden email]; [hidden email]; Muhammad Shahzad
Subject: Re: ACK Timer

 

This may work, only if you create dialog with 'B' flag, also 3 seconds look very short, destination must be very quick to ACK the call.

 

I think there is a better way to achieve this, you only need to ensure CANCEL is received at destination.


Thank you.

 

On Tue, Feb 12, 2013 at 1:45 PM, M.Khaled W Chehab <[hidden email]> wrote:

Hi ,

 

I face a lot of scenarios where the customer send a cancel while the  trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .

Si I draw this function below

loadmodule "dialog.so"

modparam("dialog", "timeout_avp", "$avp(timeout2)")

 

if (has_totag()) {

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Do this function effect on my calls or cause  any problem

 

Regards

 

 

 

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : [hidden email]

MSN ID :[hidden email]

Skype    : k_chehab

Web Site: http://www.icucall.com

                     http://www.allohi.com

 



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]



--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

M.Khaled W Chehab

Dear Nicolas,

 

I am using opensips 1.8.2 tls version ,the problem still exist while even while I am using  the timer ,please update me if you have a solution .

 

 

if (has_totag()) {

 

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Regards

Khaled chehab

 

 

From: Brito Nicolas [mailto:[hidden email]]
Sent: Tuesday, February 12, 2013 4:52 PM
Cc: M.Khaled W Chehab
Subject: Re: [OpenSIPS-Users] ACK Timer

 

Hi Khaled,

What you posted at first seems good so far the dialog will be dropped after 3 second which is not bad.
The only other possibility is to actually make a detection in OpenSIPS for CANCEL emition instead of ACK.
If you are using FreeSWITCH i offer to send you a patch that solve this behaviour.

Regards

Nicolas

Le 12/02/2013 15:02, Muhammad Shahzad a écrit :

Ah, again typo, in last line of previous email, i meant to recover loss of few seconds between 200 OK and CANCEL from caller, (not ACK from caller, since ACK establishes a billable call).

 

Thank you.

On Tue, Feb 12, 2013 at 2:54 PM, Muhammad Shahzad <[hidden email]> wrote:

Sorry i didn't see you are setting dialog timeout for sequential INVITE, instead of initial INVITE, so this timeout would actually have no effect on new call, it will effect only established call (e.g. when caller or callee sets call on hold etc.) and when that sequential INVITE comes in the destination has to accept it within 3 seconds, which is OK, since call is already established, only its state being changed.

 

Secondly, a call is not considered established till ACK arrives from caller party. Since caller never sends ACK, so destination should end call (after 32 seconds per RFC 3261) even if it does not receives CANCEL from caller. And if destination receives CANCEL, then call should end anyway. Such call can not be billed, since it was never established.

 

From billing the caller prospective, you should start billing upon receiving 200 OK from destination but you must discard it if CANCEL comes from caller instead of ACK. In fact i have seen some billing systems that actually start billing upon receiving ACK from caller, rather 200 OK from destination. To overcome the loss of few seconds (between 200 OK from destination and ACK from caller), they use a different billing head called "connection charges".

 

Thank you.

 

On Tue, Feb 12, 2013 at 2:24 PM, M.Khaled W Chehab <[hidden email]> wrote:

Please can you show me by code  the better way(ensure Cancel)  since this is a critical issue and I am relaying the cancel and after that trunk  send me more than 8 time 200 Ok  ,as is there a way to stop/hangup the call since I receive the cancel from the client

 

2-what do you mean destination must be very quick ( since 200 oK is received  the normal reply (ACK) takes  millsec or I am wrong ?

 

 

Regards

 

From: Muhammad Shahzad [mailto:[hidden email]]
Sent: Tuesday, February 12, 2013 3:05 PM
To: M.Khaled W Chehab
Cc: [hidden email]; [hidden email]; [hidden email]; Muhammad Shahzad
Subject: Re: ACK Timer

 

This may work, only if you create dialog with 'B' flag, also 3 seconds look very short, destination must be very quick to ACK the call.

 

I think there is a better way to achieve this, you only need to ensure CANCEL is received at destination.


Thank you.

 

On Tue, Feb 12, 2013 at 1:45 PM, M.Khaled W Chehab <[hidden email]> wrote:

Hi ,

 

I face a lot of scenarios where the customer send a cancel while the  trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .

Si I draw this function below

loadmodule "dialog.so"

modparam("dialog", "timeout_avp", "$avp(timeout2)")

 

if (has_totag()) {

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Do this function effect on my calls or cause  any problem

 

Regards

 

 

 

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : [hidden email]

MSN ID :[hidden email]

Skype    : k_chehab

Web Site: http://www.icucall.com

                     http://www.allohi.com

 



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

Bogdan-Andrei Iancu-2
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

On 03/11/2013 01:09 PM, M.Khaled W Chehab wrote:

Dear Nicolas,

 

I am using opensips 1.8.2 tls version ,the problem still exist while even while I am using  the timer ,please update me if you have a solution .

 

 

if (has_totag()) {

 

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Regards

Khaled chehab

 

 

From: Brito Nicolas [[hidden email]]
Sent: Tuesday, February 12, 2013 4:52 PM
Cc: M.Khaled W Chehab
Subject: Re: [OpenSIPS-Users] ACK Timer

 

Hi Khaled,

What you posted at first seems good so far the dialog will be dropped after 3 second which is not bad.
The only other possibility is to actually make a detection in OpenSIPS for CANCEL emition instead of ACK.
If you are using FreeSWITCH i offer to send you a patch that solve this behaviour.

Regards

Nicolas

Le 12/02/2013 15:02, Muhammad Shahzad a écrit :

Ah, again typo, in last line of previous email, i meant to recover loss of few seconds between 200 OK and CANCEL from caller, (not ACK from caller, since ACK establishes a billable call).

 

Thank you.

On Tue, Feb 12, 2013 at 2:54 PM, Muhammad Shahzad <[hidden email]> wrote:

Sorry i didn't see you are setting dialog timeout for sequential INVITE, instead of initial INVITE, so this timeout would actually have no effect on new call, it will effect only established call (e.g. when caller or callee sets call on hold etc.) and when that sequential INVITE comes in the destination has to accept it within 3 seconds, which is OK, since call is already established, only its state being changed.

 

Secondly, a call is not considered established till ACK arrives from caller party. Since caller never sends ACK, so destination should end call (after 32 seconds per RFC 3261) even if it does not receives CANCEL from caller. And if destination receives CANCEL, then call should end anyway. Such call can not be billed, since it was never established.

 

From billing the caller prospective, you should start billing upon receiving 200 OK from destination but you must discard it if CANCEL comes from caller instead of ACK. In fact i have seen some billing systems that actually start billing upon receiving ACK from caller, rather 200 OK from destination. To overcome the loss of few seconds (between 200 OK from destination and ACK from caller), they use a different billing head called "connection charges".

 

Thank you.

 

On Tue, Feb 12, 2013 at 2:24 PM, M.Khaled W Chehab <[hidden email]> wrote:

Please can you show me by code  the better way(ensure Cancel)  since this is a critical issue and I am relaying the cancel and after that trunk  send me more than 8 time 200 Ok  ,as is there a way to stop/hangup the call since I receive the cancel from the client

 

2-what do you mean destination must be very quick ( since 200 oK is received  the normal reply (ACK) takes  millsec or I am wrong ?

 

 

Regards

 

From: Muhammad Shahzad [mailto:[hidden email]]
Sent: Tuesday, February 12, 2013 3:05 PM
To: M.Khaled W Chehab
Cc: [hidden email]; [hidden email]; [hidden email]; Muhammad Shahzad
Subject: Re: ACK Timer

 

This may work, only if you create dialog with 'B' flag, also 3 seconds look very short, destination must be very quick to ACK the call.

 

I think there is a better way to achieve this, you only need to ensure CANCEL is received at destination.


Thank you.

 

On Tue, Feb 12, 2013 at 1:45 PM, M.Khaled W Chehab <[hidden email]> wrote:

Hi ,

 

I face a lot of scenarios where the customer send a cancel while the  trunk send 200 OK and start the billing from its side ,so the client call will be canceled from his side and goes to the max call duration from my side and trunk side .

Si I draw this function below

loadmodule "dialog.so"

modparam("dialog", "timeout_avp", "$avp(timeout2)")

 

if (has_totag()) {

              if ( is_method("INVITE")) {

                     $avp(timeout2) = 3;

              } else if (is_method("ACK")) {

                     $avp(timeout2) = 3540;

              }

 

Do this function effect on my calls or cause  any problem

 

Regards

 

 

 

Khaled Chehab

Senior NGN Engineer

Description: icucall

Operations Office - Lebanon

Office    : +961 1 515155 ext 300

Mobile  : +961 3 045212

E-mail    : [hidden email]

MSN ID :[hidden email]

Skype    : k_chehab

Web Site: http://www.icucall.com

                     http://www.allohi.com

 



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]



 

--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: 
[hidden email]
Email: 
[hidden email]




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 

_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

M.Khaled W Chehab

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:[hidden email]]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

shaheryarkh
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 <[hidden email]> 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:[hidden email]]
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
[hidden email]
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: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

M.Khaled W Chehab
In reply to this post by Bogdan-Andrei Iancu-2

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:[hidden email]]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

Răzvan Crainea-2
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 [[hidden email]]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

M.Khaled W Chehab

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: [hidden email] [mailto:[hidden email]] On Behalf Of Razvan Crainea
Sent: Monday, March 18, 2013 4:53 PM
To: [hidden email]
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 [[hidden email]]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK Timer

Răzvan Crainea-2
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: [hidden email] [[hidden email]] On Behalf Of Razvan Crainea
Sent: Monday, March 18, 2013 4:53 PM
To: [hidden email]
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 [[hidden email]]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users