CCXML 1.0 Development Guide Home  |  Frameset Home


<createcall>  element

The <createcall> element is used for initiating a bridged transfer to the single outbound destination specified in the dest attribute. The tag is a 'fire and forget' element, meaning that the CCXML document is free to perform other tasks while the call is performed.  When the call attempt has been completed, either sucessfully or unsucessfully, an asynchronous event is sent back to the document, which can be caught via the <transition> element, thus allowing the developer to conference the call, or initiate a VXML dialog with the called party, etc.



usage
<createcall dest="(ECMAScript Expression)" aai="(ECMAScript Expression)" callerid="(ECMAScript Expression)" connectionid="(ECMAScript Expression)" hints="(ECMAScript Expression)" joindirection="(both/calltransmit/callreceive)" joinid="(ECMAScript Expression)" timeout="(ECMAScript Expression)" voxeo-answer-on-media="(true|false)">


attributes
dest Data Type: (ECMAScript Expression) Default: none - attribute is required
This attribute indicates the telephone URL which evaluates to the target for the outbound call. Not specifying this element will certainly cause a fatal, application-stopping error.
aai Data Type: (ECMAScript Expression) Default: Optional
The aai attribute is populated with Application-to-Application Information from the call endpoint when the initial connection is successfully made.

Note: this attribute is non-functional on the Voxeo hosted IVR network due to telco restricions.
callerid Data Type: (ECMAScript Expression) Default: Optional
The callerid attribute is used for specifying a callerid value that will be sent to the destination of the outbound call.

The voxeo platform follows the RFC's for both 'telephone' and 'sip' values, (RFC2806and RFC3261, respectively):

<createcall callerid="tel:+18002223333"...> (absolute syntax)
<createcall callerid="tel:18002223333"...> (exact syntax)
<createcall callerid="sip:xxx.xxx.xxx.xxx" ...> (sip address)
connectionid Data Type: (ECMAScript Expression) Default: Required
The required connectionid attribute of the <createcall> element defines an ECMAScript expression that evaluates to a previously defined variable. The value of this variable is required to receive the identifier of the connection on which the outgoing call is attempted.
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"; 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.
joindirection Data Type: (both/calltransmit/callreceive) Default: Optional
Unsupported Attribute
The joindirection attribute defines the media flow direction between a newly created connection and a pre-existing connection/conference/dialogid that is referenced by the joinid attribute.
Allowable values and their descriptions are:
  • both: Specifes a full duplex connection where the media flows in both directions.
  • calltransmit: The new connection transmits media to the referenced connection/conference/dialog but does not receive any media streams.
  • dialogreceive: The new connection receives media from the referenced connection/conference/dialog but does not transmit any media streams.
joinid Data Type: (ECMAScript Expression) Default: Optional
Unsupported Attribute
The joinid attribute allows the developer to specify an ECMAScript expression that serves as an identifier to a conference/connection/dialog ID that the new call will be joined to.

At the time of this writing, this attribute is entirely unsupported on the Voxeo CCXML 1.0 platform, but we do plan on deploying full support for this feature in the coming months. When this does happen, announcements will be made in our public forums, and Voxeo newsletter. An existing methodology to work around this limitation is to simply workaround is to perform the <join> after the call is established, (call is in a "connection.connected" state).


timeout Data Type: (ECMAScript Expression) Default: Optional
The timeout attribute specifies the amount of time to allow the fetch attempt to be made. If the fetch is not successful by the end of the duration specified, then an error.fetch will be thrown.
voxeo-answer-on-media Data Type: (true|false) Default: Optional (false)
Determines when audio passes from second call leg to the first. If set to "TRUE," this will pass audio back to the originating call leg upon the first instance of media. In practice, this will typically mean the caller hears the standard "telephone ring" as if they had picked up a normal telephone and dialed the number. If set to "FALSE," there will be silence until an actual answer or callfailure is achieved.

Note that this attribute is primarily used to detect that a phone has been answered in the event that the destination number does not send back the proper ISDN signal upon pickup, (common to some 800 numbers).



parents
none


children
none


code samples
<1.0 createcall-dest-callerid-connectionid-timeout> sample
<?xml version="1.0" encoding="UTF-8"?>

<ccxml xmlns="http://www.w3.org/2002/09/ccxml" version="1.0">
  <var name="inboundID"/>
  <var name="outboundID"/>
  <var name="initState" expr="'state1'" />


  <eventprocessor statevariable="initState">
    <transition state="state1" event="connection.alerting" name="evt">
      <log expr="'***** INBOUND CONNECTION ALERTING *****'"/>
      <assign name="inboundID" expr="evt.connectionid" />
      <accept connectionid="inboundID" />
      <assign name="initState" expr="'state2'"/>
    </transition>

    <transition state="state2" event="connection.connected" name="evt">
      <assign name="initState" expr="'state3'"/>
      <log expr="'***** CONNECTION.CONNECTED: INBOUND *****'"/>


    <createcall dest="'tel:4071112222'" callerid="'tel:1112223333'" connectionid="outboundID" timeout="'30s'"/>


    </transition>

    <transition state="state3" event="connection.progressing" name="evt">
      <log expr="'***** CONNECTION.PROGRESSING *****'"/> 
      <assign name="initState" expr="'state4'"/>
    </transition>

    <transition state="state4" event="connection.connected" name="evt">
      <assign name="initState" expr="'state5'"/>
      <log expr="'***** CONNECTION.CONNECTED: INBOUND *****'"/> 
      <join id1="inboundID" id2="outboundID" duplex="'full'"/>
    </transition>

    <transition state="state5" event="conference.joined" name="evt">
      <log expr="'***** CONFERENCE JOINED: INBOUND LEG TO OUTBOUND LEG *****'"/> 
    </transition>

    <transition event="connection.disconnected">
      <log expr="'***** CONNECTION.DISCONNECTED *****'"/> 
      <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



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