I am trying to create an IVR application that will work like "voice mail" and will send the wav file as email attachment. I am also going to integrate this into our ICM environment. Everything seems to be working. However, the only problem that I seem to be having is if the caller disconnects from the call rather than pressing the pound key, the application ends and the email is not sent.
I encountered the same issue when creating a queue callback option for UCCX. The queue callback alloed callers to leave a recording of their name so the agents could ask for them when the callback occured. When callers hung up after recording their message, the script would error out and the execution would stop. I ended up using the on error goto step to catch the hang up.
Here is what I would do:
1) Create a boolean variable and set it to default as false, bStartedRecording
2) Add a Set step prior to your recording step. In this step, set the bStartedRecording variable to true
3) Add a new Label step at the end of your script, CatchHangUp.
4) Add an If step under this new label to check if the bStartedRecording step is true. Under the true leg, use the Clear Exception step to clear the error. Use a Goto step to resume the script where you want to continue after hang up. Under the false leg, just go to your End step.
5) At the top of your script, add a Catch Exception step to catch the com.cisco.contact.ContactInactiveException error and select the CatchHangUp label from the list of labels.