<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    from your config snippets I don't figure out what version are you
    using and what flavour, does not look like latest ser or kamailio,
    and they are not relevant for troubleshooting.<br>
    <br>
    Maybe you want to start with the default config, for kamailio flavor
    there is a tutorial to install it from git and enable
    authentication:<br>
    <br>
<a class="moz-txt-link-freetext" href="http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git">http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git</a><br>
    <br>
    Then, if you look in kamailio.cfg, you see option to enable other
    features like nat traversal, presence, etc...<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    On 9/29/11 12:09 AM, JJ Zeng wrote:
    <blockquote
      cite="mid:DCA235014819F44EB0404FE7112DFFA5BB41C8@DLB-EX1.dlb.local"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Cambria;
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">Thanks
            Daniel.&nbsp; I got it basically working with the following
            config.&nbsp; But there is one last bug.&nbsp; If client B connected
            and registered, then disconnected without proper unregister,
            it seems the location table didn&#8217;t get prompt update.&nbsp; If
            client A sends Invite right after that,&nbsp; the sip server will
            try to connect to B(which will surely fail since B is behind
            the firewall), instead of sending 480 to A right away.&nbsp; Is
            there a way to fix this?<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">Thanks.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">JJ<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">if
            (is_method("REGISTER"))<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            # authenticate the REGISTER requests (uncomment to enable
            auth)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            if (!www_authorize("", "subscriber"))<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www_challenge("", "0");<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            exit;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            }<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            if (!db_check_to())<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            sl_send_reply("403","Forbidden auth ID");<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            exit;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            }<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            if (!save("location", "m"))<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            sl_reply_error();<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            exit;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            }<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            if (!lookup("location")) {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            #if (!registered("location")) {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            sl_send_reply("480","Not Found");<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            exit;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            }<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            if (!registered("location")) {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            sl_send_reply("480","Not Found");<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            exit;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            }<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            if(!t_relay()) {<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            sl_send_reply("500", "relaying failed");<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            }<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            exit;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:windowtext">From:</span></b><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;;color:windowtext">
                Daniel-Constantin Mierla [<a class="moz-txt-link-freetext" href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a>]
                <br>
                <b>Sent:</b> Wednesday, September 28, 2011 2:49 AM<br>
                <b>To:</b> SIP Router - Kamailio (OpenSER) and SIP
                Express Router (SER) - Users Mailing List<br>
                <b>Cc:</b> JJ Zeng<br>
                <b>Subject:</b> Re: [SR-Users] simple question but can't
                find the answer<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">Hello,<br>
            <br>
            On 9/28/11 2:43 AM, JJ Zeng wrote: <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">Hi,<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">&nbsp;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">I
            am really new to ser(just installed it today).&nbsp; My situation
            is here:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">&nbsp;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">Both
            A and B make tcp connection to ser proxy server.&nbsp; If A sends
            &#8220;Invite&#8221; to B, ser would look up the tcp connection of B,
            and relay the sip request.&nbsp; If B is not connected, then 480
            is returned to A.&nbsp; When B sends back the response, ser would
            relay &nbsp;it to A.&nbsp;
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">&nbsp;<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">It
            looks really simple, but I just can&#8217;t figure out how to do
            it.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">what
            default config file you started with?<br>
            <br>
            Apart of that when the user is not online, the default
            config replies with 404 Not Found, the relaying between
            phones when they are online is done there, being a
            combination of calling function from registrar and tm
            modules. So, if you start with the default config, no matter
            is Kamailio or SER flavour, routing of the calls between
            online users is provided there, just go through it in order
            to understand better.<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <br>
            <o:p></o:p></span></p>
        <pre><span style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">-- <o:p></o:p></span></pre>
        <pre><span style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">Daniel-Constantin Mierla -- <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></span></pre>
        <pre><span style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;">Kamailio Advanced Training, Oct 10-13, Berlin: <a moz-do-not-send="true" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a><o:p></o:p></span></pre>
        <pre><span style="font-size:14.0pt;font-family:&quot;Cambria&quot;,&quot;serif&quot;"><a moz-do-not-send="true" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" href="http://twitter.com/miconda">http://twitter.com/miconda</a><o:p></o:p></span></pre>
      </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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>