request-outbound-immediate
<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml"
xmlns:queue="www.genesyslab.com/modules/queue"
xmlns:yahoo_placefinder="http://www.genesyslab.com/modules/dfm/yahoo_placefinder/v1"
xmlns:ws="http://www.genesyslab.com/modules/ws" xmlns:session="www.genesyslab.com/modules/session"
xmlns:ixn="http://www.genesyslab.com/modules/interaction" initial="initial">
<datamodel>
<!-- parameters -->
<data id="_phone_number" _type="parameter" />
<data id="_data_id" _type="parameter" />
<data id="_ttl" _type="parameter" />
<!-- globals -->
<data id="reqid" />
<data id="startSendId" />
</datamodel>
<state id="initial">
<transition event="gms.start" target="serviceEntry">
<script>
_data.startSendId = _event.sendid;
</script>
</transition>
</state>
<state id="serviceEntry" initial="handleStart">
<onentry>
<send event="'serviceTimeout'" delay="_data._ttl"/>
</onentry>
<transition event="serviceTimeout" target="error" />
<state id="handleStart">
<onentry>
<script>
// TODO: Update routepoint below. Add a routepoint to config
to be used as the source below
var src = {"type":"rp",
"dn":"gms_preconfig_callorig_rp"};
// TODO: Attach data as required.
Can also fetch data using _data_id from storage
var userInfo = new
Object();
data['name1'] = 'value1';
data['name2'] = 'value2';
</script>
<ixn:createcall requestid="_data.reqid" from="src"
to="_data._phone_number" udata="userInfo" />
</onentry>
<transition event="voice.createcall.done" target="waitForOutboundCall" />
<transition event="error.voice.createcall" target="error" />
<onexit>
<ws:response requestid="_data.startSendId" resultcode="_sessionid" />
</onexit>
</state>
<state id="waitForOutboundCall">
<transition event="interaction.present" target="connectToAgent" />
</state>
<state id="connectToAgent">
<onentry>
<!--
TODO: route interaction using queue:submit or ixn:redirect as
appropriate
-->
<!--
queue:submit …
OR
ixn:redirect to configured agent DN …
-->
</onentry>
<!--
Have the appropriate set of transitions to handle the results of the
routing action.
-->
<transition event="*.done" target="exit" />
</state>
</state>
<final id="exit" />
<final id="error" />
</scxml>
</div>
This page was last edited on February 28, 2013, at 17:28.
Comments or questions about this documentation? Contact us for support!
