<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Hi, Mariana!<br>
<br>
The dialog timeout avp has effect only if it is set before
match_dialog and loose_route. But </tt><tt><tt>only the dialog
matched by either loose_route, either match_dialog, will be
updated. If none is found, then nothing will be changed.
Therefore </tt>I can't really see a problem here - if the
UPDATE doesn't match the dialog, you can freely reply with a 481
without any consequences.<br>
<br>
Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Razvan Crainea
OpenSIPS Core Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
On 11/12/2012 08:21 PM, Mariana Arduini wrote:<br>
</div>
<blockquote
cite="mid:CABHUZgA-3=+YwYBW8HecXJ8zNbVt=eigJuzppUBg1U2joV9vvA@mail.gmail.com"
type="cite">After some testing I found out the dialog timeout is
correctly refreshed if I set the avp before calling
match_dialog(), but this is a problem, because we can only refresh
the timer if the UPDATE message belongs to a dialog. Otherwise, we
must reply with a 481.
<div>
<br>
</div>
<div>I tried using loose_route() instead but no success yet.</div>
<div><br>
</div>
<div>Please advise.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Mariana.</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
On Mon, Nov 12, 2012 at 3:17 PM, Mariana Arduini <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:marianarduini@gmail.com" target="_blank">marianarduini@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello all,
<div><br>
</div>
<div>I´ve checked on SST module and it does not mention
anything about refreshing the dialog timeout value. We
need to handle this through UPDATE messages.</div>
<div><br>
</div>
<div>We are using dialog module:</div>
<div><br>
</div>
<div>modparam("dialog", "timeout_avp",
"$avp(session_expires)")<br>
</div>
<div><br>
</div>
<div>When we get the INVITE, we do:</div>
<div>
<div><br>
</div>
<div> if($(hdr(Session-Expires)))</div>
<div> {</div>
<div> # Handling the case "Session-Expires:
4000;refresher=uac"</div>
<div> $var(se_value) =
$(hdr(Session-Expires){s.select,0,;});</div>
<div><br>
</div>
<div> if($(var(se_value){<a
moz-do-not-send="true" href="http://s.int"
target="_blank">s.int</a>}) >= MIN_SE)</div>
<div> {</div>
<div> # Setting/Updating dialog's timeout</div>
<div> $avp(session_expires) =
$(var(se_value){<a moz-do-not-send="true"
href="http://s.int" target="_blank">s.int</a>});</div>
<div> xlog("L_ERR","******** set timer for
INVITE: $avp(session_expires) seconds");</div>
<div> }</div>
<div> else</div>
<div> {</div>
<div>
<div> xlog("L_ERR","Session-Expires
header value lower than minimum supported (MIN_SE)");</div>
</div>
<div>
append_to_reply("Min-SE: MIN_SE\r\n");</div>
<div> sl_send_reply("422","Session Interval
Too Small");</div>
<div> exit; </div>
<div>
}</div>
<div> }</div>
</div>
<div><br>
</div>
<div>Using dlg_list, I can see the dialog timeout was
correctly set. When I do the same thing for the UPDATE,
the dialog timeout is not refreshed:</div>
<div><br>
</div>
<div>
<div> if (is_method("UPDATE") &&
$(hdr(Session-Expires)) ) {</div>
<div><br>
</div>
<div> if(match_dialog())</div>
<div> {</div>
<div> # Handling the case "Session-Expires:
4000;refresher=uac"</div>
<div> $var(se_value) =
$(hdr(Session-Expires){s.select,0,;});</div>
<div><br>
</div>
<div> if($(var(se_value){<a
moz-do-not-send="true" href="http://s.int"
target="_blank">s.int</a>}) >= MIN_SE)</div>
<div> {</div>
<div> $avp(session_expires) =
$(var(se_value){<a moz-do-not-send="true"
href="http://s.int" target="_blank">s.int</a>});</div>
<div> } else {</div>
<div> xlog("L_ERR","Session timer not
refreshed");</div>
<div> }</div>
<div><br>
</div>
<div> sl_send_reply("200", "OK");</div>
<div> exit;</div>
<div> }</div>
<div> else</div>
<div> {</div>
<div> sl_send_reply("481", "Transaction Does
Not Exist");</div>
<div> exit;</div>
<div> }</div>
<div><br>
</div>
<div>}</div>
</div>
<div><br>
</div>
<div>Any hints, please?</div>
<div><br>
</div>
<div>Thanks in advance.</div>
<span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>Mariana.</div>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>