Hi, I am curious what HTTP status xml curl server must provide when no result is found for request with body <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document> I mean HTTP 200 or HTTP 404. My problem is the following: 1. When freeswitch gets 404 for directory request it reports error: [ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch 2. When freeswitch gets 200 with status "not found" on dialplan request failover to file xml config does not occure. Thank you in advance. -- С уважением, Владислав Захожай
"""If it receives a valid response from your web application, then it will load the configuration just like it would if you had put it into the FreeSWITCH Configuration File <https://wiki.freeswitch.org/wiki/Freeswitch.xml>. If it receives an invalid or 404 *not found* response, then it will attempt to look for the file on disk instead.""" """https://freeswitch.org/confluence/display/FREESWITCH/ mod_xml_curl#mod_xml_curl-Section:notfound""" https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl On 8 June 2017 at 11:07, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote:
Hi,
I am curious what HTTP status xml curl server must provide when no result is found for request with body
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document>
I mean HTTP 200 or HTTP 404.
My problem is the following:
1. When freeswitch gets 404 for directory request it reports error:
[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch
2. When freeswitch gets 200 with status "not found" on dialplan request failover to file xml config does not occure.
Thank you in advance.
-- С уважением, Владислав Захожай
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Sincerely, Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
Giovanni, thank you for your reply. Yes of course, I've read it. And the main question is - what is appropriate way to inform freeswitch with "not found". And once more why freeswitch treats 404 response as an error? E.g. freeswitch requests configuration for non-existent user. Here we have two options: 1. Freeswitch replies with XML not found and HTTP 200. Freeswitch understands it pretty correct and in logs I can see that freeswitch warns me it was not able to find user in some domain. This is ok and correct. 2. Freeswitch replies with XML not found and HTTP 404. Freeswitch reports an error. It do not wait HTTP 404 status code. And once more about p.2 from freeswitch's log: "[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch ....." 2017-06-08 12:18 GMT+03:00 Giovanni Maruzzelli <gmaruzz@gmail.com>:
"""If it receives a valid response from your web application, then it will load the configuration just like it would if you had put it into the FreeSWITCH Configuration File <https://wiki.freeswitch.org/wiki/Freeswitch.xml>. If it receives an invalid or 404 *not found* response, then it will attempt to look for the file on disk instead."""
"""https://freeswitch.org/confluence/display/FREESWITCH/mod_ xml_curl#mod_xml_curl-Section:notfound"""
https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl
On 8 June 2017 at 11:07, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote:
Hi,
I am curious what HTTP status xml curl server must provide when no result is found for request with body
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document>
I mean HTTP 200 or HTTP 404.
My problem is the following:
1. When freeswitch gets 404 for directory request it reports error:
[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch
2. When freeswitch gets 200 with status "not found" on dialplan request failover to file xml config does not occure.
Thank you in advance.
-- С уважением, Владислав Захожай
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
--
Sincerely,
Giovanni Maruzzelli OpenTelecom.IT cell: +39 347 266 56 18
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- С уважением, Владислав Захожай
Hi, The correct reply is HTTP 200. Any non 200 body is discarded by mod_xml_curl and triggers a failover to a backup url if you have defined one or the static conf. If the failover to static conf does not occur in your case with a 200 'not found' reply, you need to investigate why. Can you post any full debug log? Best Regards, -- Vallimamod Abdullah SIP Solutions VOIP Consulting vma@sipsolutions.fr .
On 8 Jun 2017, at 13:43, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote:
Giovanni, thank you for your reply.
Yes of course, I've read it. And the main question is - what is appropriate way to inform freeswitch with "not found". And once more why freeswitch treats 404 response as an error?
E.g. freeswitch requests configuration for non-existent user. Here we have two options: 1. Freeswitch replies with XML not found and HTTP 200. Freeswitch understands it pretty correct and in logs I can see that freeswitch warns me it was not able to find user in some domain. This is ok and correct.
2. Freeswitch replies with XML not found and HTTP 404. Freeswitch reports an error. It do not wait HTTP 404 status code.
And once more about p.2 from freeswitch's log:
"[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch ....."
2017-06-08 12:18 GMT+03:00 Giovanni Maruzzelli <gmaruzz@gmail.com>: """If it receives a valid response from your web application, then it will load the configuration just like it would if you had put it into the FreeSWITCH Configuration File. If it receives an invalid or 404 not found response, then it will attempt to look for the file on disk instead."""
"""https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl#mod_xml_cu..."""
https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl
On 8 June 2017 at 11:07, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote: Hi,
I am curious what HTTP status xml curl server must provide when no result is found for request with body
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document>
I mean HTTP 200 or HTTP 404.
My problem is the following:
1. When freeswitch gets 404 for directory request it reports error:
[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch
2. When freeswitch gets 200 with status "not found" on dialplan request failover to file xml config does not occure.
Thank you in advance.
-- С уважением, Владислав Захожай
Vallimamod, Thank you for you clear answer. I appreciate that. I though that 200 "not found" is correct but I had some doubts. You cleared out this question for me. I'll play with dialplan and failover to XML static config little bit later and give you feedback. 2017-06-08 15:53 GMT+03:00 Vallimamod Abdullah <vma@vallimamod.org>:
Hi,
The correct reply is HTTP 200. Any non 200 body is discarded by mod_xml_curl and triggers a failover to a backup url if you have defined one or the static conf.
If the failover to static conf does not occur in your case with a 200 'not found' reply, you need to investigate why. Can you post any full debug log?
Best Regards, -- Vallimamod Abdullah SIP Solutions VOIP Consulting vma@sipsolutions.fr .
On 8 Jun 2017, at 13:43, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote:
Giovanni, thank you for your reply.
Yes of course, I've read it. And the main question is - what is appropriate way to inform freeswitch with "not found". And once more why freeswitch treats 404 response as an error?
E.g. freeswitch requests configuration for non-existent user. Here we have two options: 1. Freeswitch replies with XML not found and HTTP 200. Freeswitch understands it pretty correct and in logs I can see that freeswitch warns me it was not able to find user in some domain. This is ok and correct.
2. Freeswitch replies with XML not found and HTTP 404. Freeswitch reports an error. It do not wait HTTP 404 status code.
And once more about p.2 from freeswitch's log:
"[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch ....."
2017-06-08 12:18 GMT+03:00 Giovanni Maruzzelli <gmaruzz@gmail.com>: """If it receives a valid response from your web application, then it will load the configuration just like it would if you had put it into the FreeSWITCH Configuration File. If it receives an invalid or 404 not found response, then it will attempt to look for the file on disk instead."""
"""https://freeswitch.org/confluence/display/FREESWITCH/ mod_xml_curl#mod_xml_curl-Section:notfound"""
https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl
On 8 June 2017 at 11:07, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote: Hi,
I am curious what HTTP status xml curl server must provide when no result is found for request with body
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document>
I mean HTTP 200 or HTTP 404.
My problem is the following:
1. When freeswitch gets 404 for directory request it reports error:
[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch
2. When freeswitch gets 200 with status "not found" on dialplan request failover to file xml config does not occure.
Thank you in advance.
-- С уважением, Владислав Захожай
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- С уважением, Владислав Захожай
That was my mistake. With HTTP 404 dialplan fails over to local static XML Dialplan. Thank you all. 2017-06-08 17:30 GMT+03:00 Vladyslav Zakhozhai <v.zakhozhai@gmail.com>:
Vallimamod,
Thank you for you clear answer. I appreciate that. I though that 200 "not found" is correct but I had some doubts. You cleared out this question for me.
I'll play with dialplan and failover to XML static config little bit later and give you feedback.
2017-06-08 15:53 GMT+03:00 Vallimamod Abdullah <vma@vallimamod.org>:
Hi,
The correct reply is HTTP 200. Any non 200 body is discarded by mod_xml_curl and triggers a failover to a backup url if you have defined one or the static conf.
If the failover to static conf does not occur in your case with a 200 'not found' reply, you need to investigate why. Can you post any full debug log?
Best Regards, -- Vallimamod Abdullah SIP Solutions VOIP Consulting vma@sipsolutions.fr .
On 8 Jun 2017, at 13:43, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote:
Giovanni, thank you for your reply.
Yes of course, I've read it. And the main question is - what is appropriate way to inform freeswitch with "not found". And once more why freeswitch treats 404 response as an error?
E.g. freeswitch requests configuration for non-existent user. Here we have two options: 1. Freeswitch replies with XML not found and HTTP 200. Freeswitch understands it pretty correct and in logs I can see that freeswitch warns me it was not able to find user in some domain. This is ok and correct.
2. Freeswitch replies with XML not found and HTTP 404. Freeswitch reports an error. It do not wait HTTP 404 status code.
And once more about p.2 from freeswitch's log:
"[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch ....."
2017-06-08 12:18 GMT+03:00 Giovanni Maruzzelli <gmaruzz@gmail.com>: """If it receives a valid response from your web application, then it will load the configuration just like it would if you had put it into the FreeSWITCH Configuration File. If it receives an invalid or 404 not found response, then it will attempt to look for the file on disk instead."""
"""https://freeswitch.org/confluence/display/FREESWITCH/mod_ xml_curl#mod_xml_curl-Section:notfound"""
https://freeswitch.org/confluence/display/FREESWITCH/mod_xml_curl
On 8 June 2017 at 11:07, Vladyslav Zakhozhai <v.zakhozhai@gmail.com> wrote: Hi,
I am curious what HTTP status xml curl server must provide when no result is found for request with body
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="freeswitch/xml"> <section name="result"> <result status="not found" /> </section> </document>
I mean HTTP 200 or HTTP 404.
My problem is the following:
1. When freeswitch gets 404 for directory request it reports error:
[ERR] mod_xml_curl.c:315 Received HTTP error 404 trying to fetch
2. When freeswitch gets 200 with status "not found" on dialplan request failover to file xml config does not occure.
Thank you in advance.
-- С уважением, Владислав Захожай
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- С уважением, Владислав Захожай
-- С уважением, Владислав Захожай
participants (3)
-
Giovanni Maruzzelli
-
Vallimamod Abdullah
-
Vladyslav Zakhozhai