Using <join> to Bridge Calls

Blueworx Voice Response supports CCXML bridging of calls using the join and unjoin CCXML elements. Support of these elements and their attributes are defined in CCXML Elements

The following is an example of a CCXML application that accepts an incoming call and starts a dialog. Once the dialog completes it sets up an outgoing call and then bridges the incoming and outgoing calls using the join element. Blueworx Voice Response remains connected to both calls until they hang up.

Note that exiting a CCXML session will automatically terminate any calls that it still owns.

<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0">
<var name="destination" expr="'sip:1234@siphost.blueworx.com'"/>
<var name="conn1" expr="''"/>
<var name="conn2" expr="''"/>
<eventprocessor>
        <transition event="ccxml.loaded">
                <log expr="'[ccxml.loaded] You have successfully invoked this join test application with session id ' + session.id"/>
        </transition>

        <transition event="connection.alerting">
                <log expr="'[' + event$.name + '] with connection ID ' + event$.connectionid"/>
                <assign name="conn1" expr="event$.connectionid"/>
                <accept/>
        </transition>

        <transition event="connection.connected" cond="conn2 == ''">
                <log expr="'[' + event$.name + '] with connection ID ' + event$.connectionid"/>
                <dialogstart src="'file:///opt/blueworx/ccxml/playwav.vxml'"/>
        </transition>

        <transition event="connection.connected">
                <log expr="'[' + event$.name + '] with connection ID ' + event$.connectionid"/>
                <join id1="conn1" id2="conn2" dtmfclamp="false"/>
        </transition>

        <transition event="connection.disconnected">
                <log expr="'[' + event$.name + '] with connection ID ' + event$.connectionid"/>
                <exit/>
        </transition>

         <transition event="connection.progressing">
                <log expr="'[' + event$.name + '] with connection ID ' + event$.connectionid"/>
        </transition>

        <transition event="conference.joined">
                <log expr="'[' + event$.name + '] with IDs ' + event$.id1 + ' and ' + event$.id2"/>
        </transition>

        <transition event="dialog.started">
                <log expr="'[dialog.started]'"/>
        </transition>

         <transition event="dialog.exit">
                <createcall dest="destination" connectionid="conn2"/>
        </transition>

        <transition event="conference.unjoined">
                <log expr="'[' + event$.name + '] with IDs ' + event$.id1 + ' and ' + event$.id2"/>
                <disconnect connectionid="conn1"/>
                <disconnect connectionid="conn2"/>
        </transition>


        <transition event="error.*">
                <log expr="'[' + event$.name + '] with connection ID ' + event$.connectionid + ' and reason ' + event$.reason"/>
                <exit/>
        </transition>

        <transition event="*">
                <log expr="'[' + event$.name + '] fell through to catchall '"/>
                <exit/>
        </transition>

</eventprocessor>
</ccxml>