[Freeswitch-users] xml_curl and ivr menus
Cal Leeming [Simplicity Media Ltd]
cal.leeming at simplicitymedialtd.co.uk
Wed Dec 26 23:57:00 MSK 2012
Tim,
Chiming in on this, as my focus has been purely on mod_xml_curl for the
last 2 months.
My apologies that you struggled with finding a working examples, the
mod_xml_curl documentation is still a work in progress - and despite that
it has recently had a partial re-write, there are still many parts which
aren't clear enough.
I will be updating the docs soon (in the next week) to show example
request/response of as many different scenarios as possible, along with
context specific descriptions of each variable.
Cal
On Tue, Dec 25, 2012 at 2:07 PM, Tim Meade <Tim.Meade at millicorp.com> wrote:
> Here is an example of the xml_curl phrases section. This is not in the
> WIKI….. I’ll try to update. Notice the language section….****
>
> ** **
>
> <document type="freeswitch/xml">****
>
> <section name="phrases">****
>
> <macros>****
>
> <include>****
>
> <language name="en" sound-path="
> $${sounds_dir}/en/us/callie" tts-engine="cepstral" tts-voice="callie">****
>
> <macro name="demo_ivr_main_menu"
> pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on
> how to use this macro in an IVR -->****
>
> <input pattern="(.*)">****
>
> <match>****
>
> <!-- string together
> several existing sound files to create one long greeting -->****
>
> <action function="
> play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>****
>
> <!-- note that you can
> do more than just play files, e.g. have pauses and do TTS -->****
>
> ****
>
> <!-- Menu option 1:
> Call FreeSWITCH conference-->****
>
> <action function="
> play-file" data="ivr/ivr-enter_ext_pound.wav"/>****
>
> <action function="
> play-file" data="silence_stream://1500"/>****
>
> <action function="
> play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-please.wav"/>****
>
> <action function="
> play-file" data="voicemail/vm-press.wav"/>****
>
> <action function="
> play-file" data="digits/1.wav"/>****
>
> ****
>
> <!-- Menu option 2: Do
> FreeSWITCH echo test -->****
>
> <action function="
> play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-please.wav"/>****
>
> <action function="
> play-file" data="voicemail/vm-press.wav"/>****
>
> <action function="
> play-file" data="digits/2.wav"/>****
>
> ****
>
> <!-- Menu option 3:
> Listen to Music on Hold -->****
>
> <action function="
> play-file" data="ivr/ivr-to_listen_to_moh.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-please.wav"/>****
>
> <action function="
> play-file" data="voicemail/vm-press.wav"/>****
>
> <action function="
> play-file" data="digits/3.wav"/>****
>
> ****
>
> <!-- Menu option 4:
> Register for ClueCon -->****
>
> <action function="
> play-file" data="ivr/ivr-register_for_cluecon.wav"/>****
>
> <action function="
> play-file" data="digits/4.wav"/>****
>
> ****
>
> <!-- Menu option 5:
> Listen to screaming monkeys -->****
>
> <action function="
> play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-please.wav"/>****
>
> <action function="
> play-file" data="voicemail/vm-press.wav"/>****
>
> <action function="
> play-file" data="digits/5.wav"/>****
>
> ****
>
> <!-- Menu option 6:
> Hear a sample submenu -->****
>
> <action function="
> play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-please.wav"/>****
>
> <action function="
> play-file" data="voicemail/vm-press.wav"/>****
>
> <action function="
> play-file" data="digits/6.wav"/>****
>
> ****
>
> <!-- Menu option 9:
> Repeat these options -->****
>
> <action function="
> play-file" data="ivr/ivr-to_repeat_these_options.wav"/>****
>
> <action function="
> play-file" data="ivr/ivr-please.wav"/>****
>
> <action function="
> play-file" data="voicemail/vm-press.wav"/>****
>
> <action function="
> play-file" data="digits/9.wav"/>****
>
> <action function="
> play-file" data="silence_stream://2000"/>****
>
> </match>****
>
> </input>****
>
> </macro> ****
>
> </language>
> ****
>
> </include>****
>
> </macros>
> ****
>
> </section>****
>
> </document>****
>
> ** **
>
> ** **
>
> Thanks All****
>
> ** **
>
> Tim****
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Tim Meade
> *Sent:* Monday, December 24, 2012 5:05 PM
> *To:* Abaci; FreeSWITCH Users Help
> *Subject:* Re: [Freeswitch-users] xml_curl and ivr menus****
>
> ** **
>
> Thank you Abaci…. Just found that myself under the xml_curl section of
> the wiki….. I hadn’t noticed the xml_curl configuration parameters for the
> return xml are different. ****
>
> ** **
>
> Here is the completed working configuration from xml_curl debug_on. ****
>
> ** **
>
> <document type="freeswitch/xml">****
>
> <section name="configuration">****
>
> <configuration name="ivr.conf" description="IVR menus">****
>
> <menus>****
>
> <include>****
>
> <!-- demo IVR setup -->****
>
> <!-- demo IVR, Main Menu -->****
>
> <menu name="tivr"****
>
> greet-long="phrase:demo_ivr_main_menu"****
>
> greet-short="phrase:demo_ivr_main_menu_short"****
>
> 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="rms"****
>
> confirm-attempts="3"****
>
> timeout="10000"****
>
> inter-digit-timeout="2000"****
>
> max-failures="3"****
>
> max-timeouts="3"****
>
> digit-len="4">****
>
> <!-- The following are the definitions for the digits the user dials -->**
> **
>
> <!-- Digit 1 transfer caller to the public FreeSWITCH conference -->****
>
> <entry action="menu-exec-app" digits="1" param="bridge sofia/$${domain}/
> 888 at conference.freeswitch.org"/>****
>
> <entry action="menu-exec-app" digits="2" param="transfer 9196 XML
> default"/> <!-- FS echo -->****
>
> <entry action="menu-exec-app" digits="3" param="transfer 9664 XML
> default"/> <!-- MOH -->****
>
> <entry action="menu-exec-app" digits="4" param="transfer 9191 XML
> default"/> <!-- ClueCon -->****
>
> <entry action="menu-exec-app" digits="5" param="transfer 1234*256 enum"/>
> <!-- Screaming monkeys -->****
>
> <!-- Using a regex in the digits tag lets you define a dial pattern for
> the caller****
>
> You may define multiple regexes if you need a different pattern for some
> reason -->****
>
> <entry action="menu-exec-app" digits="/^(10[01][0-9])$/" param="transfer
> $1 XML features"/>****
>
> <entry action="menu-top" digits="9"/> <!-- Repeat this menu -->****
>
> </menu>****
>
> </include>****
>
> </menus>****
>
> </configuration>****
>
> </section>****
>
> </document>****
>
> ** **
>
> *From:* Abaci [mailto:abaci64 at gmail.com]
> *Sent:* Monday, December 24, 2012 4:45 PM
> *To:* FreeSWITCH Users Help
> *Cc:* Tim Meade
> *Subject:* Re: [Freeswitch-users] xml_curl and ivr menus****
>
> ** **
>
> you're also missing the "section" element.
>
> On 12/24/2012 4:43 PM, Abaci wrote:****
>
> Here is a sample from my server, I highlighted the missing stuff.
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
> <section name="configuration">
> * <configuration name="ivr.conf" description="IVR menus">
> <menus>*
> <menu name="ivrmenu1"
> invalid-sound="ivr/ivr-that_was_an_invalid_entry.wav"
> exit-sound="voicemail/vm-goodbye.wav"
> timeout ="3000"
> inter-digit-timeout="2000"
> max-failures="2"
> digit-len="3"
> phrase-lang="en">
> <entry action="menu-exec-app" digits="0" param="transfer 11 XML
> voicemail " />
> <entry action="menu-exec-app" digits="1" param="transfer
> ivrmenu2 XML ivr " />
> <entry action="menu-exec-app" digits="2" param="transfer
> ivrmenu3 XML ivr " />
> </menu>
> * </menus>
> </configuration>*
> </section>
> </document>
>
> On 12/24/2012 4:22 PM, Tim Meade wrote:****
>
> The items I pasted below are from the cat of the xml_curl debug_on
> command. It certainly appears to me that freeswitch is getting the correct
> name in this case ‘tivr’ which is what shows in both the dialplan and the
> curl’d ivr menu.****
>
> ****
>
> My concerns now are dealing with the xml format for the ivr as I have
> found several different versions on the wiki and in the prior postings.***
> *
>
> ****
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [
> mailto:freeswitch-users-bounces at lists.freeswitch.org<freeswitch-users-bounces at lists.freeswitch.org>]
> *On Behalf Of *Abaci
> *Sent:* Monday, December 24, 2012 3:42 PM
> *To:* FreeSWITCH Users Help
> *Subject:* Re: [Freeswitch-users] xml_curl and ivr menus****
>
> ****
>
> on freeswitch enable xml_curl debug and see if freeswitch is actually
> getting the correct ivr
> 'xml_curl debug_on'
>
> On 12/24/2012 2:20 PM, Tim Meade wrote:****
>
> I am continually getting ‘unable to find menu’ while trying to retrieve an
> ivr_menu using xml_curl****
>
> ****
>
> Using xml_curl debug_on ****
>
> ****
>
> My DialPlan****
>
> ****
>
> <document type="freeswitch/xml">****
>
> <section name="dialplan" description="example_curl_dialplan">****
>
> <context name="public">****
>
> <extension name="ws_origination">****
>
> <condition field="destination_number" expression="^\d+$" break="on-true">*
> ***
>
> <action inline="true" application="set" data="continue_on_fail=true"/>****
>
> <action inline="true" application="set" data="hangup_after_bridge=true"/>
> ****
>
> <action application="answer"/>****
>
> <action application="ivr" data="tivr"/>****
>
> </condition>****
>
> </extension>****
>
> </context>****
>
> </section>****
>
> ****
>
> And the ivr configuration returned by my xml_curl****
>
> ****
>
> <include>****
>
> <!-- demo IVR setup -->****
>
> <!-- demo IVR, Main Menu -->****
>
> <menu name="tivr"****
>
> greet-long="phrase:demo_ivr_main_menu"****
>
> greet-short="phrase:demo_ivr_main_menu_short"****
>
> 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="rms"****
>
> confirm-attempts="3"****
>
> timeout="10000"****
>
> inter-digit-timeout="2000"****
>
> max-failures="3"****
>
> max-timeouts="3"****
>
> digit-len="4">****
>
> <!-- The following are the definitions for the digits the user dials -->**
> **
>
> <!-- Digit 1 transfer caller to the public FreeSWITCH conference -->****
>
> <entry action="menu-exec-app" digits="1" param="bridge sofia/$${
> domain}/888 at conference.freeswitch.org"/>****
>
> <entry action="menu-exec-app" digits="2" param="transfer 9196 XML
> default"/> <!-- FS echo -->****
>
> <entry action="menu-exec-app" digits="3" param="transfer 9664 XML
> default"/> <!-- MOH -->****
>
> <entry action="menu-exec-app" digits="4" param="transfer 9191 XML
> default"/> <!-- ClueCon -->****
>
> <entry action="menu-exec-app" digits="5" param="transfer 1234*256 enum"/>
> <!-- Screaming monkeys -->****
>
> <!-- Using a regex in the digits tag lets you define a dial pattern for
> the caller****
>
> You may define multiple regexes if you need a different pattern for some
> reason -->****
>
> <entry action="menu-exec-app" digits="/^(10[01][0-9])$/" param="transfer
> $1 XML features"/>****
>
> <entry action="menu-top" digits="9"/> <!-- Repeat this menu -->****
>
> </menu>****
>
> </include>****
>
> ****
>
> Any ideas on the ‘unable to find menu’ ????****
>
> ****
>
> Thanks****
>
> ****
>
> Tim****
>
> ****
>
> ****
>
> ****
>
>
>
>
> ****
>
> _________________________________________________________________________****
>
> Professional FreeSWITCH Consulting Services:****
>
> consulting at freeswitch.org****
>
> http://www.freeswitchsolutions.com****
>
> ****
>
> ****
>
> ****
>
> ****
>
> Official FreeSWITCH Sites****
>
> http://www.freeswitch.org****
>
> http://wiki.freeswitch.org****
>
> http://www.cluecon.com****
>
> ****
>
> FreeSWITCH-users mailing list****
>
> FreeSWITCH-users at lists.freeswitch.org****
>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users****
>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users****
>
> http://www.freeswitch.org****
>
> ****
>
>
>
> ****
>
> _________________________________________________________________________****
>
> Professional FreeSWITCH Consulting Services:****
>
> consulting at freeswitch.org****
>
> http://www.freeswitchsolutions.com****
>
> ** **
>
> ****
>
> ****
>
> ** **
>
> Official FreeSWITCH Sites****
>
> http://www.freeswitch.org****
>
> http://wiki.freeswitch.org****
>
> http://www.cluecon.com****
>
> ** **
>
> FreeSWITCH-users mailing list****
>
> FreeSWITCH-users at lists.freeswitch.org****
>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users****
>
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users****
>
> http://www.freeswitch.org****
>
> ** **
>
> ** **
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121226/b70015f7/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list