CCXML 1.0-W3C Development GuideHome  |  Frameset Home


<merge>  element

Unsupported Element
The <merge> element is used to bridge two connections that are in a CONNECTED state at the network level, (severing the connections to the CCXML platform associated with those calls). If a <merge> operation fails for any reason, then a single error.merge event will be thrown which identifies both of the connections against which the merge was performed.

Note that while this element is currently unsupported on the Voxeo platform, this is planned for inclusion on our network at a later date. When this feature is made available, announcements will be posted to the Prophecy User Forums, and via our Voxeo Developer Newsletter.



usage
<merge connectionid1="(ECMAScript Expression)" connectionid2="(ECMAScript Expression)" hints="(ECMAScript Expression)">


attributes
connectionid1Data Type: (ECMAScript Expression)Default: Required
Unsupported Attribute
The connectionid attribute defines an ECMAScript string value that identifies the first connection to be merged. If this attribute holds an invalid value, then an error.semantic event will be thrown.
connectionid2Data Type: (ECMAScript Expression)Default: Required
Unsupported Attribute
The connectionid attribute defines an ECMAScript string value that identifies the second connection to be merged. If this attribute holds an invalid value, then an error.semantic event will be thrown.
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 merge>
<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0" xmlns="http://www.w3.org/2002/09/ccxml">

<meta name="author" content="Jeff Menkel"/>
<meta name="copyright" content="2007 Voxeo Corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>
 

  <var name="statevar" expr="'state0'"/>
  <var name="connection1" expr="''"/>
  <var name="connection2" expr="''"/>
 
  <eventprocessor statevariable="statevar">
 
    <transition state="state0" event="connection.alerting">
        <assign name="statevar" expr="'state1'"/>
        <assign name="connection1" expr="event$.connectionid"/>
        <accept/>
    </transition>
   
    <transition state="state1" event="connection.connected">
        <assign name="statevar" expr="'state2'"/>
        <createcall dest="'tel:4071112233'" connectionid="connection2"/>
    </transition>
   
    <transition state="state2" event="connection.connected">
        <assign name="statevar" expr="'state3'"/>
        <merge connectionid1="connection1" connectionid2="connection2"/>
    </transition>
   
    <transition state="state3" event="connection.merged">
        <assign name="statevar" expr="'state4'"/>
        <log expr="'Merge was successful!'"/>
    </transition>
   
    <transition state="state4" event="connection.merged">
        <log expr="' *** App. exiting as a result of a successful merge event ***'"/>
        <exit/>
    </transition>
   
    <transition event="error.*">
      <log expr="'***** We got an error: ' + event$.reason"/>
    </transition>
   
  </eventprocessor>
</ccxml>



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