Share This Post:
Handle VXML exit code
I have the outbound calls working via HTTP, and have some logic to determine if the correct response code was entered. However, when I poll the status of the call, it says “Call Succeeded” regardless of whether the right code was entered or not.
I have in my script an exit with different expressions, but they don’t seem to be passed. How can I determine what exit path resulted so I can appropriately handle a hangup or incorrect code? Thanks for your help,
…
<filled namelist=”responsecode” mode=”all”>
<if cond=”responsecode == ’12345′”">
<prompt”>
You have entered the correct code. Good bye.
<exit expr=”Correct Code”>
</prompt>
<else/>
<prompt”>
I’m sorry, that code is incorrect. Alerting the authorities. Good bye.
<exit expr=”Wrong Code”>
</prompt>
</if>
</filled>
…
Voicent Gateway does not support all the VXMl tags. The exit code is one of them. There is also a difference between a call status and VXML application exit status. Call status is used to indicate whether a call is made, line busy, etc by the gateway.
VXML application status is best handled in your JSP application (or any other language you use to generate VXML). VXML is not a real programming language, so it is usually easier to handle more in JSP. Use VXML just for the phone interaction. It is strongly recommended to use Voicent IVR Studio to automatically create your initial version of the VXML files, then use them as a base for your application.
To handle application exit code, use the submit element to handle that. For example, you can have an exit handler called exithandler to handle call the exit status:
…
<filled namelist=”responsecode” mode=”all”>
<if cond=”responsecode == ’12345′”">
<prompt”>
You have entered the correct code. Good bye.
<submit next=”exithandler” namelist=”responsecode”/>
</prompt>
<else/>
<prompt”>
I’m sorry, that code is incorrect. Alerting the authorities. Good bye.
<var name=”exitcode” expr=”‘Wrong Code’”/>
<submit next=”exithandler” namelist=”exitcode”/>
</prompt>
</if>
</filled>
…
For more details, please see the Outbound call tutorial
Still trying to get this IVR application working, and I’m not sure if the IVR studio will help.
That does lead to a question — is there some more advanced API I can access as a developer that gives me more capability than the IVR studio?
I have the system dialing out, and in IVR studio I want to capture the correct code based on a column in BroadcastByPhone. For simplicity, I’m use the “Name” field. I have the value “504″ in the name field.
The system dials, and prompts for the code, and I’ve tried every combination I can think of to use the Name variable to go to the “correct” path, but I can’t get it to work.
Is there some way to use the condition field to match the input to the name?
That is exactly where IVR Studio can help.
The BroadcastByPhone column has nothing to do with a variable in VXML, that’s why you cannot get it to work. There are a lot of work needed in order to use column values in your VXML application. Luckily, you do not have to do it from scratch, we have done the integration in IVR Studio.
Voicent Gateway actually supports parameterized VXML in addition to the basic VXML. This capability is what makes it possible to link BroadcastByPhone and the Gateway. In a sense, this is the advanced API. But it is hidden through the use of IVR Studio.
As well, the system is not sending an email when it’s done — there’s something in the log about an exception but it doesn’t have anything that helps me to troubleshoot. The exception in the log file is:
java.lang.NoClassDefFoundError: javax/mail/MessagingException
at vx.interp.VxEmailSender.send(Unknown Source)
……
The exception means the jar file for the class is not included in the classpath. For javamail, you have to include mail.jar file in the classpath of your application or in the gateway classpath. Again, by using IVR Studio, it will help you deploy the jar file to the correct location.
Share This Post: