One more reason for string after t_relay is, If t_relay failed then we don&#39;t need to save in the location table.<br><br>Thanks<br>Jijo<br><br><div class="gmail_quote">On Sun, Feb 20, 2011 at 12:53 PM, Jijo <span dir="ltr">&lt;<a href="mailto:realjijo@gmail.com">realjijo@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div bgcolor="#FFFFFF"><div>Yes this happens in a testing environment..</div><div>I got your point, we saved after t-relay to send the message faster as db save can cause delay.</div>
<div>We will make the changes as per your suggestion .<br>Thanks<br><font color="#888888"><div>Jijo</div></font></div><div><div></div><div class="h5"><div><br>On Feb 18, 2011, at 4:11 AM, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt; wrote:<br>
<br></div><div></div><blockquote type="cite"><div>

    Hello,<br>
    <br>
    is any particular reason to do the processing after t_relay() ? You
    can do the save before, since it is the same register message.<br>
    <br>
    Also, are you getting this in a testing environment while using
    tools like sipp to simulate traffic?<br>
    <br>
    Starting with 3.0, the AVPs (which are associated with the message
    and transaction in this case) become available in onreply_route[3]
    (in 1.x that was a config option for tm module), so if it is fast
    reply, it my happen that the avps are no longer available in the
    script after t_relay().<br>
    <br>
    As a recommended rule, it is better to avoid using avps after
    t_relay() - this function creates the transaction and forwards the
    message. From there on, the avps are in the hands of tm module,
    which moves them to onreply_route or failure_route, depending on
    your config file.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    On 2/16/11 4:28 PM, Jijo wrote:
    <blockquote type="cite">
      
      <font size="+0"><span>
          <div dir="ltr" align="left"><span></span><font face="Arial"><font color="#0000ff"><font size="2">Hi
                  Daniel,<br>
                  <br>
                  Please find the code and corresponding error trace.
                  This happens only for 1 subscriber randomly out of
                  2000 subscribers. This can be reproduced consistently
                  also.<br>
                  <br>
                  r<span>oute(1)</span></font></font></font></div>
          <div dir="ltr" align="left"><font size="+0"><font color="#0000ff"><font size="2"><span></span></font></font></font><span></span><font color="#0000ff" face="Arial" size="2">{</font></div>
          <div dir="ltr" align="left"><span></span><font color="#0000ff" face="Arial" size="2">:</font></div>
          <div dir="ltr" align="left"><span></span><font color="#0000ff" face="Arial" size="2">:</font></div>
          <div dir="ltr" align="left"><span></span><font color="#0000ff" face="Arial" size="2">:</font></div>
          <div dir="ltr" align="left"><br>
            <font color="#0000ff" face="Arial" size="2">        #
              -----------------------------------------------------------------<br>
                      # Registration handling dynamic endpoints<br>
                      #
              -----------------------------------------------------------------<br>
            </font></div>
          <div> </div>
          <div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2">        $avp(reg_contact)= $ct;<br>
            </font><font size="+0"><span><font color="#0000ff" face="Arial" size="2">       
                  $var(reg_contact)= $ct;</font></span></font><br>
            <font size="+0"><span></span></font><font color="#0000ff" face="Arial" size="2">       
              t_on_reply(&quot;3&quot;);<br>
              <br>
                      if(!is_avp_set(&quot;$avp(reg_contact)&quot;)) <br>
                          xlog(&quot;L_ERR&quot;, &quot;R1 - not set the reg_contact3
              F=$fu T=$tu Ct=$ct IP=$si CI=$ci
              var_contact:$var(reg_contact)\n&quot;);</font></div>
          <div> </div>
          <div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2">         # relay<br>
                       if(!t_relay_to(&quot;0x3&quot;))<br>
                      {<br>
                          xlog(&quot;L_ERR&quot;, &quot;R1/R10 - Registration failed -
              M=$rm F=$fu T=$tu CT=$ct IP=$si CI=$ci\n&quot;);<br>
                          append_to_reply(&quot;Warning: 399 $Ri - R1 -
              Registration failed: fail in relay in R10.\r\n&quot;);<br>
                          sl_reply_error();<br>
                          exit;<br>
                      }<br>
            </font><font size="+0"><span><font color="#0000ff" face="Arial" size="2"><br>
                          if(!is_avp_set(&quot;$avp(reg_contact)&quot;)) <span style="background-color: rgb(255, 255, 255);"></span><br>
                              xlog(&quot;L_ERR&quot;, &quot;R1 - not set the
                  reg_contact4 F=$fu T=$tu Ct=$ct IP=$si CI=$ci
                  var_contact:$var(reg_contact)\n&quot;);<br>
                  <br>
                </font></span></font><font color="#0000ff" face="Arial" size="2">        xlog(&quot;L_ERR&quot;, &quot;R1 - Saving
              Registration-2  save to location F=$fu T=$tu Ct=$ct IP=$si
              CI=$ci reg_ct:$avp(reg_contact)\n&quot;);<br>
            </font></div>
          <div dir="ltr" align="left"> </div>
          <div><font color="#0000ff" face="Arial" size="2"> <span>       </span> if(!isflagset(28)
              &amp;&amp; is_avp_set(&quot;$avp(reg_contact)&quot;)) # Check if we
              need to save it in location table<br>
                      {<br>
                          if(!save(&quot;location&quot;,&quot;0x02&quot;))<br>
                          {<br>
                              xlog(&quot;L_ERR&quot;, &quot;R1 - Location save for
              Registration failed - M=$rm F=$fu T=$tu IP=$si CT=$ct\n&quot;);<br>
                          }<br>
                      }<br>
            </font></div>
          <div dir="ltr" align="left"> </div>
          <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">LOGS for the error
                condtion.</font></span></div>
          <div dir="ltr" align="left"><span></span> </div>
          <div><font face="Arial" size="2"><br>
              <font color="#800080">2011-02-15T12:19:30-05:00 [err]
                sipserver: ERROR: &lt;script&gt;: R1 - not set the
                reg_contact4
                F=<a>sip:5614510478@10.235.86.54:5060;transport=UDP</a>
                T=<a>sip:5614510478@10.235.86.54:5060;transport=UDP</a> Ct=&lt;<a href="http://sip:5614510478@10.235.204.5:5060" target="_blank">sip:5614510478@10.235.204.5:5060</a>&gt;
                IP=10.235.204.5
                CI=119ac328-4cceb0a-13c4-7fa55-76a2903a-7fa55
                var_contact:</font></font><font size="+0"><span><font face="Arial" size="2"><font color="#800080">&lt;<a href="http://sip:5614510478@10.235.204.5:5060" target="_blank">sip:5614510478@10.235.204.5:5060</a>&gt;</font></font></span></font><br>

            <font face="Arial" size="2">2011-02-15T12:19:30-05:00 [err]
              sipserver: ERROR: &lt;script&gt;: R1 - Saving
              Registration-2  save to location
              F=<a>sip:5614510478@10.235.86.54:5060;transport=UDP</a>
              T=<a>sip:5614510478@10.235.86.54:5060;transport=UDP</a> Ct=&lt;<a href="http://sip:5614510478@10.235.204.5:5060" target="_blank">sip:5614510478@10.235.204.5:5060</a>&gt;
              IP=10.235.204.5
              CI=119ac328-4cceb0a-13c4-7fa55-76a2903a-7fa5<span style="color: rgb(255, 255, 255);">5 </span><span style="background-color: rgb(255, 0, 0);"><span style="color: rgb(255, 255, 255);">reg_ct:&lt;null&gt;</span><span style="background-color: rgb(255, 255, 255);"></span></span><br>

            </font></div>
        </span></font><br>
      <br>
      <div class="gmail_quote">On Wed, Feb 16, 2011 at 5:02 AM,
        Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank"></a><a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          <div text="#000000" bgcolor="#ffffff"> Hello,<br>
            <br>
            it is not clear for me what you tried to do. Can you paste
            here the parts of the config file that are relevant for the
            case? Do you relay the REGISTER?<br>
            <br>
            Cheers,<br>
            Daniel
            <div>
              <div><br>
                <br>
                On 2/16/11 1:17 AM, Jijo wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div>Hi All,<br>
                  <br>
                  On register we store the contact in an avp variable
                  and do a t_relay(). After t_relay() the $avp variable
                  becomes null. <br>
                  I printed the value before after t_relay() to
                  determine this behavior.<br>
                  This happens only on registration load test around
                  2000 subcribers with ( 4 REGISTER/sec).  This happens
                  only for one subscriber out of 2000 subscribers. <br>
                  <br>
                  I did the similar test with $var and its working fine.<br>
                  <br>
                  Anybody observed similar behavior with avp? This was
                  working in kamailio 1.4 version. We did the upgrade
                  recently to 3.1.0 and started observing this issue.<br>
                  <br>
                  How do we debug this issue.?<br>
                  <br>
                  <br>
                  Thanks<br>
                  Jijo<br>
                  <br>
                </div>
              </div>
              <pre><fieldset></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank"></a><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank"></a><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
            </blockquote>
            <br>
            <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank"></a><a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></pre>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank"></a><a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></pre>
  

</div></blockquote></div></div></div></blockquote></div><br>