<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Will,<br>
      It sounds like your kamailio.cfg is not looking up the user
      location database before trying to relay the INVITE.  There is a
      relevant section in the kamailio-basic.cfg example configuration
      file:<br>
      <br>
              <br>
      <blockquote>
        <pre>request_route {
        ...

        # user location service
        route(LOCATION);
}
 
...

# USER location service
route[LOCATION] {
        if (!lookup("location")) {
                $var(rc) = $rc;
                t_newtran();
                switch ($var(rc)) {
                        case -1:
                        case -3:
                                send_reply("404", "Not Found");
                                exit;
                        case -2:
                                send_reply("405", "Method Not Allowed");
                                exit;
                }
        }

        # when routing via usrloc, log the missed calls also
        if (is_method("INVITE")) {
                setflag(FLT_ACCMISSED);
        }

        route(RELAY);
        exit;
}


</pre>
      </blockquote>
      The logic is that if the call is for a local registered user whose
      location is available in the "kamctl ul"  then request_route()
      should pass the request to the route(LOCATION) routine.  The
      function call lookup("location") then does the magic if matching
      the address of record ([subscriber_name]@[our_domain_name]) and
      returning the $ruri of the registered phone ([realid]@[realip]). 
      route(RELAY) is then able to send the call on to the phone's
      actual IP address.<br>
      <br>
      Hope that helps.<br>
      <br>
      Paul Smith<br>
      <pre class="moz-signature" cols="72">
</pre>
      On 02/10/14 03:33, Will Ferrer wrote:<br>
    </div>
    <blockquote
cite="mid:CA+pifNQye+MChEuHSk32AHdZb6d6aKe1a6ZX63AqJcvPpKyC4A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi
        <div><br>
        </div>
        <div>I was wondering if any one had any advice or examples for
          me of how to get a call to be routed to a subscribed
          softphone.</div>
        <div><br>
        </div>
        <div>We have 2 boxes in our testing deployment, a load balancer
          / sbc and a call processing box.</div>
        <div><br>
        </div>
        <div>Calls come in to the sbc, and then are passed to the call
          processing box. The call is analyzed and the branch uri is
          rewritten to a destination address when applicable for the
          call (this is how we handle routing of calls to certain
          numbers -- we do this utilizing custom code and a custom db).</div>
        <div><br>
        </div>
        <div>This works just fine when the destination sip uri is phone
          number (in which case we do lcr) or if the destination goes to
          a remote address.</div>
        <div><br>
        </div>
        <div>However when the destination is a subscriber:
          sip:[subscriber_name]@[our_domain_name], the call is passed
          back to the sbc, which passes it to the callprocessing box,
          back and forth until a too many hops error occurs.</div>
        <div><br>
        </div>
        <div>The subscriber I am trying to send the call too does show
          up under "kamctl ul show".</div>
        <div><br>
        </div>
        <div>I feel like there is something basic I must be missing
          here.</div>
        <div><br>
        </div>
        <div>Does any one have any advice for me?</div>
        <div><br>
        </div>
        <div>Thank you very much in advance.</div>
        <div><br>
        </div>
        <div>All the best.</div>
        <div><br>
        </div>
        <div>Will Ferrer</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>