<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello Mike,<br>
      <br>
      Instead of simply relaying initial INVITEs, you should also add
      some registrar logic. You need at least something like this:<br>
      <br>
      if (!lookup("location")) {<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply("404", "Not Found");<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
      }<br>
      <br>
      A successful registrar <b>lookup</b> will also rewrite the R-URI
      of your requests. Read more about it here [1].<br>
      <br>
      [1]:
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294027">http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294027</a><br>
      <br>
      Best regards,<br>
      <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 03/10/2014 12:03 PM, Mike Claudi Pedersen wrote:<br>
    </div>
    <blockquote
cite="mid:CADats6EDNRX+BCBia586Nci1phzEtzxSjd-8d6=L0Z5L+hRUBw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>im trying to establish connection between 2 phones</div>
        <div>user1: 43384001</div>
        <div>user2: 43384002</div>
        <div><br>
        </div>
        <div>i have user 2 added to usrloc with the cmd:</div>
        <div><br>
        </div>
        <div>
          <div>
            opensipsctl ul add 43384003 sip:+1043384003*<a
              moz-do-not-send="true" href="mailto:2776@voip.local.com">2776@voip.local.com</a></div>
        </div>
        <div>which is an asterisk server that handles calls in a
          specific way.</div>
        <div><br>
        </div>
        <div>but when i try to call i get "too many hops"</div>
        <div><br>
        </div>
        <div>this is my invite handling</div>
        <div><br>
        </div>
        <div>if (method=="INVITE")</div>
        <div>&nbsp; &nbsp; {</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; t_relay();</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; exit;</div>
        <div>&nbsp; &nbsp; };</div>
        <div><br>
        </div>
        <div>do i need some sort of line added to include using usrloc</div>
        -- <br>
        <div dir="ltr">Med venlig hilsen<br>
          ipnordic A/S<br>
          <div><br>
          </div>
          <div>Mike Claudi Pedersen</div>
          <div>Tekniker</div>
          <div>
            <div><br>
            </div>
            Telefon:&nbsp;<span
style="color:rgb(61,58,54);font-family:aller_lightregular,Arial,Helvetica,sans-serif">79301033</span><br>
            <a moz-do-not-send="true" href="http://www.ipnordic.dk/"
              style="color:rgb(17,85,204)" target="_blank">www.ipnordic.dk</a></div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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>
    <br>
  </body>
</html>