CallXML 2.0 Development GuideHome  |  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.
<oncallfailure>  element

This event occurs when the session determines that the attempted call cannot be completed because the dialed number is busy, a circuit is unavailable, a SIT tone was detected or other detectable call failure mode. The call is not automatically disconnected; rather, this element allows the developer to catch the event and attempt another action.


usage
<oncallfailure next="(navigation identifier)" value="(busy|unreachable|rejected|unknown)">


attributes
nextData Type: (navigation identifier)Default: none - attribute is optional
The 'next' attribute sets the URL the CallXML platform will go to when the container ends.
valueData Type: (busy|unreachable|rejected|unknown)Default: none - attribute is optional
The value attribute defines the possible type of call failure encountered by the CallXML application. This can be useful in determining how to proceed when differnt responses are returned from the call destination The type given in an <onCallFailure> element will be compared against the actual failure type and, if identical, any CallXML contained within the <onCallFailure> element will be executed.

The possible values for this element are:
  • busy - destination number returned a busy signal
  • unreachable - this is returned when the destination number returns a SIT tone;( 'doo doo dee, the number you have dialed is not in service at this time'), most often, the dialed number is either employing a call screening device, or is indeed out of service

  • rejected - this event will very rarely get returned. In some circumstances, a switch or PSTN  might return a series of codes to the CallXML browser, informing it that the destination number has been rejected at the Telco level

  • unknown - the call was rejected for unknown reasons



possible events
none


code samples
<Parent.xml>
<?xml version="1.0" encoding="UTF-8"?>

<callxml version="2.0">

<block>
    <assign var="ParentSessionID" value="$session.ID;"/>
    <assign var="NumToCall" value="1112223333"/>

    <run value="Call_Target.cfm"
  submit="*"
  method="get"
  var="NewSessionID" />

    <block label="HoldMusic"
          repeat="3">

      <playaudio format="audio/wav"
          value="RingTone.wav"
          termdigits=""/>


      <onexternalevent value="Success">
        <conference targetsessions="$session.EventsenderID;"/>
        <hangup/> 
      </onexternalevent> 
 
      <onexternalevent value="busy">
        <text>
          Busy signal from the called party.
        </text>
      </onexternalevent>

      <onexternalevent value="unreachable">
        <text>
          The called party is unreachable.
        </text>
      </onexternalevent>

      <onexternalevent value="rejected">
        <text>
          The called party rejected your call.
        </text>
      </onexternalevent>

      <onexternalevent value="unknown">
        <text>
          Received an unknown call failure. Panic at will.
        </text>
      </onexternalevent>
   
      <onexternalevent value="TimedOut">
        <text>
          Max time for the call was reached, now disconnecting.
        </text>
      </onexternalevent>


    </block>

  </block>

</callxml>



<Oncallfailure (busy/noanswer/unreachable/rejected/unknown)>
<?xml version="1.0" encoding="UTF-8"?>

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

<call value="$NumToCall;"
      maxtime="20s" callerID="6666666666"/>

 
    <onanswer>
      <sendevent value="Success"
                session="$ParentSessionID;"/>
      <wait value="Unlimited"/>                     
    </onanswer>
 
    <oncallfailure value="busy">
      <sendevent value="busy"
                session="$ParentSessionID;"/>
    </oncallfailure>


    <oncallfailure value="unreachable">
      <sendevent value="unreachable"
                session="$ParentSessionID;"/>
    </oncallfailure>
 
    <oncallfailure value="rejected">
      <sendevent value="rejected"
                session="$ParentSessionID;"/>
    </oncallfailure>

    <oncallfailure value="unknown">
      <sendevent value="unknown"
                session="$ParentSessionID;"/>
    </oncallfailure>

    <onmaxtime>
      <sendevent value="TimedOut"
                session="$ParentSessionID;"/>
    </onmaxtime>

  </block>

</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