[OpenSIPS-Users] About Timeout setting

Nick Chang nick.chang at kland.com.tw
Fri Dec 14 05:01:30 CET 2012


Hello Rederico

 

I changed this config

route{

if (is_method("ACK")) {

                $avp(timeout) = 43200;

}

 

        if (!mf_process_maxfwd_header("10")) {

                send_reply("483","Too Many Hops");

                exit;

        }

 

        #---- NAT Detection ----#

        force_rport();

        if (nat_uac_test("19")) {

                if (is_method("REGISTER")) {

                        fix_nated_register();

                } else {

                        fix_nated_contact();

                        #----   Insert nat=yes at the end of the Contact header           ----#

                        #----                This helps with REINVITEs,                   ----#

                        #--- nat=yes will be included in the R-URI for sequential requests ---#

                        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');

                }

                setflag(5);

        }

 

        #---- Sequential requests section ----#

        if (has_totag()) {

                # sequential request withing a dialog should

                # take the path determined by record-routing

                if (loose_route()) {

                        if (is_method("BYE")) {

                                setflag(1); # do accounting ...

                                setflag(3); # ... even if the transaction fails

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

                                record_route();

                        }

                        route(generic_relay);

                } else {

                        if (is_method("SUBSCRIBE") && $rd == "xx.xx.yy.yy" ) {

                                # in-dialog subscribe requests

                                route(presence_handling);

 

First, It’s OK. B can recive cancel with 10s.

Secondary,  A call to B. A and B will recive by with 10s.

Third. As the same secondary.

 

I don’t know why?? Do everyone can give me any suggestion??

 

Thanks

 

 

From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Federico Cabiddu
Sent: Thursday, December 13, 2012 11:29 PM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] About Timeout setting

 

Hello, you can use the dialog module for this and its timeout_avp.

 

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

 

When you receive an INVITE, before relaying to the destination create a dialog and set the timeout you want

 

create_dialog("B");

$avp(timeout) = TIMEOUT;

 

Then in the main route, before loose_route() call you can restore the dialog lifetime:

 

if (is_method("ACK")) {

                $avp(timeout) = DIALOG_TIMEOUT;

}

 

Hope this helps.

 

Regards,

 

Federico

 

On Thu, Dec 13, 2012 at 4:10 PM, Nick <nick.chang at kland.com.tw> wrote:

Hello

 

Make a call A to B, A network interruption A will disappear for this call, but B will always show "ringing". B Click on button can be recive this phone call.

 

But, Now it can't talk. Can Server set time out?? When Timeout, Send Bye to B.

 

Thanks

BR

 

 

 


_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

der

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


More information about the Users mailing list