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">&lt;<a href="mailto:marianarduini@gmail.com" target="_blank">marianarduini@gmail.com</a>&gt;</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(&quot;dialog&quot;, &quot;timeout_avp&quot;, &quot;$avp(session_expires)&quot;)<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 &quot;Session-Expires: 4000;refresher=uac&quot;</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>}) &gt;= MIN_SE)</div>


<div>            {</div><div>                # Setting/Updating dialog&#39;s timeout</div><div>                $avp(session_expires) = $(var(se_value){<a href="http://s.int" target="_blank">s.int</a>});</div><div>                xlog(&quot;L_ERR&quot;,&quot;******** set timer for INVITE: $avp(session_expires) seconds&quot;);</div>


<div>            }</div><div>            else</div><div>            {</div><div><div>                 xlog(&quot;L_ERR&quot;,&quot;Session-Expires header value lower than minimum supported (MIN_SE)&quot;);</div></div><div>


                append_to_reply(&quot;Min-SE: MIN_SE\r\n&quot;);</div><div>                sl_send_reply(&quot;422&quot;,&quot;Session Interval Too Small&quot;);</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(&quot;UPDATE&quot;) &amp;&amp; $(hdr(Session-Expires)) ) {</div>


<div><br></div><div>        if(match_dialog())</div><div>        {</div><div>            # Handling the case &quot;Session-Expires: 4000;refresher=uac&quot;</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>}) &gt;= 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(&quot;L_ERR&quot;,&quot;Session timer not refreshed&quot;);</div><div>            }</div><div><br></div><div>            sl_send_reply(&quot;200&quot;, &quot;OK&quot;);</div>


<div>            exit;</div><div>        }</div><div>        else</div><div>        {</div><div>            sl_send_reply(&quot;481&quot;, &quot;Transaction Does Not Exist&quot;);</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>