<div>I am jumping in here because I am concerned that my browser will crash if this thread gets any bigger:</div><div><br></div>Perhaps if you change your point of view you will find it faster.<div>You have multiple accounts from other users that it works, but i get the feeling you believe in the back of your mind that it's broken somehow. If you change your mindset to "I know I am doing something wrong and all I need to do is figure out what it is", probably you will be able to spot the mistake easier. </div>
<div><br></div><div>Thank you everyone who has helped here.</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Mon, May 24, 2010 at 3:47 PM, Erwin Davis <span dir="ltr"><<a href="mailto:davis.erwin@gmail.com">davis.erwin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br> Can anyone post a xml log file when you turn on "xml_curl debug_on"? I hope to compare with the my log file with a valid one? Thanks,<br>
<br>Regards,<br><font color="#888888"><br>e</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Mon, May 24, 2010 at 3:45 PM, Vitalii Colosov <span dir="ltr"><<a href="mailto:vetali100@gmail.com" target="_blank">vetali100@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div>Sorry, I never used rubby, no help from my side here...</div><div><br></div><div>This is my XML response, it's not so long to put it in pastebin, also I never used pastebin yet:</div>
<div><div></div><div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div>
<?xml version="1.0" encoding="UTF-8" standalone="no"?></div><div style="color:rgb(80, 0, 80)"><div><document type="freeswitch/xml"></div><div> <section name="directory"></div>
</div><div> <domain name="$${domain}"></div><div> <params></div><div> <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/></div>
<div> </params></div><div style="color:rgb(80, 0, 80)"><div> <groups></div><div> <group name="default"></div><div> <users></div></div><div> <user id="1000"></div>
<div> <params></div><div> <param name="a1-hash" value="somehashvalue"/></div><div> <param name="vm-a1-hash" value="somehashvalue"/></div>
<div> </params></div><div> <variables></div><div> <variable name="user_context" value="default"/></div><div> <variable name="accountcode" value="1000"/></div>
<div> </variables></div><div style="color:rgb(80, 0, 80)"><div> </user></div><div> </users></div><div> </group></div><div> </groups></div>
<div> </domain></div><div> </section></div><div></document></div></div></span></div><div><br></div><div>Regards,</div></div></div><div>Vitalie<br><div><div></div><div><br><div class="gmail_quote">
2010/5/24 Erwin Davis <span dir="ltr"><<a href="mailto:davis.erwin@gmail.com" target="_blank">davis.erwin@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Hi, Vitalli,<br><br>Thanks for your PHP code. Unfortunately, I can't run that code because my project is in rails. <br>
But I didnot see the difference between you code and mine. What does the xml log file look like when you turn on "xml_curl debug_on"? Could you cut and paste them into freeswitch pastebin? <br>
<br>My code is cloned from <a href="http://wiki.freeswitch.org/wiki/Mod_xml_curl_Ruby_directory_example" target="_blank">http://wiki.freeswitch.org/wiki/Mod_xml_curl_Ruby_directory_example</a>. I am not sure that the xml output may cause some problem. <br>
<br>When I type "find_use_xml id 1018 192.168.1.31", the FS ignored the response from web server. Instead, it retrieve the info from the local directory.<br><br><a href="mailto:freeswitch@proxy1.voiceserver.com" target="_blank">freeswitch@proxy1.voiceserver.com</a>> find_user_xml id 1018 192.168.1.31<br>
2010-05-24 15:12:12.239449 [CONSOLE] mod_xml_curl.c:299 XML response is in /usr/local/freeswitch/<div>scripts803ca405-c463-4deb-8121-982e1251831a.tmp.xml<br>
API CALL [find_user_xml(id 1018 192.168.1.31)] output:<br><user id="1018"><br> <params><br> <param name="password" value="1234"></param> <<<<===== the server response with "1018", "1234" is the local default setting<br>
<br> <param name="vm-password" value="1018"></param><br>
<br> </params><br><br> <variables><br> <variable name="toll_allow" value="domestic,international,local"></variable><br><br> <variable name="accountcode" value="1018"></variable><div>
<br>
<br> <variable name="user_context" value="default"></variable><br><br></div> <variable name="effective_caller_id_name" value="Extension 1018"></variable><br>
<br> <variable name="effective_caller_id_number" value="1018"></variable><br><br> <variable name="outbound_caller_id_name" value="MyPBX"></variable><br>
<br> <variable name="outbound_caller_id_number" value="0000000000"></variable><br><br> <variable name="callgroup" value="techsupport"></variable><br>
<br> </variables><br><br> </user><br><br>Below is the rails code to output the xml response.<br></div>==============================================<br>========<br><br> def directory<br> <br> if params['user'].nil? || params['user'].empty?<br>
##if not looking for a user info, send 404 Not Found<br>
@out_xml = Output404NotFound()<br> else<br> @username = params['user'].to_s<br> puts "username = " + @username<br> @domain = params['domain'].to_s<br> puts params<br>
@dir=Directory.find_by_effective_caller_id_number(@username)<br> puts @dir<br> if @dir.nil? <br> @out_xml = Output404NotFound()<br> else <br> @out_xml = OutputXMLResponse()<br> end<br>
end<br> puts "reply for directory query: " + @out_xml + "\n" <br> end<br> <br>private <br> <br> def Output404NotFound<br> xml_text = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><br>
<document type=\"freeswitch/xml\"><br> <section name=\"result\"><br> <result status=\"not found\" /><br> </section><br>
</document> "<br> return xml_text<br> end<br> <br> def OutputXMLResponse<br> xml_text = <br><div> "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><br>
<document type=\"freeswitch/xml\"><br></div> <section name=\"directory\" description=\"User Directory\"><div><br> <domain name=\"#{@domain}\"> <br>
<params><br> <param name=\"dial-string\" value=\"{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}\"/><br>
</params><br> <br> <groups><br> <group name=\"default\"><br> <users><br>
</div>
<user id=\"#{@username}\"><br> <params><br> <param name=\"password\" value=\"" + @dir.password + "\"/><br>
</params><div><br> </user><br> </users><br> </group><br> </groups><br>
</domain><br> </section><br> </document> "<br></div> puts "reply for directory query: " + xml_text + "\n"<br> return xml_text<br> end<div>
<div></div><div><br>
<br> <br><br><div class="gmail_quote">On Mon, May 24, 2010 at 8:38 AM, Vitalii Colosov <span dir="ltr"><<a href="mailto:vetali100@gmail.com" target="_blank">vetali100@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Just to avoid any misunderstanding - this is to check all other things around freeswitch configuration.<div><br><div>If this will work, it will be very easy to add database lookup for the user trying to register:</div><div>
<br></div><div><br></div><div><div>$user = $_POST['user'];</div><div>$query="select password from your_users_table where user ='$user'";</div><div>$result=mysqli_query($db_connection, $query);</div>
<div><br></div><div>...get user and password from the result</div><div><br></div><div>And then use $user and $password variables instead of hard-coded "1018", "1018" in the code I provided.</div><div>
<br>
</div><div>Really hope this helps, it works for me.</div><div><br></div><div>Regards,</div><div>Vitalie</div><div><br></div><div><div></div><div><br><div class="gmail_quote">2010/5/24 Vitalii Colosov <span dir="ltr"><<a href="mailto:vetali100@gmail.com" target="_blank">vetali100@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Sorry there was an else related to the missing entry, i removed it.<div><br></div><div>Please try another one.<br>
<br>
<div class="gmail_quote">2010/5/24 Vitalii Colosov <span dir="ltr"><<a href="mailto:vetali100@gmail.com" target="_blank">vetali100@gmail.com</a>></span><div><div></div><div><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Please try to use my attached php script, if you can.<div><br></div><div>I changed it to fit your data (user 1018, pass: 1018), but I did not check for any syntax error (hope it does not have :-) ).</div>
<div><br></div><div>
Please reply back on result.</div><div><br></div><div>Regards,</div><div><br></div><div>Vitalie<div><div></div><div><br><br><div class="gmail_quote">2010/5/24 Erwin Davis <span dir="ltr"><<a href="mailto:davis.erwin@gmail.com" target="_blank">davis.erwin@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">yeah, my code replied with line 29-46. I donot know where the rest of html code was generated. <br>
<div><div></div><div>
<br><div class="gmail_quote">On Mon, May 24, 2010 at 10:34 AM, Milena <span dir="ltr"><<a href="mailto:testeador01@gmail.com" target="_blank">testeador01@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div>Hello,</div>You're not meant to send a whole website full of html tags as a response.<div>
Just reply the part of the lines 29 - 46 on your pastebin and get rid of the rest.</div><div><br><br><div class="gmail_quote">
2010,</div><div class="gmail_quote">/5/24 Erwin Davis <span dir="ltr"><<a href="mailto:davis.erwin@gmail.com" target="_blank">davis.erwin@gmail.com</a>></span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Hi, I am stuck, My console log is in <a href="http://pastebin.freeswitch.org/13030" target="_blank">http://pastebin.freeswitch.org/13030</a> and my xml log is in <a href="http://pastebin.freeswitch.org/13029" target="_blank">http://pastebin.freeswitch.org/13029</a>. I guess that the problem should be pretty small but I just can not figure it out. -:( Thanks for your help.<br>
<br><div class="gmail_quote"><div><div></div><div>On Mon, May 24, 2010 at 8:12 AM, Vitalii Colosov <span dir="ltr"><<a href="mailto:vetali100@gmail.com" target="_blank">vetali100@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div><div></div><div>
Hi Erwin,<div>Maybe you need to add the first line <?xml version="1.0" encoding="UTF-8" standalone="no"?></div><div><br></div><div>This is what I have and it works perfectly, tested right now:</div>
<div><br></div><div><div><?xml version="1.0" encoding="UTF-8" standalone="no"?></div><div><div><document type="freeswitch/xml"></div><div> <section name="directory"></div>
</div><div> <domain name="$${domain}"></div><div> <params></div><div> <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/></div>
<div> </params></div><div><div> <groups></div><div> <group name="default"></div><div> <users></div></div><div> <user id="1000"></div>
<div> <params></div>
<div> <param name="a1-hash" value="somehashvalue"/></div><div> <param name="vm-a1-hash" value="somehashvalue"/></div><div> </params></div>
<div> <variables></div><div> <variable name="user_context" value="default"/></div><div> <variable name="accountcode" value="1000"/></div>
<div> </variables></div><div><div> </user></div><div> </users></div><div> </group></div><div> </groups></div><div> </domain></div>
<div> </section></div>
<div></document></div><div><br></div></div><div>Regards,</div><div>Vitalie</div></div>
<br></div></div><div>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></div></blockquote></div><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>