[Freeswitch-users] xml_cdr encoding issues
Michael Jerris
mike at jerris.com
Wed Mar 11 15:14:03 MSK 2015
https://freeswitch.org/jira/browse/FS-7258 <https://freeswitch.org/jira/browse/FS-7258>
> On Mar 11, 2015, at 4:53 AM, Assaf Dahary <adahary at gmail.com> wrote:
>
> Hi,
>
> I have installed a fresh FS on a DigitalOcean VPS (CentOS 6.5 64bit).
> FreeSWITCH Version 1.5.15b+git~20150303T230402Z~86c68d906a~64bit (git
> 86c68d9 2015-03-03 23:04:02Z 64bit)
>
> I'm using mod_cml_cdr to process call logs into DB using a PHP script ($xml
> = simplexml_load_string($xml_string);)
>
> The problem is that the xml parsing is failing because the generated POST
> XML CDR string received on my web is NOT url-encoded as should be.
> I verified that encoding is enabled: <param name="encode" value="true"/>
> (see full conf file below).
>
> This un-encoded line from the posted xml CDR is one example for what is
> causing the xml parsing error:
> <sip_full_from>"99252627"
> <sip:1234 at 11.11.11.11>;tag=y3Xr3g6HZZtBQ</sip_full_from>.
>
> On other FS I get it encoded with no xml errors:
> <sip_full_from>%3Csip%3A1234%40abc.com%3E%3Btag%3DnQGk6NEXS0yYrSeyIYCbrXmge7
> 80R7J4</sip_full_from>
>
> I've reinstalled all PHP/XML/CURL related modules with no help.
> I also tried to post to my other FS web server thinking that the local FS
> web is decoding and then passing to the php xml script - still with no help.
>
> Any tip/help/advise will be appreciated.
>
> Regards
>
> Assaf
>
>
> This is my xml_cdr.conf.xml file:
>
> <configuration name="xml_cdr.conf" description="XML CDR CURL logger">
> <settings>
> <!-- the url to post to if blank web posting is disabled -->
> <!-- <param name="url" value="http://localhost/cdr_curl/post.php"/> -->
>
> <!-- optional: credentials to send to web server -->
> <!-- <param name="cred" value="user:pass"/> -->
>
> <!-- the total number of retries (not counting the first 'try') to post
> to webserver incase of failure -->
> <!-- <param name="retries" value="2"/> -->
>
> <!-- delay between retries in seconds, default is 5 seconds -->
> <!-- <param name="delay" value="1"/> -->
>
> <!-- optional: if not present we do not log every record to disk -->
> <!-- either an absolute path, a relative path assuming ${prefix}/logs or
> a blank value will default to ${prefix}/logs/xml_cdr -->
> <param name="log-dir" value=""/>
>
> <!-- optional: if not present we do log the b leg -->
> <!-- true or false if we should create a cdr for the b leg of a call-->
> <param name="log-b-leg" value="false"/>
>
> <!-- optional: if not present, all filenames are the uuid of the call
> -->
> <!-- true or false if a leg files are prefixed "a_" -->
> <param name="prefix-a-leg" value="true"/>
>
> <!-- encode the post data may be 'true' for url encoding, 'false' for no
> encoding or 'base64' for base64 encoding -->
> <param name="encode" value="true"/>
>
> <!-- optional: set to true to disable Expect: 100-continue lighttpd
> requires this setting -->
> <!--<param name="disable-100-continue" value="true"/>-->
>
> <!-- optional: full path to the error log dir for failed web posts if
> not specified its the same as log-dir -->
> <!-- either an absolute path, a relative path assuming ${prefix}/logs or
> a blank or omitted value will default to ${prefix}/logs/xml_cdr -->
> <!-- <param name="err-log-dir" value="/tmp"/> -->
>
> <!-- optional: if enabled this will disable CA root certificate checks
> by libcurl -->
> <!-- note: default value is disabled. only enable if you want this! -->
> <!-- <param name="ignore-cacert-check" value="true" /> -->
>
> </settings>
> </configuration>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150311/7fb5dd70/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list