Hi, I place my xml response generator directory.php under /var/www/fs/directory.php In my xml_curl_conf.xml, I have <binding name="directory fetcher"> <param name="gateway-url" value="http://localhost/fs/" bindings="directory.php"/> </binding> 2008-04-18 22:23:17 [ERR] mod_xml_curl.c:251 do_config() Binding has no url! 2008-04-18 22:23:17 [NOTICE] mod_xml_curl.c:273 do_config() Binding [directory fetcher] XML Fetch Function [http://localhost/fs/] [directory.php] 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_xml_curl] 2008-04-18 22:23:17 [NOTICE] switch_loadable_module.c:245 switch_loadable_module_process() Adding API Function 'xml_curl' 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_cdr_csv] 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_event_socket] 2008-04-18 22:23:17 [NOTICE] switch_loadable_module.c:225 switch_loadable_module_process() Adding Application 'socket' 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_iax] 2008-04-18 22:23:17 [NOTICE] switch_loadable_module.c:139 switch_loadable_module_process() Adding Endpoint 'iax' 2008-04-18 22:23:17 [NOTICE] sofia.c:1373 config_sofia() Adding Alias [ 192.168.1.104] for profile [default] 2008-04-18 22:23:17 [NOTICE] sofia.c:1383 config_sofia() Started Profile default [sofia_reg_default] 2008-04-18 22:23:17 [NOTICE] switch_scheduler.c:166 switch_scheduler_task_thread() Starting task thread 2008-04-18 22:23:17 [NOTICE] sofia.c:1383 config_sofia() Started Profile nat [sofia_reg_nat] 2008-04-18 22:23:18 [ERR] mod_xml_curl.c:190 xml_url_fetch() Received HTTP error 404 trying to fetch http://localhost/fs/ data: [hostname=ser§ion=directory&tag_name=domain&key_name=name&key_value=192.168.1.104&domain= 192.168.1.104] <.....> freeswitch@ser> 2008-04-18 22:24:26 [ERR] mod_xml_curl.c:190 xml_url_fetch() Received HTTP error 404 trying to fetch http://localhost/fs/ data: [hostname=ser§ion=directory&tag_name=domain&key_name=name&key_value=192.168.1.104&action=sip_auth&sip_profile=default&sip_user_agent=Linksys/SPA3102-3.3.6(GW)&sip_auth_username=1006&sip_auth_realm=192.168.1.104&sip_auth_nonce=25f4793c-0d53-11dd-bc54-07f6ea524331&sip_auth_uri=sip%3A192.168.1.104&sip_auth_qop=auth&sip_auth_cnonce=36fbccf&sip_auth_nc=00000001&sip_auth_response=e55890e6e780c28aa2ac5487c3e75905&sip_auth_method=REGISTER&key=id&user=1006&domain=192.168.1.104&ip= 192.168.1.103] 2008-04-18 22:24:26 [ERR] mod_xml_curl.c:190 xml_url_fetch() Received HTTP error 404 trying to fetch http://localhost/fs/ data: [hostname=ser§ion=directory&tag_name=domain&key_name=name&key_value=192.168.1.104&action=sip_auth&sip_profile=default&sip_user_agent=Linksys/SPA3102-3.3.6(GW)&sip_auth_username=1007&sip_auth_realm=192.168.1.104&sip_auth_nonce=25fd93f0-0d53-11dd-bc54-07f6ea524331&sip_auth_uri=sip%3A192.168.1.104&sip_auth_qop=auth&sip_auth_cnonce=d14a908&sip_auth_nc=00000001&sip_auth_response=b1c78c65639c34ad74af62d8d5f9cd7e&sip_auth_method=REGISTER&key=id&user=1007&domain=192.168.1.104&ip= 192.168.1.103] I think this may just be a very minor error in my setup. Can someone please tell me what I did wrong? Thank you very much in advance for your help. Pete
Hi, I changed gateway-url to <binding name="directory fetcher"> <param name="gateway-url" value="http://localhost/fs/directory.php" bindings="directory."/> </binding> then the error messages go away. However, I am still not able to authenticate user. I can see the response in the /tmp directory, but the result is not right. So, I am suspecting that the info pass is not sufficient for generating the directory xml. Is there anyway to see the HTTP request and response from the console? I turned on curl_xml debug_on but still it does not show. Any inputs will be greatly appreciated. Thanks, Pete On Fri, Apr 18, 2008 at 2:28 PM, Pete Kay <petedao@gmail.com> wrote:
Hi,
I place my xml response generator directory.php under /var/www/fs/directory.php
In my xml_curl_conf.xml, I have
<binding name="directory fetcher"> <param name="gateway-url" value="http://localhost/fs/" bindings="directory.php"/> </binding>
2008-04-18 22:23:17 [ERR] mod_xml_curl.c:251 do_config() Binding has no url! 2008-04-18 22:23:17 [NOTICE] mod_xml_curl.c:273 do_config() Binding [directory fetcher] XML Fetch Function [http://localhost/fs/] [directory.php] 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_xml_curl] 2008-04-18 22:23:17 [NOTICE] switch_loadable_module.c:245 switch_loadable_module_process() Adding API Function 'xml_curl' 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_cdr_csv] 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_event_socket] 2008-04-18 22:23:17 [NOTICE] switch_loadable_module.c:225 switch_loadable_module_process() Adding Application 'socket' 2008-04-18 22:23:17 [CONSOLE] switch_loadable_module.c:749 switch_loadable_module_load_file() Successfully Loaded [mod_iax] 2008-04-18 22:23:17 [NOTICE] switch_loadable_module.c:139 switch_loadable_module_process() Adding Endpoint 'iax' 2008-04-18 22:23:17 [NOTICE] sofia.c:1373 config_sofia() Adding Alias [ 192.168.1.104] for profile [default] 2008-04-18 22:23:17 [NOTICE] sofia.c:1383 config_sofia() Started Profile default [sofia_reg_default] 2008-04-18 22:23:17 [NOTICE] switch_scheduler.c:166 switch_scheduler_task_thread() Starting task thread 2008-04-18 22:23:17 [NOTICE] sofia.c:1383 config_sofia() Started Profile nat [sofia_reg_nat] 2008-04-18 22:23:18 [ERR] mod_xml_curl.c:190 xml_url_fetch() Received HTTP error 404 trying to fetch http://localhost/fs/ data: [hostname=ser§ion=directory&tag_name=domain&key_name=name&key_value=192.168.1.104&domain= 192.168.1.104] <.....>
freeswitch@ser> 2008-04-18 22:24:26 [ERR] mod_xml_curl.c:190 xml_url_fetch() Received HTTP error 404 trying to fetch http://localhost/fs/ data: [hostname=ser§ion=directory&tag_name=domain&key_name=name&key_value=192.168.1.104&action=sip_auth&sip_profile=default&sip_user_agent=Linksys/SPA3102-3.3.6(GW)&sip_auth_username=1006&sip_auth_realm=192.168.1.104&sip_auth_nonce=25f4793c-0d53-11dd-bc54-07f6ea524331&sip_auth_uri=sip%3A192.168.1.104&sip_auth_qop=auth&sip_auth_cnonce=36fbccf&sip_auth_nc=00000001&sip_auth_response=e55890e6e780c28aa2ac5487c3e75905&sip_auth_method=REGISTER&key=id&user=1006&domain=192.168.1.104&ip= 192.168.1.103] 2008-04-18 22:24:26 [ERR] mod_xml_curl.c:190 xml_url_fetch() Received HTTP error 404 trying to fetch http://localhost/fs/ data: [hostname=ser§ion=directory&tag_name=domain&key_name=name&key_value=192.168.1.104&action=sip_auth&sip_profile=default&sip_user_agent=Linksys/SPA3102-3.3.6(GW)&sip_auth_username=1007&sip_auth_realm=192.168.1.104&sip_auth_nonce=25fd93f0-0d53-11dd-bc54-07f6ea524331&sip_auth_uri=sip%3A192.168.1.104&sip_auth_qop=auth&sip_auth_cnonce=d14a908&sip_auth_nc=00000001&sip_auth_response=b1c78c65639c34ad74af62d8d5f9cd7e&sip_auth_method=REGISTER&key=id&user=1007&domain=192.168.1.104&ip= 192.168.1.103]
I think this may just be a very minor error in my setup. Can someone please tell me what I did wrong?
Thank you very much in advance for your help.
Pete
Hi,
From the debug file created by fs , I can see the response as follows:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="directory" description="Directory For FreeSwitch"> <domain name="192.168.1.102"> <user id="1001"> <params> <param password="1234"/> </params> </user> </domain> </section> </document> But it still does not authenticate my user. Why? I have checked the format which is same as the one in the wiki doc. Thanks, Pete
Hi, It seems like the reloadxml function in fs still requires the server to restart to take effect of new update. Is it the case or it is just my set up problem? Sorry to ask again. I am getting a bit frustrated. I can login now, but the user_context info does not get set. The following user is still using the default context instead of the home context as I specified in the xml. How come? <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="directory" description="Directory For FreeSwitch"> <domain name="192.168.1.102"> <user id="1001"> <params> <param name="password" value="1234"/> </params> <variables> <variable name="user_context" value="home"/> </variables> </user> </domain> </section> </document> When making call, it still uses the default context instead of the home context specified: 2008-04-19 01:29:38 [DEBUG] switch_core_state_machine.c:65 switch_core_standard_on_ring() Standard RING sofia/default/ 1001@192.168.1.104:5060 2008-04-19 01:29:38 [INFO] mod_dialplan_xml.c:223 dialplan_hunt() Processing 1001->8661382345448@default Any inputs will be greatly appreciated. Regards, Pete
I see why its doing this now. If you were not doing this all on the same machine you would never see this issue. I recommend you not do that anyway because that isn't the normal use case but we'll see if we can patch this today to allow you to do that. /b On Apr 18, 2008, at 4:26 AM, Pete Kay wrote:
When making call, it still uses the default context instead of the home context specified:
2008-04-19 01:29:38 [DEBUG] switch_core_state_machine.c:65 switch_core_standard_on_ring() Standard RING sofia/default/1001@192.168.1.104 :5060 2008-04-19 01:29:38 [INFO] mod_dialplan_xml.c:223 dialplan_hunt() Processing 1001->8661382345448@default
Any inputs will be greatly appreciated.
Brian West sip:brian@freeswitch.org
participants (2)
-
Brian West
-
Pete Kay