CCXML 1.0-W3C Development GuideHome  |  Frameset Home


<destroyconference>  element

The <destroyconferenece> element is used to tear down a conference object that was instatiated using the <createconference> element. Upon completion of this operation, an asynchronous event will be sent to the CCXML document notifying the application that the conference has indeed been destroyed.


usage
<destroyconference conferenceid="(ECMAScript Expression)" hints="(ECMAScript Expression)">


attributes
conferenceidData Type: (ECMAScript Expression)Default: Required
The conferenceid attribute defines the ECMAScript string value that is the identifier of the target conference to be destroyed. If the attribute value is invalid, then an error.semantic event will be thrown to the CCXML interpreter.
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.



parents
none


children
none


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

<var name="caller1id"/>
<var name="caller2id"/>
<var name="confid"/>
<var name="state0" expr="'not_inited'"/>
<var name="incomingcall"/>
<var name="callcount" expr="0"/>

<eventprocessor statevariable="state0">
  <transition event="ccxml.loaded">
  </transition>

  <transition event="connection.alerting">
  <script>
    var myObj = new Object();
    myObj.value1 = 'result1';
    myObj.value2 = 'result2';
    </script>

    <assign name="state0" expr="'accepting'"/>
    <assign name="incomingcall" expr="event$.connectionid"/>
    <accept/>
  </transition >

  <transition event="connection.connected" state="accepting">
    <assign name="callcount" expr="callcount+1"/>
    <dialogstart src="'null://?text=Please wait for all parties to join&amp;termdigits=1&amp;voice=English-SAPI'" type="'application/x-texttospeech'"/>
    <log expr="'*** CREATING CONFERENCE ***'"/>
    <createconference conferenceid="confid" hints="myObj"/>
    </transition>

    <transition event="dialog.exit" state="accepting">
    <assign name="state0" expr="'joining0'"/>
    <join id1="confid" id2="incomingcall"/>
    </transition>

    <transition event="conference.created">
    </transition>

    <transition event="conference.joined" state="joining0">
    <assign name="state0" expr="'calling1'"/>
    <log expr="'*** DIALING FIRST PARTY ***'"/>
    <createcall dest="'tel:4071112222'" callerid="'1112223333'" connectionid="caller1id"/>
    </transition>

    <transition event="connection.connected" state="calling1">
    <assign name="callcount" expr="callcount+1"/>
    <assign name="state0" expr="'calling2'"/>
    <dialogstart src="'null://?text=Please wait for all parties to join&amp;termdigits=1&amp;voice=English-SAPI'" type="'application/x-texttospeech'"/>
    </transition>

    <transition event="dialog.exit" state="calling2">
      <join id1="confid" id2="caller1id"/>
    </transition>

    <transition event="conference.joined" state="calling2">
    <log expr="'*** DIALING SECOND PARTY ***'"/>
    <createcall dest="'tel:4072223333'" callerid="'3334445555'" connectionid="caller2id"/>
    </transition>

    <transition event="connection.connected" state="calling2">
      <assign name="callcount" expr="callcount+1"/>
      <assign name="state0" expr="'joining2'"/>
      <log expr="'*** JOINING SECOND PARTY: ' + confid"/>
      <join id1="confid" id2="caller2id"/>
    </transition>

    <transition event="conference.joined" state="joining2">
    <log expr="'*** ALL PARTIES JOINED IN CONFERENCE ***'"/>
    <send name="'deletemyconference'" delay="'600s'" target="session.id"/>
    </transition>

    <transition event="connection.disconnected">
    <assign name="callcount" expr="callcount-1"/>
    <if cond="callcount == 1">
      <!-- ONE PERSON STILL ON CONFERENCE; DISCONNECT HIM -->
      <destroyconference conferenceid="confid" hints="myObj"/>
      <exit/>
    </if>
    </transition>

    <transition event="deletemyconference">
    <destroyconference conferenceid="confid"/>
    <exit/>
    </transition>

    <transition event="error.conference.join" state="joining1">
    <log expr="'*** ERROR CONNECTING SECOND PARTY ***'"/>
    <exit/>
    </transition>

    <transition event="error.conference.join" state="joining2">
    <log expr="'*** ERROR CONNECTING THIRD PARTY ***'"/>
    <exit/>
    </transition>

    <transition event="conference.destroyed">
    <log expr="'*** CONFERENCE DESTROYED ***'"/>
    <exit/>
    </transition>

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