Hi Razvan!<div><br></div><div>Thanks for the reply!</div><div><br></div><div>If there will be no consequences for setting the avp for a UPDATE outside a dialog, then in fact, that won´t be a problem.</div><div><br></div><div>

Thanks again.</div><div><br></div><div>Mariana.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 12, 2012 at 5:32 PM, Răzvan Crainea <span dir="ltr">&lt;<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div><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&#39;t really see a problem here - if the
        UPDATE doesn&#39;t match the dialog, you can freely reply with a 481
        without any consequences.<br>
        <br>
        Best regards,<br>
      </tt>
      <pre cols="72">Razvan Crainea
OpenSIPS Core Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
</pre><div><div class="h5">
      On 11/12/2012 08:21 PM, Mariana Arduini wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">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><font color="#888888">
                <div><br>
                </div>
                <div>Mariana.</div>
              </font></span></blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <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></div>