CCXML 1.0 Development Guide Home  |  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 hints="(ECMAScript Expression)" reason="(ECMAScript Expression)">


attributes
hints Data 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.
reason Data 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" name="evt">
  <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" name="evt">
  <log expr="'*** SINCE WE ARE UNIVERSALLY REJECTING ALL CALLS ***'"/>
  <log expr="'*** THIS LOG STATEMENT WILL NEVER BE PRINTED ***'"/>
  </transition>

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

  <transition event="error.*" name="evt">
  <log expr="'ERROR OCCURRED: '+ evt.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



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