Hello Nick,<div><br></div><div>You need to find out what has failed. I suggest you try these steps:</div><div><br></div><div>1- Register from both clients. Then query the location table in the DB to make sure they both are registered. Something like this: select * from location;</div>
<div><br></div><div>2- If they both are not registered, then you need to look at the opensips log either in /var/log/messages or /var/log/opensips.log based on how you have the logging setup. Make sure you have the logging enabled though. Set debug=6 in your opensips.cfg file.</div>
<div><br></div><div>3- If they both are registered, make a call and then look at the opensips logs. In the logs you should be able to see at what point it failed and what the reason was. I also recommend to add your own xlog messages in your script (opensips.cfg) to have a better handle on the message flow.</div>
<div><br></div><div>Are your clients registering over UDP or TCP? This setup would only work with UDP. </div><div><br></div><div>Regards,</div><div>Ali Pey</div><div><br></div><div><br><div class="gmail_quote">On Thu, Jul 12, 2012 at 4:43 AM, Nick Chang <span dir="ltr">&lt;<a href="mailto:nick.chang@kland.com.tw" target="_blank">nick.chang@kland.com.tw</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="ZH-TW" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hello Ali<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I try save location after register.</span><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Please saw this config. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">But, It still failed.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Can you give me a suggest??<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks for your help.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Nick<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if (is_method(&quot;REGISTER&quot;)) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        www_challenge(&quot;&quot;, &quot;0&quot;);<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">save(“location”);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        exit;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                }<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                if (!db_check_to()) {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        send_reply(&quot;403&quot;,&quot;Forbidden auth ID&quot;);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                if (isflagset(5)) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        setbflag(6);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        setbflag(7);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                };<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                if (!save(&quot;location&quot;))<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        sl_reply_error();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if ($rU==NULL) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                send_reply(&quot;484&quot;,&quot;Address Incomplete&quot;);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        alias_db_lookup(&quot;dbaliases&quot;);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if(!dp_translate(&quot;0&quot;,&quot;$ruri.user/$ruri.user&quot;)){<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                send_reply(&quot;420&quot;, &quot;Invalid Destination&quot;);<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        xlog(&quot;$avp(dest)&quot;);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        $avp(callee) = $ru;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if ($avp(dest)==&quot;usrloc&quot;) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                #Route to usrloc<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                route(user_location);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        send_reply(&quot;420&quot;, &quot;Invalid Extension&quot;);<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">}<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">route[generic_relay] {<u></u><u></u></span></p><div class="im"><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if (subst_uri(&#39;/((<a>sip:.*)||(sip:.*:.*));nat=yes/\1/&#39;))</a>{<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                setbflag(6);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        };<u></u><u></u></span></p>
</div><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if (isflagset(5)||isbflagset(6)) {<u></u><u></u></span></p><div class="im"><p class="MsoNormal">
<span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                route(nat_fixups);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        };<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if (!t_relay()) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                sl_reply_error();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        };<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        exit;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">}<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">route[user_location]{<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        if (!lookup(&quot;location&quot;, &quot;m&quot;)) {<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                switch ($retcode) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        case -1:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        case -3:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                                t_newtran();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                                send_reply(&quot;404&quot;, &quot;Not Found&quot;);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                                exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                        case -2:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                                send_reply(&quot;405&quot;, &quot;Method Not Allowed&quot;);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                                exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        }<u></u><u></u></span></p></div><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        setflag(2); <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        t_on_failure(&quot;user_failure&quot;);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">        route(generic_relay);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">}<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">}<u></u><u></u></span></p>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>