[Freeswitch-users] XML curl "not found" response

Vallimamod Abdullah vma at vallimamod.org
Thu Jun 8 12:53:15 UTC 2017


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 at sipsolutions.fr
.

> On 8 Jun 2017, at 13:43, Vladyslav Zakhozhai <v.zakhozhai at 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 at 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 at 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.
> 
> -- 
> С уважением,
> Владислав Захожай




More information about the FreeSWITCH-users mailing list