IVR script debug
If your IVR script doesn't start or doesn't work as expected, you can open the Asterisk CLI and set the "Agi debug mode" in order to check step-by-step what is wrong in your script.
How to open the Asterisk CLI
- Connect to the ssh console of xCally server
- Run the command asterisk -r to open the Asterisk CLI
- Type agi set debug on to enable IVR debug console
localhost*CLI> agi set debug on AGI Debugging Enabled
Now you are able to check what happens in every block of your IVR script.
For example, we have a script as follow:
On incoming call, we can check the entire call flow in the asterisk CLI, here is the main useful information:
<SIP/my.xcally-00000001>AGI Tx >> agi_request: agi://127.0.0.1/square ... ... <SIP/my.xcally-00000001>AGI Tx >> agi_arg_1: project=31 <SIP/my.xcally-00000001>AGI Tx >> <SIP/my.xcally-00000001>AGI Rx << ANSWER ... <SIP/my.xcally-00000001>AGI Tx >> 200 result=0 <SIP/my.xcally-00000001>AGI Rx << VERBOSE "Start" 1 agi://127.0.0.1/square,project=31: Start <SIP/my.xcally-00000001>AGI Tx >> 200 result=1 <SIP/my.xcally-00000001>AGI Rx << EXEC Wait 0 -- AGI Script Executing Application: (Wait) Options: (0) <SIP/my.xcally-00000001>AGI Tx >> 200 result=0 <SIP/my.xcally-00000001>AGI Rx << ANSWER <SIP/my.xcally-00000001>AGI Tx >> 200 result=0 <SIP/my.xcally-00000001>AGI Rx << VERBOSE "Date 2015-12-29 Weekday 2 Hour 10:00 Interval true" 1 //Check the time interval agi://127.0.0.1/square,project=31: Date 2015-12-29 Weekday 2 Hour 10:00 Interval true <SIP/my.xcally-00000001>AGI Tx >> 200 result=1 <SIP/my.xcally-00000001>AGI Rx << GET DATA /var/www/html/files/sounds/88968aa34fb66b89146f26324fb27718 10000 1 //Execute the menu block -- <SIP/my.xcally-00000001> Playing '/var/www/html/files/sounds/88968aa34fb66b89146f26324fb27718.slin' (language 'en') ... [Dec 29 10:00:08] DTMF[5250][C-00000001]: channel.c:4128 __ast_read: DTMF end '1' received on SIP/my.xcally-00000001, duration 0 ms //The caller pressed 1 [Dec 29 10:00:08] DTMF[5250][C-00000001]: channel.c:4187 __ast_read: DTMF end accepted without begin '1' on SIP/my.xcally-00000001 [Dec 29 10:00:08] DTMF[5250][C-00000001]: channel.c:4198 __ast_read: DTMF end passthrough '1' on SIP/my.xcally-00000001 <SIP/my.xcally-00000001>AGI Tx >> 200 result=1 <SIP/my.xcally-00000001>AGI Rx << EXEC Macro bar,XCALLY_QUEUE,Support //The call has been sent to the Support Queue ... ...
To turn off the agi debug mode, type agi set debug off
localhost*CLI> agi set debug off AGI Debugging Disabled