[Freeswitch-users] Loading an IVR menu on the fly via URL

RaviRaj Mulasa rml at tollfreeforwarding.com
Fri Nov 18 12:58:07 MSK 2011


Hi FreeSWITCH Enthusiastics/Gurus

Requirement

1. Customers can  build  a custom IVR using a UI.
2. Back end code persists the IVR details in a DB.
3.  A URL  will be exposed  and will return the a XML file in the format as follows

<menu name="CUSTOMER_ID_ivr"
          greet-long="phrase:demo_ivr_main_menu"
          greet-short="phrase:demo_ivr_main_menu_short"
          invalid-sound="/mnt/callControlStorage/en/invalidSelection.wav"
          exit-sound="/mnt/callControlStorage/en/tollFreeForwardingDotCom.wav"
                                  tollFreeForwardingDotCom
          timeout ="10000"
                  inter-digit-timeout="2000"
                  max-failures="3"
                  digit-len="4">
      <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 9996 XML default"/>    <!-- FS echo -->
      <entry action="menu-exec-app" digits="3" param="transfer 9999 XML default"/>    <!-- MOH -->
      <entry action="menu-sub" digits="4" param="3107767546_ivr_submenu"/>  <!-- demo sub menu -->
      <entry action="menu-exec-app" digits="5" param="transfer 1234*256 enum"/>    <!-- Screaming monkeys -->
      <entry action="menu-exec-app" digits="/^(10[01][0-9])$/" param="transfer $1 XML default"/> <!-- dial ext & x-fer -->
      <entry action="menu-top" digits="9"/>    <!-- Repeat this menu -->
</menu>

4. Load and start executing the IVR  'CUSTOMER_ID_ivr'  from events socket on the fly via HTTP URI.

Gave it a shot with current setup

ivr.conf.xml

<configuration name="ivr.conf" description="IVR menus">
  <menus>
                <X-PRE-PROCESS cmd="include" data="/mnt/<<Folder Name for the NETWORK DIRVE mapped>>/ivr_menus/*.xml"/>
  </menus>
</configuration>


The ivr.conf.xml is auto loaded at startup of FreeSWITCH.
To load any new IVR menus , we need to call API command reloadxml  which reloads the whole XML configs in autload_configs folder.
The reloadxml might take long time based on the number of XML files present in the folder "/mnt/<<Folder Name for the NETWORK DIRVE mapped>>/ivr_menus"

Good /Hope to have for the IVR menu

1. Load /Unload  IVR menus on the fly  using  API command(s)
freeswitch at localhost> loadivr << URL to fetch the  XML describing the IVR menu(s)>>
freeswitch at localhost> unloadivr  <<IVR menu name>>

2.  From the event socket

SendMsg <uuid>
call-command: execute
execute-app-name: ivr
execute-app-arg: <<MAIN_MENU to start execution>>SPACE <<URL to fetch the  XML describing the IVR menu(s)>>


Educated/Wild Guess

We might be able to play IVR menu on the fly  by combining the mod_xml_curl and  dialplan tool  - ivr.



Please let us know how can we achieve the functionality , we are more interested in the second  approach(Event Socket)  under Good /Hope to have for the IVR menu.

Thanks
RaviRaj.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111118/efbde91e/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list