CallXML 3.0 Development GuideHome  |  Frameset Home


<reject>  element

The <reject/> element enables CallXML applications to reject incoming calls before they are answered. For example, the application could inspect the callerid variable to determine if the caller is known, and use the <reject/> or <answer/> element accordingly.

Note that in order to use either <reject/> or <answer/>, the auto-answer setting must be turned off for that application in the Voxeo Account Manager.



usage
<reject id="(element id)" value-is="STRING" value-is-not="STRING">


attributes
idData Type: (element id)Default: none - attribute is optional
The new 'id' attribute in CallXML3.0 is applicable to all container and action elements. Specifying this attribute allows yet another level of control and event handling when events occur and are caught by the <on> element. When an event occurs, the handler will first check the event, and then verify that the handler has a handler specific to the 'id' attribute to execute. This allows the developer to plan a specific course of action for events based on where in the application that they occur.
value-isData Type: STRINGDefault: none - attribute is optional
Another new attribute, 'value-is', grants the developer with the ability to perform conditional logic upon container elements, or action elements for the first time within the CallXML markup. The value specified in the 'value-is' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is' equate to 'true', then the element specified will execute. If the value equates to 'false' then the element will be skipped during document execution.
value-is-notData Type: STRINGDefault: none - attribute is optional
Another new attribute, 'value-is-not', grants the developer with the ability to perform conditional logic upon container elements, or action elements, for the first time within the CallXML markup. The value specified in the 'value-is-not' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is-not' equate to 'false', then the element specified will execute. If the value equates to 'true' then the element will be skipped during document execution.



code samples
<3.0 reject-test>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="3.0">


<!-- note that 'auto-answer' must be turned off in your application -->
<!-- detail screen in order for this work as it is shown here -->

  <if>
 
    <reject test="1=2">
      <log>
        this will not be executed, as '1' is not equal to '2'.
      </log>
    </reject>


    <reject test="1=1">
      <log>
        this will be executed, as '1' is equal to '1'.
      </log>
    </reject>

  </if>

</callxml>


<3.0 reject-valueis>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="3.0">


<!-- note that 'auto-answer' must be turned off in your application -->
<!-- detail screen in order for this work as it is shown here -->

  <do value="$session.callerid;">

  <log/>
<!-- this will only answer when the callerID is 4071112222 -->
    <answer value-is="4071112222">
    <say>
      this is executed when the caller ID is equal to 4 0 7 8 3 5 0 0 5 8.
    </say>
    </answer>

<!-- this will only reject when the callerID is not 4072223333 -->
    <reject value-is-not="4072223333"/>

<!-- this will only reject when the callerID is 4073334444 -->
    <reject value-is="4073334444"/>

    <prompt value="If you got this far, then your call was accepted!"/>

  </do>

</callxml>




additional links
none


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

login



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