AngelXML Examples
The following code snippets are examples of the AngelXML responses for the Transaction Page.
Message page with links
<ANGELXML> <MESSAGE> <COMMENT> This page is an example of a menu page. It plays a prompt and then prompts for a keyword. </COMMENT> <PLAY> <PROMPT type="text"> The weather for the county of Fairfax will be sunny and shiny. You can say today or tomorrow. </PROMPT> </PLAY> <!-- dtmf is an optional attribute, remember they must be unique --> <LINK keyword="today" dtmf="4" destination="/1" /> <LINK keyword="tomorrow" destination="/1" /> </MESSAGE> </ANGELXML>
Message page that hangs up, bargein disabled
<ANGELXML bargein="false"> <MESSAGE> <COMMENT> This page is an example of a menu page. It plays some prompts and then hangs up. </COMMENT> <PLAY> <PROMPT type="text"> The weather for the county of </PROMPT> <PROMPT type="audio"> /Virginia/Counties/Fairfax.wav </PROMPT> <PROMPT type="text"> will be sunny and shiny. </PROMPT> <PROMPT type="externalaudio"> http://www.angel.com/sounds/somesound.wav </PROMPT> </PLAY> <ACTION type="hangup" /> </MESSAGE> </ANGELXML>
Message page with automatic transition to another voice page
<ANGELXML bargein="false"> <MESSAGE> <COMMENT> This page is an example of a menu page. It plays some prompts and then automatically transitions to another voice page. </COMMENT> <PLAY> <PROMPT type="text"> The weather for the county of </PROMPT> <PROMPT type="audio"> /Virginia/Counties/Fairfax.wav </PROMPT> <PROMPT type="text"> will be sunny and shiny. </PROMPT> <PROMPT type="externalaudio"> http://www.angel.com/sounds/somesound.wav </PROMPT> </PLAY> <GOTO destination="123/4" /> </MESSAGE> </ANGELXML>
Message page with variables
<ANGELXML> <MESSAGE> <PLAY> <PROMPT type="text"> The following AngelXML sets 2 variables: acct_num and vendor_id, and then proceeds to Voice Page #100. </PROMPT> </PLAY> <GOTO destination="/100" /> </MESSAGE> <VARIABLES> <VAR name="acct_num" value="10055" /> <VAR name="vendor_id" value="1234" /> </VARIABLES> </ANGELXML>
Message page with advanced dialog options
<ANGELXML> <MESSAGE> <PLAY> <PROMPT type="text"> What is your favorite soccer team? You can say Real Madrid, Barcelona or Deportivo. </PROMPT> </PLAY> <ERROR_STRATEGY type="nomatch" reprompt="false"> <PROMPT type="text"> What was that again? </PROMPT> <PROMPT type="text"> I’m sorry I didnt understand. You can say Real Madrid, Barcelona, or Deportivo. </PROMPT> <PROMPT type=”text”> I’m having trouble understanding you. Let me take you back. </PROMPT> <ACTION type=”back”/> </ERROR_STRATEGY> <ERROR_STRATEGY type="noinput" reprompt="false"> <PROMPT type="text"> What was that again? </PROMPT> <PROMPT type="text"> I’m sorry I didnt hear you. You can say Real Madrid, Barcelona, or Deportivo. </PROMPT> <PROMPT type=”text”> I’m having trouble hearing you. Let me take you to the next question </PROMPT> <GOTO destination=”/5” /> </ERROR_STRATEGY> <LINK keyword=”Real Madrid” dtmf=”1” destination=”/50” /> <LINK keyword=”Barcelona” dtmf=”2” destination=”/666” /> <LINK keyword=”Deportivo” dtmf=”3” destination=”/51” /> </MESSAGE> </ANGELXML>
Question page with ASR settings
<ANGELXML> <QUESTION> <COMMENT> This page is an example of a question page. It plays some prompts and then prompts for a response from a user. In every case there is ONLY ONE response returned </COMMENT> <PLAY> <PROMPT type="text"> My question to you is: do you know the value of Pi? Hint its 3.14 </PROMPT> </PLAY> <RESPONSE> <NUMBER numberType="natural" destination="123/2" /> </RESPONSE> <ASR_SETTINGS> <PROPERTY name="confidencelevel" value="0.4" /> <PROPERTY name="sensitivity" value="0.3" /> <PROPERTY name="speedvsaccuracy" value="0.5" /> <PROPERTY name="completetimeout" value="3" /> <PROPERTY name="incompletetimeout" value="1" /> <PROPERTY name="interdigittimeout" value="1" /> <PROPERTY name="timeout" value="5" /> <PROPERTY name="maxspeechtimeout" value="3" /> </ASR_SETTINGS> </QUESTION> </ANGELXML>
Question page with number response type
<ANGELXML> <QUESTION> <COMMENT> This page is an example of a question page. It plays some prompts and then prompts for a response from a user. In every case there is ONLY ONE response returned </COMMENT> <PLAY> <PROMPT type="text"> My question to you is: do you know the value of Pi? Hint its 3.14 </PROMPT> </PLAY> <RESPONSE> <NUMBER numberType="natural" destination="123/2" /> </RESPONSE> </QUESTION> </ANGELXML>
Question page with keyword response type and response confirmation enabled
<ANGELXML> <QUESTION> <PLAY> <PROMPT type="text"> When will you come? You can say today, tomorrow, yesterday, or someday </PROMPT> </PLAY> <RESPONSE confirm="true"> <KEYWORD> <LINK keyword="today" dtmf="1" returnValue="todaysValue" destination="123/2" /> <LINK keyword="yesterday" dtmf="2" returnValue="yesterdaysValue" destination="123/2" /> <LINK keyword="tomorrow" dtmf="3" returnValue="tomorrowsValue" destination="123/2" /> <LINK keyword="someday" dtmf="4" returnValue="somedaysValue" destination="123/2" /> </KEYWORD> </RESPONSE> </QUESTION> </ANGELXML>
Question page with yes/no response type
<ANGELXML> <QUESTION> <PLAY> <PROMPT type="text"> Is Real Madrid the best team in the world? </PROMPT> </PLAY> <RESPONSE> <YES_NO> <YES destination="123" /> <NO destination="123/3" /> </YES_NO> </RESPONSE> </QUESTION> </ANGELXML>
Question page with credit card response type
<ANGELXML> <QUESTION> <PLAY> <PROMPT type="text"> Enter your credit card. We accept Amex and Mastercard. </PROMPT> </PLAY> <RESPONSE> <CREDITCARD> <MASTERCARD/> <AMEX/> <VALID destination=”/5” /> <INVALID destination=”/6” /> </CREDITCARD> </RESPONSE> </QUESTION> </ANGELXML>
Question page with credit card expiration response type
<ANGELXML> <QUESTION> <PLAY> <PROMPT type="text"> Now enter your credit card expiration date. For example, enter 1 0 0 4 for October 2004. </PROMPT> </PLAY> <RESPONSE> <CCEXP> <VALID destination=”/5” /> <INVALID destination=”/6” /> </CREDITCARD> </RESPONSE> </QUESTION> </ANGELXML>
Question page with currency response type
<ANGELXML> <QUESTION> <PLAY> <PROMPT type="text"> How much was that apple? </PROMPT> </PLAY> <RESPONSE> <CURRENCY destination=”/123” /> </RESPONSE> </QUESTION> </ANGELXML>
Question page with date response type
<ANGELXML> <QUESTION> <PLAY> <PROMPT type="text"> When were you born? </PROMPT> </PLAY> <RESPONSE> <DATE destination=”/123” /> </RESPONSE> </QUESTION> </ANGELXML>
Question page with time response type
<ANGELXML> <QUESTION> <PLAY> <PROMPT type="text"> At what time does your train depart? </PROMPT> </PLAY> <RESPONSE confirm=”true”> <TIME destination=”/123” /> </RESPONSE> </QUESTION> </ANGELXML><pre> ==Question page with variable response type== <pre><ANGELXML> <QUESTION var="myvar"> <PLAY> <PROMPT type="text"> Please enter 1 or 2. </PROMPT> </PLAY> <RESPONSE> <KEYWORD> <LINK dtmf="1" returnValue="AGREE" destination="/100" /> <LINK dtmf="2" returnValue="DISAGREE" destination="/200" /> </KEYWORD> </RESPONSE> </QUESTION> </ANGELXML>
Transfer page
<ANGELXML> <TRANSFER destination="7032866415" rings="4" if_fail="hangup" if_completed="/2"> <PLAY> <PROMPT type="audio"> /Transfer/please_hold.wav </PROMPT> </PLAY> </TRANSFER> </ANGELXML>
Variable assignment
<ANGELXML> <MESSAGE> <PLAY> <PROMPT type="text"> This will set the value of the variables </PROMPT> </PLAY> <GOTO destination="/100" /> </MESSAGE> <VARIABLES> <VAR name="acct_num" value="12345" /> <VAR name="ListOfAccountTypes" value="checking, savings" type="list" separator=";" /> <VAR name="acct_id" /> </VARIABLES> </ANGELXML>
Voicemail page
<ANGELXML> <VOICEMAIL mailbox="Inbox"> <PLAY> <PROMPT type="text"> Please leave a message after the beep. </PROMPT> </PLAY> </VOICEMAIL> </ANGELXML>
Voicemail page with a transition to another voice page after completion
<ANGELXML> <VOICEMAIL mailbox="Inbox"> <PLAY> <PROMPT type="text"> Please leave a message after the beep. </PROMPT> </PLAY> <GOTO destination="123/3" /> </VOICEMAIL> </ANGELXML>
Voicemail page with a hangup after completion
<ANGELXML> <VOICEMAIL mailbox="Inbox"> <PLAY> <PROMPT type="text"> Please leave a message after the beep. </PROMPT> <ACTION type="hangup" /> </VOICEMAIL> </ANGELXML>
Voicemail page with attributes
<ANGELXML> <VOICEMAIL mailbox="Inbox" confirm="true" finalSilence="3000ms" var="url"> <COMMENT> Example of voicemail with attributes </COMMENT> <PLAY> <PROMPT type="text"> Please leave a message after the beep. </PROMPT> <PROMPT type="sound"> /beep.wav </PROMPT> </PLAY> </VOICEMAIL> </ANGELXML>
This page was last edited on May 13, 2016, at 20:07.
Feedback
Comment on this article: