<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:新細明體;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@新細明體";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"新細明體","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-TW link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'>Hello Federico<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for your reply.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'>I added this param:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>modparam("dialog", "timeout_avp", "$avp(timeout)")<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>create_dialog("B");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>$avp(timeout) = 10;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>if (is_method("ACK")) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> $avp(timeout) = 43200;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> if (has_totag()) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> # sequential request withing a dialog should<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> # take the path determined by record-routing<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> if (loose_route()) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> if (is_method("BYE")) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> setflag(1); <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> setflag(3); <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> } else if (is_method("INVITE")) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> record_route();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> route(generic_relay);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> } else {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> if (is_method("SUBSCRIBE") && $rd == "202.133.6.99" ) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> # in-dialog subscribe requests<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> route(presence_handling);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> exit;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> if ( is_method("ACK") ) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> if ( t_check_trans() ) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> t_relay();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> exit;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> } else {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> exit;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> send_reply("404","Not here");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> exit;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'>But, every call always timeout with 10s.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'>I get the packet, I don’t get ACK.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'>Can you give me a suggest??<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@lists.opensips.org [mailto:users-bounces@lists.opensips.org] <b>On Behalf Of </b>Federico Cabiddu<br><b>Sent:</b> Thursday, December 13, 2012 11:29 PM<br><b>To:</b> OpenSIPS users mailling list<br><b>Subject:</b> Re: [OpenSIPS-Users] About Timeout setting<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Hello, you can use the dialog module for this and its timeout_avp.<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>modparam("dialog", "timeout_avp", "$avp(timeout)")<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>When you receive an INVITE, before relaying to the destination create a dialog and set the timeout you want<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>create_dialog("B");<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>$avp(timeout) = TIMEOUT;<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Then in the main route, before loose_route() call you can restore the dialog lifetime:<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><div><p class=MsoNormal><span lang=EN-US>if (is_method("ACK")) {<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> $avp(timeout) = DIALOG_TIMEOUT;<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>}<o:p></o:p></span></p></div></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Hope this helps.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Regards,<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Federico<o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US>On Thu, Dec 13, 2012 at 4:10 PM, Nick <<a href="mailto:nick.chang@kland.com.tw" target="_blank">nick.chang@kland.com.tw</a>> wrote:<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US>Hello<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>But, Now it can't talk. Can Server set time out?? When Timeout, Send Bye to B.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Thanks<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>BR<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US>der<o:p></o:p></span></p></div></div></body></html>