FreeSWITCH          




Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


The macro file for the IVR is located at conf/lang/en/demo/demo-ivr.xml.

Lua IVRs

Hello World

Code Block
-- answer the call
session:answer();
-- play a file
session:streamFile("/path/to/blah.wav");
-- hangup
session:hangup();

...

  • answers call
  • plays file asking for input of 1st 3 chars of last name
  • looks in list for matches
  • if match found play recorded_name if available
  • otherwise spell out name and extension
  • ask for confirmation of match
  • if not the right one play the next one
  • if confirmed transfer to extension
  • otherwise play no match found and restart directory ivr

directory.lua

directory in lua using ASR and TTS

directory_asr.lua

inbound conferencing using lua

simple_conference.lua

Example of a "group confirm" alternative: speaks text and does not require the call to be accepted

...

To achieve this, we want to use the exec functionality of group_confirm_key to call a Lua script with the selected menu option so we know what text to speak. The following script would be the frontend "automated attendant" Lua script:

...

This IVR uses an sqlite database for storing the menu options. The database creation script is here - Examples dbivrmenu dbcreate js. The IVR script is here - Examples dbivrmenu js.

afterhours ivr

This is a basic javascript ivr that plays the message once and transfers to the voicemail extension of the operator at the end if no input is given. The IVR script is here - JavaScript Example afterhoursivr.js.

Python IVRs

See Mod_python for more info on how to get these working.

...

The IVR script is here - Examples frontdoor py.

basic voicemail

Uses Django O/R layer to talk to a database and save/retrieve voicemails:

...

  • answers call
  • plays file asking for input of 1st 3 chars of last name
  • looks in list for matches
  • if match found play recorded_name if available
  • otherwise spell out name and extension
  • ask for confirmation of match
  • if not the right one play the next one
  • if confirmed transfer to extension
  • otherwise play no match found and restart directory ivr

directory.py

See also