First make sure you create dialog (if it is already not created by any other module) and then set AVP before t_relay, e.g.<div><br></div><div>create_dialog();</div><div>$avp(10) = 180;</div><div>t_relay();</div><div>exit;</div>
<div><br></div><div>Thank you.</div><div><br></div><div><br><div class="gmail_quote">On Wed, Aug 1, 2012 at 10:09 AM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div>Im trying to implement call duration limits and I've following parameters set in dialog module.</div><div><br>
</div><div><div><font face="courier new, monospace">loadmodule "dialog.so"</font></div><div>
<font face="courier new, monospace">modparam("dialog", "db_mode", 1)</font></div><div><font face="courier new, monospace">modparam("dialog", "dlg_match_mode", 1)</font></div><div><font face="courier new, monospace">#modparam("dialog", "default_timeout", 21600)</font></div>
<div><font face="courier new, monospace">modparam("dialog", "timeout_avp", "$avp(10)")</font></div><div><font face="courier new, monospace">modparam("dialog", "log_profile_hash_size", 10)</font></div>
<div><font face="courier new, monospace">modparam("dialog", "db_flush_vals_profiles", 1)</font></div><div><font face="courier new, monospace">modparam("dialog", "profiles_with_value", "caller; sip; gsm")</font></div>
<div><font face="courier new, monospace">modparam("dialog", "profiles_no_value", "inbound ; outbound")</font></div><div><font face="courier new, monospace">modparam("dialog", "db_url", "mysql://opensips:opensips@localhost/opensips")</font></div>
</div><div><font face="courier new, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">The problem here is whatever value I set in the timeout_avp:$avp(10) it doesnt accept it and in debug mode I can see:</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><div><font face="courier new, monospace">DBG:dialog:get_dlg_timeout: invalid AVP value, use default timeout</font></div><div><br></div></div><div><font face="arial, helvetica, sans-serif">I've tried setting the avp(10) to 180,30 X seconds but it gives the same error. </font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Please suggest why is this not accepting values. Am I doing it wrong?</font></div><div><font face="arial, helvetica, sans-serif"><br>
</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Regards,</font></div><div><font face="arial, helvetica, sans-serif">Sammy</font></div><div><font face="arial, helvetica, sans-serif"><br>
</font></div><div><br></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><br clear="all"><div><br></div>-- <br>Muhammad Shahzad<br>-----------------------------------<br>CISCO Rich Media Communication Specialist (CRMCS)<br>CISCO Certified Network Associate (CCNA)<br>
Cell: +92 334 422 40 88<br>MSN: <a href="mailto:shari_786pk@hotmail.com">shari_786pk@hotmail.com</a><br>Email: <a href="mailto:shaheryarkh@googlemail.com">shaheryarkh@googlemail.com</a><br>
</div>