Share This Post:
VoiceXML Call Exception Handling
Do you have samples for throwing/catching call status events from the callhandler.jsp
The exception is throwed from the telephony engine, so normally you will only need to catch the exception. The gateway also automatically catch phone exceptions and save the exception in the call record. So normally you also do not need to catch these exceptions.
To capture the exception yourself. Here is what you can do:
< ?xml version="1.0"?>
< vxml version="1.0" >
< form id="sample" >
< var name="status" expr="''"/ >
< var name="info" expr="''"/ >
...
...
< noinput >
< assign name="status" expr="'...'"/ >
< assign name="info" expr="__VG__EXCEPTION_INFO__"/ >
< submit next="..." namelist="status info"/ >
< /noinput >
< catch event="telephone.hangup" >
< assign name="status" expr="'...'"/ >
< assign name="info" expr="__VG__EXCEPTION_INFO__"/ >
< submit next="..." namelist="status info"/ >
< /catch >
< /form >
Please note that __VG__EXCEPTION_INFO__ is an internal global variable for Voicent Gateway. It is not standard VoiceXML. The variable contains more information about the current exception.
Other phone related exception you can catch are:
telephone.noanswer (no one answered the phone)
telephone.noline (line occupied)
telephone.linedrop (line disconnected)
telephone.transfer.noanswer (call transfer not answered)
telephone.linebusy (line busy tone)
The outbound call tutorial has a section related to call status and exception.
Share This Post: