CCXML 1.0-W3C Development GuideHome  |  Frameset Home


<reject>  element

The <reject> tag is an element used for call authentication, in most cases. When encountered the CCXML document will reject an incoming phone call.  Rejected phone calls will go unanswered and may return a fast busy to the caller.


usage
<reject connectionid="(ECMAScript Expression)" hints="(ECMAScript Expression)" reason="(ECMAScript Expression)">


attributes
connectionidData Type: (ECMAScript Expression)Default: Optional
The connectionid attribute allows the developer to specify an ECMAScript expression whose string value serves as the identifier of a connection on which the incoming call is signalled. If this value is unspecified, then the CCXML interpreter will use the id value of the current event being processed. If the attribute value is invalid or there is no valid default value, an error.semantic event will be thrown.
hintsData Type: (ECMAScript Expression)Default: Optional
The hints attribute can be used to specify information used by the platform to configure the event processor. The value of this attribute should equate to an object that contains an array property of "headers"; for instance:


<script>
  var Hints = new Object();
  Hints.headers = new Object();
  Hints.headers['x-mySipHeader'] = 'hello world';
</script>


Note that 'hints.headers' stores what headers to add to the sip request, and that only headers starting with an 'x-' prefix are sent.
reasonData Type: (ECMAScript Expression)Default: none - attribute is optional
The reason attribute returns a user-defined ECMAScript string indicating the reason for the call being rejected



parents
none


children
none


code samples
<1.0 reject -hints> sample
<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml">


<eventprocessor>

  <transition event="connection.alerting">
  <script>
    var myObj = new Object();
    myObj.value1 = 'rejectValue1';
    myObj.value2 = 'rejectValue2';
  </script>
  <reject hints="myObj"/>
  <log expr="'***** MYOBJ.VALUE1 = ' + myObj.value1"/>
  <log expr="'***** MYOBJ.VALUE2 = ' + myObj.value2"/>
  </transition>

  <transition event="connection.connected">
  <log expr="'*** SINCE WE ARE UNIVERSALLY REJECTING ALL CALLS ***'"/>
  <log expr="'*** THIS LOG STATEMENT WILL NEVER BE PRINTED ***'"/>
  </transition>

  <transition event="connection.disconnected">
  <log expr="'*** THE CALL HAS BEEN REJECTED ***'"/>
  </transition>

  <transition event="error.*">
  <log expr="'ERROR OCCURRED: '+ event$.name"/>
  <exit/>
  </transition>

</eventprocessor>

</ccxml>



additional links
W3C Specification


  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