<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    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
      cite="mid:AANLkTikaGMscrKirvqMW+MJkYBxSLxoOFhS=28FPg+0S@mail.gmail.com"
      type="cite">
      <style>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</style>
      <style>@font-face {
        font-family: Tahoma;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 70.85pt 3.0cm 70.85pt 3.0cm; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
        page: Section1
}
</style><font size="+0"><span class="104092018-15022011">
          <div dir="ltr" align="left"><span class="104092018-15022011"></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 class="104092018-15022011">oute(1)</span></font></font></font></div>
          <div dir="ltr" align="left"><font size="+0"><font
                color="#0000ff"><font size="2"><span
                    class="104092018-15022011"></span></font></font></font><span
              class="104092018-15022011"></span><font color="#0000ff"
              face="Arial" size="2">{</font></div>
          <div dir="ltr" align="left"><span class="104092018-15022011"></span><font
              color="#0000ff" face="Arial" size="2">:</font></div>
          <div dir="ltr" align="left"><span class="104092018-15022011"></span><font
              color="#0000ff" face="Arial" size="2">:</font></div>
          <div dir="ltr" align="left"><span class="104092018-15022011"></span><font
              color="#0000ff" face="Arial" size="2">:</font></div>
          <div dir="ltr" align="left"><br>
            <font color="#0000ff" face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #
              -----------------------------------------------------------------<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Registration handling dynamic endpoints<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #
              -----------------------------------------------------------------<br>
            </font></div>
          <div>&nbsp;</div>
          <div dir="ltr" align="left"><font color="#0000ff" face="Arial"
              size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $avp(reg_contact)= $ct;<br>
            </font><font size="+0"><span class="104092018-15022011"><font
                  color="#0000ff" face="Arial" size="2">&nbsp; &nbsp; &nbsp; &nbsp;
                  $var(reg_contact)= $ct;</font></span></font><br>
            <font size="+0"><span class="104092018-15022011"></span></font><font
              color="#0000ff" face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              t_on_reply("3");<br>
              <br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!is_avp_set("$avp(reg_contact)")) <br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_ERR", "R1 - not set the reg_contact3
              F=$fu T=$tu Ct=$ct IP=$si CI=$ci
              var_contact:$var(reg_contact)\n");</font></div>
          <div>&nbsp;</div>
          <div dir="ltr" align="left"><font color="#0000ff" face="Arial"
              size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # relay<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!t_relay_to("0x3"))<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_ERR", "R1/R10 - Registration failed -
              M=$rm F=$fu T=$tu CT=$ct IP=$si CI=$ci\n");<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_to_reply("Warning: 399 $Ri - R1 -
              Registration failed: fail in relay in R10.\r\n");<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_reply_error();<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
            </font><font size="+0"><span class="104092018-15022011"><font
                  color="#0000ff" face="Arial" size="2"><br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!is_avp_set("$avp(reg_contact)")) <span
                    style="background-color: rgb(255, 255, 255);"></span><br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_ERR", "R1 - not set the
                  reg_contact4 F=$fu T=$tu Ct=$ct IP=$si CI=$ci
                  var_contact:$var(reg_contact)\n");<br>
                  <br>
                </font></span></font><font color="#0000ff" face="Arial"
              size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_ERR", "R1 - Saving
              Registration-2&nbsp; save to location F=$fu T=$tu Ct=$ct IP=$si
              CI=$ci reg_ct:$avp(reg_contact)\n");<br>
            </font></div>
          <div dir="ltr" align="left">&nbsp;</div>
          <div><font color="#0000ff" face="Arial" size="2">&nbsp;<span
                class="104092018-15022011">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;if(!isflagset(28)
              &amp;&amp; is_avp_set("$avp(reg_contact)")) # Check if we
              need to save it in location table<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!save("location","0x02"))<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_ERR", "R1 - Location save for
              Registration failed - M=$rm F=$fu T=$tu IP=$si CT=$ct\n");<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
            </font></div>
          <div dir="ltr" align="left">&nbsp;</div>
          <div dir="ltr" align="left"><span class="104092018-15022011"><font
                color="#0000ff" face="Arial" size="2">LOGS for the error
                condtion.</font></span></div>
          <div dir="ltr" align="left"><span class="104092018-15022011"></span>&nbsp;</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 class="moz-txt-link-freetext" href="sip:5614510478@10.235.86.54:5060;transport=UDP">sip:5614510478@10.235.86.54:5060;transport=UDP</a>
                T=<a class="moz-txt-link-freetext" href="sip:5614510478@10.235.86.54:5060;transport=UDP">sip:5614510478@10.235.86.54:5060;transport=UDP</a> Ct=&lt;<a
                  moz-do-not-send="true"
                  href="http://sip:5614510478@10.235.204.5:5060">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
                class="104092018-15022011"><font face="Arial" size="2"><font
                    color="#800080">&lt;<a moz-do-not-send="true"
                      href="http://sip:5614510478@10.235.204.5:5060">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&nbsp; save to location
              F=<a class="moz-txt-link-freetext" href="sip:5614510478@10.235.86.54:5060;transport=UDP">sip:5614510478@10.235.86.54:5060;transport=UDP</a>
              T=<a class="moz-txt-link-freetext" href="sip:5614510478@10.235.86.54:5060;transport=UDP">sip:5614510478@10.235.86.54:5060;transport=UDP</a> Ct=&lt;<a
                moz-do-not-send="true"
                href="http://sip:5614510478@10.235.204.5:5060">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
            moz-do-not-send="true" href="mailto:miconda@gmail.com">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 class="h5"><br>
                <br>
                On 2/16/11 1:17 AM, Jijo wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5">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).&nbsp; 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 moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></pre>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>