[OpenSIPS-Users] About Timeout setting

Nick Chang nick.chang at kland.com.tw
Fri Dec 14 02:57:33 CET 2012


Hello Federico

 

Thanks for your reply.

 

I added this param:

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

create_dialog("B");

$avp(timeout) = 10;

 

if (is_method("ACK")) {

                $avp(timeout) = 43200;

}

        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); 

                                setflag(3); 

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

                                record_route();

                        }

                        route(generic_relay);

                } else {

                        if (is_method("SUBSCRIBE") && $rd == "202.133.6.99" ) {

                                # in-dialog subscribe requests

                                route(presence_handling);

                                exit;

                        }

 

                        if ( is_method("ACK") ) {

                                if ( t_check_trans() ) {

                                        t_relay();

                                        exit;

                                } else {

                                        exit;

                                }

                        }

                        send_reply("404","Not here");

                }

                exit;

        }

 

But, every call always timeout with 10s.

 

I get the packet, I don’t get ACK.

Can you give me a suggest??

 

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/66908f80/attachment.htm>


More information about the Users mailing list