July 2017
Intermediate to advanced
434 pages
12h 59m
English
The following is an educational rewrite, in Lua, of the demo XML IVR shipped in the demo configuration, the one that answers when you call 5000 from a registered phone. Write it in the /usr/local/freeswitch/scripts/test9.lua file:
conference_call_session = NIL first_time_main_menu = false first_time_submenu = false api = freeswitch.API() is_a_demo_user_extension = "false" ----------------------------------------------------------------------- session:answer() session:execute("playback", "silence_stream://1000") if(not session:ready())then goto END end digits = session:playAndGetDigits (1,4,1,10000, '#','phrase:demo_ivr_main_menu', 'ivr/ivr-that_was_an_invalid_entry.wav', '^\\d$|^10[01][0-9]$','digits',2000) first_time_main_menu ...Read now
Unlock full access