Hi Tung<div><br></div><div>i dont know how to check the call is the first incomming call when opensips start</div><div>but you can do something similar to yours goal</div><div>example hangup the sip account = sip:5000@....</div>
<div>example config :</div><div>...</div><div>modparam("dialog", "timeout_avp", "$avp(i:10)")</div><div>....</div><div>route{</div><div>$avp(i:10)="30"</div><div>setflag(4)</div><div>
......</div><div>if INVITE && from sip = 5000@...</div><div> <span class="Apple-style-span" style="font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; font-size: 12px; color: rgb(102, 102, 102); line-height: 14px; white-space: pre; ">$avp(i:10) = NULL;</span></div>
<div><span class="Apple-style-span" style="font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; font-size: 12px; color: rgb(102, 102, 102); line-height: 14px; white-space: pre; "> </span><span class="Apple-style-span" style="font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier; font-size: 12px; color: rgb(102, 102, 102); line-height: 14px; white-space: pre; ">$avp(i:10) = "300";</span></div>
<div> create_dialog()</div><div><br></div><div><br></div><div>something like that and you should check the below link for fully understand avp</div><div><a href="http://www.opensips.org/Resources/DocsCoreVar16#varavps">http://www.opensips.org/Resources/DocsCoreVar16#varavps</a></div>
<div><br></div><div><a href="http://www.opensips.org/Resources/DocsCoreVar16#varavps"></a>Ha`<br><br><div class="gmail_quote">On Fri, Sep 17, 2010 at 10:45 PM, Tung Tran <span dir="ltr"><<a href="mailto:tr.tung@gmail.com">tr.tung@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Hi Ha</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Thanks for your tips, but how can we set the timeout per call
basic? Mean call 1 will have 30s, but call2 can be 1minute</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">T.T</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt">
<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a> [mailto:<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>] <b>On
Behalf Of </b>haloha<br>
<b>Sent:</b> Friday, September 17, 2010 10:14 PM<br>
<b>To:</b> OpenSIPS users mailling list<br>
<b>Subject:</b> Re: [OpenSIPS-Users] How to use the dialog module to limit call
duration</span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Hi Tung</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">you should load the dialog module</p>
</div>
<div>
<p class="MsoNormal">modparam("dialog", "default_timeout",
30) - 30 giay</p>
</div>
<div>
<p class="MsoNormal">modparam("dialog", "dlg_flag", 4)</p>
</div>
<div>
<p class="MsoNormal">modparam("dialog",
"bye_on_timeout_flag", 6) - maybe 4</p>
</div>
<div>
<p class="MsoNormal">....<br>
route</p>
</div>
<div>
<p class="MsoNormal"> {</p>
</div>
<div>
<p class="MsoNormal">setflag(4)</p>
</div>
<div>
<p class="MsoNormal">create_dialog();<br>
....</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">all call will be disconnect after 30s</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Have fun, Opensips is good sip server :)</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Ha`</p>
</div>
<div>
<p class="MsoNormal">On Fri, Sep 17, 2010 at 9:51 PM, Tung Tran <<a href="mailto:tr.tung@gmail.com" target="_blank">tr.tung@gmail.com</a>> wrote:</p>
<div>
<div>
<p class="MsoNormal">Dear
experts,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I
want to test the scenario that uses dialog module to limite call duration and
disconnect the active call when the timer is over.</p>
<p class="MsoNormal">I
read the dialog module document many time but still cannot figure out how to
config it in opensips conf file.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Any
hints are very appreciated.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal">T.T</p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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></p>
</div>
<p class="MsoNormal"> </p>
</div></div></div>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">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><br>
<br></blockquote></div><br></div>