CallXML 2.0 Development Guide Home  |  Frameset Home

This documentation is for CallXML 2, which has been superceded by CallXML 3. The CallXML 2 language is not being updated any longer. CallXML 3, however, has many new features and is actively being enhanced. If you're writing a new CallXML application, you should use CallXML 3. Click here for the CallXML 3.0 documentation.

<playnumber>  element


This element is used to play a digit or number value to the caller. The format may either be specified as a digit output, or a numeric output. Any value less than 50 characters long is considered acceptable for this value; going over this limit will result in an event: error "document" (invalid number value) error in the Voxeo Logger.


usage

<playnumber cache="(yes|no)" cleardigits="(true|false)" format="(digits|number)" termdigits="(123456789*#|ABCD)" value="(1234567890)">


attributes

cache Data Type: (yes|no) Default: none - attribute is optional
Allows manual override over the caching mechanism. If this attribute is empty the default system caching is used. "yes" should force the system to use the cache all the time, "no" means that no cache should be used at all.
cleardigits Data Type: (true|false) Default: false
This attribute's value is a Boolean, indicating whether the queued digits buffer should be cleared when this action starts. "true" clears the digits buffer; "false" leaves the contents of the digit buffer alone.
format Data Type: (digits|number) Default: Optional (digits)
The 'format' attribute defines the string formatting  to use for the <play> element. In the case of the playnumber element, this defines whether the variable value should be read off as a digit or a numeric value.
termdigits Data Type: (123456789*#|ABCD) Default: none - attribute is optional
This attribute holds the list of touch-tone digits which can terminate the current caller action. Note that for each termdigit specified, there should be an <ontermdigit> handler in the code to catch the event. Allowable values are any one of "012356789*#", the ordinary DTMF (Touch-Tone) keypad possibilities, plus the special keypad tones found on some telephones "ABCD".
value Data Type: (1234567890) Default: Required
The value attribute defines the numeric string to be played to the caller when the playnumber element is executed. Note that non-numeric characters, (including # and *), will cause a fatal application error, if specified as values in this attribute.



possible events

onerror type="document" Document was unable to be fetched for all the reasons web servers are unavailable
onhangup This event occurs when a session determines that one side of the call has hung up. A typical use for this handler is to execute any necessary clean-up code. See the onhangup element description for further details.
onerror type="linenotactive" Trying to issue a telephony event such as <getdigits> or <playaudio> on a non-active line
onerror type="telephony" Unable to issue a telephony event such as <call> or <playaudio> or <ftp>
ontermdigit Used for catching and handling term digit events as they occur in the call flow. See the ontermdigit element description for further details.



code samples

<playnumber format - value - termdigits>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="2.0">
  <block label="B_1">

    <text>
      Once the digits play, press the pound key.
    </text>

    <playnumber format="digits" value="123" termdigits="#"/>

    <wait value="3s"/>
   
    <ontermdigit value="#">
      <goto value="#B_2"/>
    </ontermdigit>

  </block>

  <block label="B_2">
  <text>
      Once the number plays, press the pound key.
    </text>

    <playnumber format="number" value="123" termdigits="#"/>

    <wait value="3s"/>
   
    <ontermdigit value="#">
      <text>
        Playing the numbers is a crime.
        Unless you are a Mobster, that is.
      </text>
    </ontermdigit>

  </block>
</callxml>



additional links

none


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login



© 2011 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site