<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi Vlad,</div><div><br></div><div>I inserted t_relay after my functions, sip INFO, BYE work well. But, the 200 OK message is still repeat, I try call from some other PCs and it same.</div><div><br></div><div>Regards,</div><div>Khue Nguyen.</div><div><br></div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Vlad Paiu &lt;vladpaiu@opensips.org&gt;<br><b><span style="font-weight: bold;">To:</span></b> users@lists.opensips.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, September 15, 2011 3:03 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [OpenSIPS-Users] error when
 use function t_relay<br></font><br><div id="yiv2022301877">

  

    
    <title></title>
  
  
    Hello,<br>
    <br>
    t_relay() is in charge of applying all the message changes and
    sending the message out.<br>
    After it, you cannot do any other processing. Why not just revert
    the order, like :<br>
    <br>
    <div>if (is_method("INFO")){<span class="yiv2022301877Apple-style-span" style="
background-color:rgb(0, 0, 0);"></span><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"><br>
      </span>process_info_msg();<br>
      <div><span class="yiv2022301877Apple-tab-span" style="
white-space:pre;"> </span>t_relay(); </div>
    </div>
    <div>}<br>
      <br>
      Regards,<br>
    </div>
    <pre class="yiv2022301877moz-signature">Vlad Paiu
OpenSIPS Developer</pre>
    <br>
    On 09/15/2011 07:13 AM, nguyen khue wrote:
    <blockquote type="cite">
      <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; ">
        <div><span>Hi all,</span></div>
        <div><span><br>
          </span></div>
        <div><span>I still cannot resolve this problem. Can you help me?</span></div>
        <div><span><br>
          </span></div>
        <div><span>Thank you very much</span></div>
        <div><span>Khue Nguyen.</span></div>
        <div><br>
        </div>
        <div style="font-size: 12pt; font-family: times, serif; ">
          <div style="font-size: 12pt; font-family: times, serif; "><font face="Arial" size="2">
              <hr size="1"><b><span style="font-weight:bold;">From:</span></b>
              nguyen khue <a rel="nofollow" class="yiv2022301877moz-txt-link-rfc2396E" ymailto="mailto:minhkhue49da@yahoo.com" target="_blank" href="mailto:minhkhue49da@yahoo.com">&lt;minhkhue49da@yahoo.com&gt;</a><br>
              <b><span style="font-weight:bold;">To:</span></b>
              <a rel="nofollow" class="yiv2022301877moz-txt-link-rfc2396E" ymailto="mailto:users@lists.opensips.org" target="_blank" href="mailto:users@lists.opensips.org">"users@lists.opensips.org"</a>
              <a rel="nofollow" class="yiv2022301877moz-txt-link-rfc2396E" ymailto="mailto:users@lists.opensips.org" target="_blank" href="mailto:users@lists.opensips.org">&lt;users@lists.opensips.org&gt;</a><br>
              <b><span style="font-weight:bold;">Sent:</span></b>
              Tuesday, September 13, 2011 11:19 AM<br>
              <b><span style="font-weight:bold;">Subject:</span></b>
              [OpenSIPS-Users] error when use function t_relay<br>
            </font><br>
            <div id="yiv2022301877">
              <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: times, serif; ">
                <div>Hi all,</div>
                <div><br>
                </div>
                <div>I have a module to process SIP message (INVITE,
                  INFO, 200 OK, BYE). I have use t_relay function to
                  capture 200 OK message in block onreply_route. But,
                  After I use t_relay function, INFO, BYE, some ACKs
                  messages cannot route to destination. If I insert some
                  t_relay function in config file, it work normal.</div>
                <div><br>
                </div>
                <div>ex:</div>
                <div>if (is_method("INFO")){</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>t_relay(); &nbsp;/<span class="yiv2022301877Apple-style-span" style="background-color:rgb(0, 0, 0);">/ </span><b><i style="background-color:rgb(255, 255, 255);">if
                      this function is missing, the SIP INFO cannot
                      reach the destination</i></b></div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"><br>
                  </span>process_info_msg();</div>
                <div>}</div>
                <div>.</div>
                <div>.</div>
                <div>.</div>
                <div><br>
                </div>
                <div>route[1]{</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> t_on_branch("2");<br>
                    t_on_failure("1");<br>
                    t_on_reply("2");</span></div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>process_invite_msg();</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>if ($fU == xxxx){</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>load_balance("1","transc");</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>}</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>else {</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>load_balance("2","transc");</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>}</div>
                <div>
                  <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>if(!t_relay()){</div>
                  <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>sl_reply_error():</div>
                  <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>}</div>
                </div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"><br>
                  </span>exit;</div>
                <div>}</div>
                <div><br>
                </div>
                <div>onreply_route[2]{</div>
                <div><span class="yiv2022301877Apple-tab-span" style="white-space:pre;"> </span>process_ok_msg();<br>
                  }</div>
                <div><br>
                </div>
                <div>I using opensips-1.6.2. My module is : kapanga
                  -&gt; opensips -&gt; asterisk. Kapanga and Asterisk
                  don't register to opensips.</div>
                <div>Please help me resolve this problem.</div>
                <div><br>
                </div>
                <div>Thank you very much</div>
                <div>Khue Nguyen.</div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a rel="nofollow" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a rel="nofollow" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
            <br>
          </div>
        </div>
      </div>
      <pre><fieldset class="yiv2022301877mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a rel="nofollow" class="yiv2022301877moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a rel="nofollow" class="yiv2022301877moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  

</div><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" 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><br></div></div></div></body></html>