CCXML 1.0-W3C Development Guide Home  |  Frameset Home


<createconference>  element


The <createconference> element is used to create a conferencing object, which is then used to create multi-party conferences. Once this has been created, the CCXML document can then add call legs (using the <join> element), subtract call legs, (using the <unjoin> element) form the conference, or bring down the conference object entirely, (using the <destroyconference> element). Note that any of the above operations will send an asynchronous event to the invoking CCXML document upon completion.


usage

<createconference conferenceid="(ECMAScript Left Hand Side Expression)" confname="(ECMAScript Expression)" hints="(ECMAScript Expression)" reservedlisteners="(ECMAScript Expression)" reservedtalkers="(ECMAScript Expression)">


attributes

conferenceid Data Type: (ECMAScript Left Hand Side Expression) Default: Required
The conferenceid attribute evaluates to a pre-defined ECMAScript variable, which is required in order to receive the URI-formatted conference identifier. This identifier must be unique, (as conferences are globally scoped), and is a required attrbute of the <createconference> element.
confname Data Type: (ECMAScript Expression) Default: Optional
confname evaluates to a ECMAScript string value that is the name of the conference. This attribute value defines the conference identifier that is returned via the conferenceid attribute. In the event that the conference specified does not already exist, then the CCXML platform produces a new conference object and then returns the conference identifier back to the variable denoted in the conferenceid attribute. If a conference is already is in existence, then the CCXML platform will return the conference identifier of the original conference.
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" as shown in the following example:

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

Note: The hints.headers stores what headers to add to the sip request, and that only headers starting with an 'x-' prefix are sent.
reservedlisteners Data Type: (ECMAScript Expression) Default: Optional
Unsupported Attribute

The reservedlisteners attribute allows the developer to specify an ECMAScript expression that returns the number of guaranteed listener slots that the conference mixer is to reserve. In the event that a conference already exists, then this attribute will be ignored. Should the conference mixer be unable to reserve the amount of listener slots requested, then the <createconference> will fail with a error.conference.create event being thrown.
reservedtalkers Data Type: (ECMAScript Expression) Default: Optional
Unsupported Attribute The reservedtalkers attribute allows the developer to specify an ECMAScript expression that returns the number of guaranteed talker slots that the conference mixer is to reserve. In the event that a conference already exists, then this attribute will be ignored. Should the conference mixer be unable to reserve the amount of talker slots requested, then the <createconference> will fail with a error.conference.create event being thrown.



parents

none


children

none


code samples

<1.0 createconference -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" name="event$">
  <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:2223334444'" 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:4445556666'" 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 data="'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



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