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 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 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 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 href="http://s.int" target="_blank">s.int</a>}) >= MIN_SE)</div><div> {</div><div> $avp(session_expires) = $(var(se_value){<a 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>