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.

<assign>  element


Assigns the value specified by the attribute value to the variable specified by the attribute var. As shown above, will assign the value "123" to a variable named "ttt". In addition to variables explicitly assigned by the CallXML markup, CallXML browsers may automatically create variables which contain information related to the call / session.

Variable names must start with a letter (A through Z or a through z) and can contain: A through Z, a through z, 0 through 9, and the underscore. Variable names can be 1 to 40 characters in length and are not case sensitive. Variable names beginning with the characters "session." in any case combination are reserved for internal system variables and cannot be created or set by the programmer. They are excluded from submission in a <goto> or a <run>. The same is for variables of the "application." type.


usage

<assign var="(variable name)">


attributes

var Data Type: (variable name) Default: none - attribute is required
Variable name to use when assigning a value. Not specifying this attribute will result in a fatal error.



possible events

onerror type="document" Document was unable to be fetched for all the reasons web servers are unavailable



code samples

<Assign value - var>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="2.0">
  <block>
    <assign var="MyVar" value="Penn"/>
    <text>
      our variables value is $MyVar;
    </text>
  </block>

  <block>
    <assign var="MyVar" value="Teller"/>
    <text>
      but now that we have changed it, our variables value is $MyVar;
    </text>
  </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