| CallXML 2.0 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<playaudio value="helloworld.wav"/>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<playaudio value="helloworld.wav"/>
<ontermdigit value="*">
</ontermdigit>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<playaudio value="helloworld.wav"/>
<ontermdigit value="*">
<text>you pressed the star key.</text>
</ontermdigit>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<playaudio value="helloworld.wav"/>
<ontermdigit value="*">
<text>you pressed the star key.</text>
</ontermdigit>
<ontermdigit value="#">
<text>you pressed the pound key.</text>
</ontermdigit>
</callxml>
termdigits="*#" to playaudio, as shown below:
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<playaudio value="helloworld.wav"
termdigits="*#"/>
<wait value="4s" termdigits="#*"/>
<ontermdigit value="*">
<text>you pressed the star key.</text>
</ontermdigit>
<ontermdigit value="#">
<text>you pressed the pound key.</text>
</ontermdigit>
<onerror>
<sendemail from="MyApp@here.com"
to="YourEmail@there.net" type="debug">
We caught an error in our application. Details follow...
</sendemail>
</onerror>
</callxml>
<wait> tag. We need this to be placed at the end of our <playaudio>, since our sound file is so short, otherwise, the caller's DTMF ijnput may not have time to be recognized. You'll probably also notice that this tag has the same termdigits attribute as in our <playaudio> element. This is required as well, since if a caller enters DTMF input while in the <wait>, then we need to be able to trap and handle the event.<onerror/sendemail> tags at the very bottom of the code. This is not an accident; since CallXML does not have a Form Interpretation Algorithm, any and all event handlers should reside at the very bottom of your CallXML documents in order to execute. The cool thing about this event handler, coupled with the <sendemail> element, is this: Whenever the application takes a nose-dive, be it from a fetch error, or a coding typo, the event will be caught, and an email sent to the email address that you specify. When we set the type attribute to 'debug' the resulting email will also contain information about the application failure that you can use to correct the problem. If the problem in question still eludes you, you can simply forward the debug email to the Voxeo Support team, who can use this information to help you fix your application.| ANNOTATIONS: EXISTING POSTS |
| login |
|