[Freeswitch-users] Loading phrases on demand via mod_xml_curl
Ben Hood
0x6e6562 at gmail.com
Tue Apr 21 17:44:10 MSD 2015
Hi,
It is possible to load a phrase on demand (and for every individual
call) using mod_xml_curl?
Currently my web server is returning:
<document type="freeswitch/xml">
<section name="phrases">
<macros>
<language>
<macro name="vmg">
<input pattern="(.*)">
<match>
<action function="play-file" data="voicemail/vm-goodbye.wav"/>
</match>
</input>
</macro>
</language>
</macros>
</section>
</document>
when the phrases section of mod_xml_curl is configured thusly:
<binding name="phrases">
<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"/>
<param name="gateway-url"
value="127.0.0.1/phrase"
bindings="languages"/>
</binding>
but when a dialplan tries to load to load the vmg phrase:
<menu name="vmg_ivr"
greet-long="phrase:vmg"
invalid-sound="ivr/ivr-that_was_an_invalid_entry.wav"
exit-sound="voicemail/vm-goodbye.wav"
confirm-macro=""
confirm-key=""
tts-engine="flite"
tts-voice="slt"
confirm-attempts="3"
timeout="10000"
inter-digit-timeout="2000"
max-failures="3"
max-timeouts="3"
digit-len="1">
The execution cannot find the vmg macro:
2015-04-21 15:35:10.843131 [DEBUG] switch_ivr_menu.c:469 Executing IVR
menu vmg_ivr
2015-04-21 15:35:10.843131 [DEBUG] switch_ivr_play_say.c:70 No
language specified - Using [en]
2015-04-21 15:35:10.943130 [CONSOLE] mod_xml_curl.c:323 XML response
is in /tmp/cbaaec2b-50ed-48ab-b5fa-68d3d7b34cb9.tmp.xml
2015-04-21 15:35:10.943130 [ERR] switch_ivr_play_say.c:145 Can't find macro vmg.
The debug file that mod_xml_curl writes to disk
(/tmp/cbaaec2b-50ed-48ab-b5fa-68d3d7b34cb9.tmp.xml) contains the macro
called vmg.
So I was wondering if phrase loading via mod_xml_curl is not supposed
to work in this way, i.e. that a macro sourced remotely cannot be late
bound to an IVR menu declaration?
The following mailing list post
http://lists.freeswitch.org/pipermail/freeswitch-users/2013-August/099239.html
seems to suggest this behavior.
But if that is the case, then I'm a bit surprised that the HTTP
request appears to be executed every time the macro is referenced by a
dialplan.
Am I missing the point some where?
Many thanks,
Ben
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list