<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>The To header has no relevance in routing, only the address in
      the first line of the request (r-uri) really matters for initial
      requests.</p>
    <p>On the other hand, the error message you pasted below is related
      to nathelper.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 25.12.20 22:46, Syed Shahryar wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+mcf=s1jjWbbT2h9kCuz3vDMAJns82W2RCoY=Zhy3teMwm7AQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">My use case is such that I want to be able to send
        a SIP MESSAGE destined for a single username to multiple users.
        In order to be able to map that target username to multiple
        usernames, I tried using rtjson and evapi/http (to generate the
        routing json), but none of them worked.
        <div><br>
        </div>
        <div>Is it the right approach? Is there any other way to
          programmatically generate multiple targets for SIP request? I
          am familiar with dynamic routing but I need more flexibility.</div>
        <div><br>
        </div>
        <div>Initially, I tried sending the request to a different
          username but that didn't work and got the following message in
          the http async result route.</div>
        <div><br>
        </div>
        <div><font face="monospace">kamailio    | 19(25) ERROR:
            nathelper [nathelper.c:1461]: sdp_1918(): Unable to parse
            sdp body<br>
            kamailio    | 19(25) NOTICE: <core> [core/kemi.c:124]:
            sr_kemi_core_notice(): In evapi msg branch <br>
            kamailio    | 28(34) NOTICE: {2 6661 MESSAGE
            q6hikd6tumsr1dh35kvj} <core> [core/kemi.c:124]:
            sr_kemi_core_notice(): In evapi reply branch </font><br
            clear="all">
          <div><br>
          </div>
          <div>The message was received on the originally requested <font
              face="monospace">to</font> user and also <font
              face="monospace">$tu</font> still points to the original
            user instead of the new user even after executing the
            following code.</div>
          <div><br>
          </div>
          <font face="monospace">KSR.rtjson.init_routes(response);<br>
            KSR.rtjson.push_routes();<br>
          </font>
          <div><font face="monospace">KSR.nathelper.fix_nated_contact(); </font></div>
          <div><br>
          </div>
          <div>In http response, I receive the following and don't see
            any rtjson errors when <font face="monospace">init_routes</font>
            is executed on it.</div>
          <div><br>
          </div>
          <div><font face="monospace">{"version":"1.0","routing":"parallel","routes":[{"headers":{"from":{"display":"test_1","uri":"sip:<b>test_1</b>@<a
                href="http://test.com:9908" moz-do-not-send="true">test.com:9908</a>"},"to":{"display":"test_4","uri":"sip:<b>test_4</b>@<a
                href="http://test.com" moz-do-not-send="true">test.com</a>:</font>9908<span
              style="font-family:monospace">"},"extra":""},"branch_flags":8,"fr_timer":5000,"fr_inv_timer":30000}]}</span></div>
          <div><br>
          </div>
          <div>Please note that the request was sent to <b>test_2</b>@<a
              href="http://test.com" moz-do-not-send="true">test.com</a>.
            I have tried other combinations of above but nothing works.</div>
          <div><br>
          </div>
          <div>I have already searched on Google and read relevant
            articles and blog posts. </div>
          <div><br>
          </div>
          <div>Thanks</div>
          -- <br>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">--<br>
                  This message contains confidential information and is
                  intended only for the individual named. If you are not
                  the named addressee, you should not disseminate,
                  distribute or copy this email. Please notify the
                  sender immediately by email if you have received this
                  email by mistake and delete this email from your
                  system. Email transmission cannot be guaranteed to be
                  secure or error-free, as information could be
                  intercepted, corrupted, lost, destroyed, arrive late
                  or incomplete, or contain viruses. The sender,
                  therefore, does not accept liability for any errors or
                  omissions in the contents of this message which arise
                  as a result of email transmission. If verification is
                  required, please request a hard-copy version.<br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>