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.
<onexternalevent>  element

This event occurs when another session sends an external event to the current session.



usage
<onexternalevent next="(navigation identifier)" value="(error-event type)">


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: (error-event type)Default: none - attribute is optional
The value attribute for the <onexternalevent> element defines the type of event to be caught by the CallXML code, usually from a <sendevent> element loacted elsewhere in the application. When a specific event is effectively caught, any code contained within the <onexternalevent> will then be executed.



possible events
none


code samples
<Onexternalevent value>
<?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>
          All lines are currently busy.
          Please hang up and try your call again later.
        </text>
        <hangup/>
      </onexternalevent>

      <onexternalevent value="TimedOut">
        <text>
          There is no answer.
          Please hang up and try your call again later.
        </text>
        <hangup/>
      </onexternalevent>


    </block>

  </block>

</callxml>


<ChildSession.xml>
<?xml version="1.0" encoding="UTF-8"?>

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

<call value="$NumToCall;"
      maxtime="20s" callerID="6666666666"/>
 
    <onanswer>
      <log> *** SENDING EVENT TO PARENT SESSION *** </log>
      <sendevent value="Success"
                session="$ParentSessionID;"/>
      <wait value="Unlimited"/>                     
    </onanswer>
 
    <oncallfailure value="busy">
      <log> *** SENDING EVENT TO PARENT SESSION *** </log>
      <sendevent value="busy"
                session="$ParentSessionID;"/>
    </oncallfailure>

    <oncallfailure value="noanswer">
      <log> *** SENDING EVENT TO PARENT SESSION *** </log>
      <sendevent value="noanswer"
                session="$ParentSessionID;"/>
    </oncallfailure>

    <oncallfailure value="unreachable">
      <log> *** SENDING EVENT TO PARENT SESSION *** </log>
      <sendevent value="unreachable"
                session="$ParentSessionID;"/>
    </oncallfailure>
 
    <oncallfailure value="rejected">
      <log> *** SENDING EVENT TO PARENT SESSION *** </log>
      <sendevent value="rejected"
                session="$ParentSessionID;"/>
    </oncallfailure>

    <oncallfailure value="unknown">
      <log> *** SENDING EVENT TO PARENT SESSION *** </log>
      <sendevent value="unknown"
                session="$ParentSessionID;"/>
    </oncallfailure>

    <onmaxtime>
      <log> *** SENDING EVENT TO PARENT SESSION *** </log>
      <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