<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    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="yiv18936348Apple-style-span" style="background-color:
        rgb(0, 0, 0);"></span><span class="yiv18936348Apple-tab-span"
        style="white-space: pre;"><br>
      </span>process_info_msg();<br>
      <div><span class="yiv18936348Apple-tab-span" style="white-space:
          pre;"> </span>t_relay(); </div>
    </div>
    <div>}<br>
      <br>
      Regards,<br>
    </div>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer</pre>
    <br>
    On 09/15/2011 07:13 AM, nguyen khue wrote:
    <blockquote
      cite="mid:1316060027.5321.YahooMailNeo@web110015.mail.gq1.yahoo.com"
      type="cite">
      <div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
        255); font-family: times new roman,new york,times,serif;
        font-size: 12pt;">
        <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 new roman','new
          york',times,serif;">
          <div style="font-size: 12pt; font-family: 'times new
            roman','new york',times,serif;"><font face="Arial" size="2">
              <hr size="1"><b><span style="font-weight: bold;">From:</span></b>
              nguyen khue <a class="moz-txt-link-rfc2396E" href="mailto:minhkhue49da@yahoo.com">&lt;minhkhue49da@yahoo.com&gt;</a><br>
              <b><span style="font-weight: bold;">To:</span></b>
              <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org">"users@lists.opensips.org"</a>
              <a class="moz-txt-link-rfc2396E" 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="yiv18936348">
              <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>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="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>t_relay(); &nbsp;/<span
                    class="yiv18936348Apple-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="yiv18936348Apple-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="yiv18936348Apple-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="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>process_invite_msg();</div>
                <div><span class="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>if ($fU == xxxx){</div>
                <div><span class="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>load_balance("1","transc");</div>
                <div><span class="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>}</div>
                <div><span class="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>else {</div>
                <div><span class="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>load_balance("2","transc");</div>
                <div><span class="yiv18936348Apple-tab-span"
                    style="white-space: pre;"> </span>}</div>
                <div>
                  <div><span class="yiv18936348Apple-tab-span"
                      style="white-space: pre;"> </span>if(!t_relay()){</div>
                  <div><span class="yiv18936348Apple-tab-span"
                      style="white-space: pre;"> </span>sl_reply_error():</div>
                  <div><span class="yiv18936348Apple-tab-span"
                      style="white-space: pre;"> </span>}</div>
                </div>
                <div><span class="yiv18936348Apple-tab-span"
                    style="white-space: pre;"><br>
                  </span>exit;</div>
                <div>}</div>
                <div><br>
                </div>
                <div>onreply_route[2]{</div>
                <div><span class="yiv18936348Apple-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 moz-do-not-send="true"
              ymailto="mailto:Users@lists.opensips.org"
              href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              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>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>