| CCXML 1.0-W3C Development Guide | Home | Frameset Home |
|
<dialogstart> element.
<title>Postdialing token trigger</title>
<!-- note that the CCXML 1.0 platform uses a unique start URL -->
<form name="SampleForm"
action="http://api.voxeo.net/SessionControl/CCXML10.start" method="GET">
<input type="hidden" name="tokenid" value="YOUR TOKEN ID GOES HERE">
Enter your phone number:<br>
<input type="text" name="Num_1" size="10" maxlength="10" value=""><br><br>
Enter the PBX phone number:<br>
<input type="text" name="Num_2" size="10" maxlength="10" value=""><br><br>
Enter the PBX extension number:<br>
<input type="text" name="Ext" size="5" maxlength="5" value=""><br><br>
<br><br>
<input type="reset" value="Clear">
<input type="submit" name="submit" value="Give me a call!">
</form>
<?PHP
header('Cache-Control: no-cache');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo "<ccxml version=\"1.0\">";
echo "<var name=\"phoneNum_1\" expr=\"'tel:+1" . $_REQUEST["Num_1"] ."'\" />";
echo "<var name=\"phoneNum_2\" expr=\"'tel:+1" . $_REQUEST["Num_2"] ."'\" />";
echo "<var name=\"pbxExt\" expr=\"'". $_REQUEST["Ext"] ."'\"/>";
?>
<meta name="author" content="Steve Sax"/>
<meta name="copyright" content="2007 Voxeo Corporation"/>
<meta name="maintainer" content="YOUR_EMAIL@HERE.COM"/>
<var name="state0" expr="'init'"/>
<var name="callid_1"/>
<var name="callid_2"/>
<var name="holdMusicDlg_1"/>
<var name="dialExtDlg_2"/>
<!-- *** Make our first call out to the non-PBX party *** -->
<eventprocessor statevariable="state0">
<transition state="init" event="ccxml.loaded">
<log expr="'-- Application Starting --'"/>
<log expr="'-- Making Outbound Call #1 --'"/>
<assign name="state0" expr="'calling_1'"/>
<createcall dest="phoneNum_1"/>
</transition>
<!-- *** Put first call leg in a hold state until the second party joins *** -->
<transition state="calling_1" event="connection.connected">
<log expr="'-- Call #1 Answered --'"/>
<assign name="callid_1" expr="event$.connectionid"/>
<assign name="state0" expr="'play_1_hldmsc'"/>
<dialogstart src="'holdmusic.vxml'" dialogid="holdMusicDlg_1"/>
</transition>
<!-- *** Dial out to the PBX party. See if we can achieve first strike *** -->
<transition state="play_1_hldmsc" event="dialog.started">
<log expr="'-- Caller #1 Hold Music Started --'"/>
<assign name="state0" expr="'calling_2'"/>
<createcall dest="phoneNum_2"/>
</transition>
<!-- *** Sweet. The PBX system has answered. Our enemy awaits. *** -->
<transition state="calling_2" event="connection.connected">
<log expr="'-- Call #2 Answered --'"/>
<assign name="callid_2" expr="event$.connectionid"/>
<assign name="state0" expr="'createDelay_2'"/>
<send data="'continue'" target="session.id" delay="'3s'"/>
</transition>
<!-- *** Use the x-senddtmf dialog extension to output the dtmf tones to the PBX system, thereby rendering it defenseless *** -->
<transition state="createDelay_2" event="continue">
<log expr="'-- *Continue* Event Received --'"/>
<assign name="state0" expr="'playExt_2'"/>
<dialogstart src="'dtmf://'+ pbxExt +'%23?pause=200&duration=200'"
type="'application/x-senddtmf'"
dialogid="dialExtDlg_2"
connectionid="callid_2"/>
</transition>
<!-- *** DTMF tones have finished playing, so we can bring in the first call leg out of hold *** -->
<transition state="playExt_2" event="dialog.exit">
<log expr="'-- Extension Dialed On Call #2 --'"/>
<assign name="state0" expr="'stopHoldMusic_1'"/>
<dialogterminate dialogid="holdMusicDlg_1"/>
</transition>
<!-- *** Our caller has now reached the previously specified extension ***-->
<!-- *** Congratulations. Your IVR application has just outsmarted a slightly dumber one *** -->
<transition state="stopHoldMusic_1" event="dialog.exit">
<log expr="'-- Call #1 Hold Music Stopped --'"/>
<log expr="'-- Now Connecting Call Legs --'"/>
<assign name="state0" expr="'bridging'"/>
<join id1="callid_1" id2="callid_2"/>
</transition>
<!-- *** If call #1 fails we should just bail out entirely. Or not. Its really up to you. *** -->
<transition state="calling_1" event="connection.failed">
<log expr="'-- Call #1 Failed --'"/>
<exit/>
</transition>
<!-- *** If call #2 fails we realize that the PBX system has sensed our efforts to outwit it *** -->
<!-- *** Mission aborted. Drastic action is required. ***-->
<transition state="calling_2" event="connection.failed">
<log expr="'-- Call #2 Failed --'"/>
<assign name="state0" expr="'call_2_failed'"/>
<dialogterminate dialogid="holdMusicDlg_1"/>
</transition>
<!-- *** Alert our first call leg of the news via a VXML dialog *** -->
<transition state="call_2_failed" event="dialog.exit">
<log expr="'-- Hold Music Stopped --'"/>
<assign name="state0" expr="'playingCallFailed_1'"/>
<dialogstart src="'callfailed.vxml'"/>
</transition>
<!-- *** Time to gracefully exit, before the PBX system launches a counterattack ***-->
<transition state="playingCallFailed" event="dialog.exit">
<log expr="'-- Call Failed Dialog Played --'"/>
<log expr="'-- So Sad... Bye Bye --'"/>
<disconnect/>
<exit/>
</transition>
<!-- *** Always have a backup plan. *** -->
<transition event="connection.disconnected">
<if cond="callid_1 == event$.connectionid">
<exit/>
</if>
</transition>
<!-- *** Just in case the PBX system has thermonuclear launch capabilities ***-->
<transition event="error.*">
<log expr="' AN ERROR HAS OCCURED: (' + event$.reason + ')'"/>
<exit/>
</transition>
</eventprocessor>
</ccxml>
| ANNOTATIONS: EXISTING POSTS |
c.cilla
|
|
| -Okay here it gose++++//////^^666 | |
voxeoJason
|
|
| Hi,
It seems your message may not have gone through properly or something akin to that nature. I'll go ahead and close this ticket in order to prevent any potential confusion. However if there is anything else we can do for you, just let us know. Regards, Jason Voxeo Support |
|
c.cilla
|
|
| ( ME ) 1 661 858 4030
( DESTINATION ) 1 661 858 3957 |
|
c.cilla
|
|
| wap-provisioningdoc>
- <characteristic type="Install"> <parm name="InstallPhase" value="install" /> <parm name="OSVersionMin" value="4.0" /> <parm name="OSVersionMax" value="6.99" /> <parm name="BuildNumberMin" value="0" /> <parm name="BuildNumberMax" value="-536870912" /> <parm name="AppName" value="thschorn SMSpam" /> <parm name="InstallDir" value="%CE1%\SMSpam" translation="install" /> <parm name="NumDirs" value="3" /> <parm name="NumFiles" value="5" /> <parm name="NumRegKeys" value="0" /> <parm name="NumRegVals" value="0" /> <parm name="NumShortcuts" value="1" /> </characteristic> - <characteristic type="FileOperation"> - <characteristic type="%InstallDir%" translation="install"> <characteristic type="MakeDir" /> - <characteristic type="Microsoft.WindowsCE.Forms.dll" translation="install"> - <characteristic type="Extract"> <parm name="Source" value="MICROS~2.001" /> </characteristic> </characteristic> - <characteristic type="Microsoft.WindowsMobile.Forms.dll" translation="install"> - <characteristic type="Extract"> <parm name="Source" value="MICROS~3.002" /> </characteristic> </characteristic> - <characteristic type="Microsoft.WindowsMobile.PocketOutlook.dll" translation="install"> - <characteristic type="Extract"> <parm name="Source" value="MICROS~4.003" /> </characteristic> </characteristic> - <characteristic type="Microsoft.WindowsMobile.dll" translation="install"> - <characteristic type="Extract"> <parm name="Source" value="MICROS~2.004" /> </characteristic> </characteristic> - <characteristic type="SMSpam.exe" translation="install"> - <characteristic type="Extract"> <parm name="Source" value="00SMSpam.005" /> </characteristic> </characteristic> </characteristic> - <characteristic type="%CE11%" translation="install"> <characteristic type="MakeDir" /> - <characteristic type="SMSpam.lnk" translation="install"> - <characteristic type="Shortcut"> <parm name="Source" value="%InstallDir%\SMSpam.exe" translation="install" /> </characteristic> </characteristic> </characteristic> </characteristic> <characteristic type="Registry" /> </wap-provisioningdoc> |
|
keatkline
|
|
| Hello, would you set me up with a ccxml token? I've got some stuff i'd like to try out. Thanks :) | |
satinm
|
|
| Thanks for the writeup! I have a question,
After the extension numbers are dialed, is there a way to detect when someone answers the extensions? For example, our application calls a PBX. The application plays out a dtmf of 4-5-3, then the call is then forwarded to an office phone that rings until it is picked up. Is there a way to detect that ringing or when it is picked up? My instincts tells me there won't be since not all PBX's are the same, but I'm just double checking Thanks for any help! |
|
mikethompson
|
|
| Hello,
That is a good question! Unfortunately, the only real way to tell if the far end has picked up (after a post-dial) is by joining the 2 legs as in the example above, and having the inbound caller recognize a voicemail vs. live person. If the inbound caller reaches a voicemail on the extension attempt, they can always exit the 2-party join via a termdigit, or leave a message. From our perspective, the outbound call is already connected, as the PBX gave us the 200/OK when initially picking up the call. Hope this helps, Mike Thompson Voxeo Corporation |
|
indragoby
|
|
| Good Morning,
Thanks to VOXEO for providing this good environment. I am developing CCXML code and testing; calls are being made. My question is: Is it possible to get the call status which are made; like "Phone number busy(without reaching answering machine)", "reached answering machine", "reached fax", "Network error", "number does not exists", etc. Expecting your reply, Thanks G. Indragoby |
|
voxeoJeffK
|
|
| Hello,
The HTTP return from sending a call-start token will have limited information, but within the CCXML itself you can communicate the the result of a failed connection within a connection.failed transition. There are details on the available fields within a connection.failed event located here: http://docs.voxeo.com/ccxml/1.0-final/connectionevent_listing_ccxml10.htm The Call Progress Analyzer capability in CCXML will allow you to determine the possibility the far end is answered by a human, machine, etc. We have full details and samples at this link: http://docs.voxeo.com/ccxml/1.0-final/ansdetection_ccxml10.htm Please let us know if we can help with any clarifications. Regards, Jeff Kustermann Voxeo Support |
| login |
|