Closed dowusu closed 3 years ago
I've gone through a great deal trying to get phrases to work with mod_xml_curl but eventually I run into the below error captured from the log files
switch_ivr_play_say.c:70 No language specified - Using [en] mod_xml_curl.c:324 XML response is in /tmp/2586cd52-1f72-11ec-a3cb-bf7e23032396.tmp.xml switch_ivr_play_say.c:145 Can't find macro vmg.
Below is the content of the mod_xml_response
<document type="freeswitch/xml">
<section name="phrases">
<macros>
<language name="en">
<macro name="vmg">
<input pattern="(.*)">
<match>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/ENG/SS-000-001-EN.vox"/>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/TWI/SS-000-001-EN.vox"/>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/GA/SS-000-001-EN.vox"/>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/DAGBANI/SS-000-001-EN.vox"/>
</match>
</input>
</macro>
</language>
</macros>
</section>
Binding configuration
<binding name="phrases">
<param name="gateway-url" value="http://192.168.8.120:4000/hello" bindings="languages"/>
<param name="method" value="GET"/>
<param name="enable-post-var" value="macro_name"/>
<param name="enable-post-var" value="variable_sip_req_user"/>
<param name="enable-post-var" value="variable_sip_from_user"/>
</binding>
I'm not sure if I'm missing something, I've checked on slack, gone through the FS docs and still can't find any info.
<document type="freeswitch/xml">
<section name="languages">
<language name="en">
<phrases>
<macros>
<macro name="vmg">
<input pattern="(.*)">
<match>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/ENG/SS-000-001-EN.vox"/>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/TWI/SS-000-001-EN.vox"/>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/GA/SS-000-001-EN.vox"/>
<action function="play-file" data="http://192.168.8.120:4000/audio.vox/DAGBANI/SS-000-001-EN.vox"/>
</match>
</input>
</macro>
</macros>
</phrases>
</language>
</section>
</document>
which useable for phrase
application.
Thanks a bunch sir, you've made my day. It works perfectly. Kudos and keep up the good work.
I've configured mod_xml_curl bindings for only phrases, however from my web application logs - I see request being made with section as dialplan, directory or languages. Is this the expected behaviour - perusing the docs suggest that the request should only be triggered for the specified bindings. BTW I'm using the default example config, below is my xml_curl.conf.xml config
Also note that setting method to GET seem to have no effect on the request. Freeswitch 1.10.6