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"><<a href="mailto:nick.chang@kland.com.tw" target="_blank">nick.chang@kland.com.tw</a>></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:"Calibri","sans-serif";color:#1f497d">Hello Ali<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">I try save location after register.</span><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">Please saw this config. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">But, It still failed.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">Can you give me a suggest??<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">Thanks for your help.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">Nick<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (is_method("REGISTER")) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (!www_authorize("", "subscriber")) {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> www_challenge("", "0");<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">save(“location”);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (!db_check_to()) {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> send_reply("403","Forbidden auth ID");<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (isflagset(5)) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> setbflag(6);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> setbflag(7);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> };<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (!save("location"))<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> sl_reply_error();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if ($rU==NULL) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> send_reply("484","Address Incomplete");<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> alias_db_lookup("dbaliases");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if(!dp_translate("0","$ruri.user/$ruri.user")){<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> send_reply("420", "Invalid Destination");<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> xlog("$avp(dest)");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> $avp(callee) = $ru;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if ($avp(dest)=="usrloc") {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> #Route to usrloc<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> route(user_location);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> send_reply("420", "Invalid Extension");<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">}<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">route[generic_relay] {<u></u><u></u></span></p><div class="im"><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (subst_uri('/((<a>sip:.*)||(sip:.*:.*));nat=yes/\1/'))</a>{<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> setbflag(6);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> };<u></u><u></u></span></p>
</div><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1f497d"> route(nat_fixups);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> };<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (!t_relay()) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> sl_reply_error();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> };<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">}<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">route[user_location]{<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> if (!lookup("location", "m")) {<u></u><u></u></span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> switch ($retcode) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> case -1:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> case -3:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> t_newtran();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> send_reply("404", "Not Found");<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> case -2:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> send_reply("405", "Method Not Allowed");<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> exit;<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> }<u></u><u></u></span></p></div><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> setflag(2); <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> t_on_failure("user_failure");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d"> route(generic_relay);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";color:#1f497d">}<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif";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>