| CCXML Voxeo 1.0 Development Guide | Home | Frameset Home |
|
<join> two call legs
<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE THAT WE *MUST* DECLARE THE xmlns ATTRIBUTE -->
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">
</ccxml>
<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE THAT WE *MUST* DECLARE THE xmlns ATTRIBUTE -->
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">
<var name="state0" expr="'init'"/>
<eventhandler statevariable="state0">
<transition state="'init'" event="connection.CONNECTION_ALERTING">
<accept/>
</transition>
<transition state="'init'" event="connection.CONNECTION_CONNECTED" name="evt">
<var name="callid_in" expr="evt.callid"/>
</transition>
<transition event="call.CALL_INVALID" name="evt">
<if cond="callid_in == evt.callid">
<exit/>
</if>
</transition>
<transition event="error.*" name="evt">
<log expr="'an error has occured (' + evt.error + ')'"/>
<exit/>
</transition>
</eventhandler>
</ccxml>
<transition state="'init'" event="connection.CONNECTION_CONNECTED" name="evt">
<var name="callid_in" expr="evt.callid"/>
<assign name="state0" expr="'enterpin'"/>
<dialogstart src="'enterpin.vxml'" type="'application/xml+vxml;platform=motorola'"/>
</transition>
<exit> element. In this case, it is returning a variable called "pin": <exit namelist="pin"/>
<transition state="'enterpin'" event="dialog.exit" name="evt">
<log expr="'PIN = [' + evt.pin + ']'"/>
</transition>
<transition state="'enterpin'" event="dialog.exit" name="evt">
<log expr="'PIN = [' + evt.pin + ']'"/>
<if cond="'1234' != evt.pin">
<exit/>
<else/>
<var name="pin" expr="evt.pin"/>
</if>
<assign name="state0" expr="'calling'"/>
<dialogstart src="'holdmusic.vxml'" name="holdMusicDlg" type="'application/xml+vxml;platform=motorola'"/>
<createcall dest="'8315551234'"/>
</transition>
<transition state="'calling'" event="connection.CONNECTION_FAILED">
<assign name="state0" expr="'callfailed'"/>
<dialogterminate sessionid="holdMusicDlg"/>
</transition>
<transition state="'callfailed'" event="dialog.exit">
<assign name="state0" expr="'playingCallFailed'"/>
<dialogstart src="'callfailed.vxml'" type="'application/xml+vxml;platform=motorola'"/>
</transition>
<transition state="'playingCallFailed'" event="dialog.exit">
<disconnect/>
</transition>
<disconnect> event (which will be caught by our already listed "CALL_INVALID" trap). This concludes the logical sequence for the outbound call not being completed.
<transition state="'calling'" event="connection.CONNECTION_CONNECTED" name="evt">
<var name="callid_out" expr="evt.callid"/>
<assign name="state0" expr="'callAccepted'"/>
<dialogstart src="'newcall.php'" namelist="pin" type="'application/xml+vxml;platform=motorola'"/>
</transition>
<transition state="'callAccepted'" event="dialog.exit" name="evt">
<if cond="evt.callid == callid_in">
<exit/>
<else/>
<assign name="state0" expr="'beforeBridging'"/>
<dialogterminate sessionid="holdMusicDlg"/>
</if>
</transition>
<transition state="'beforeBridging'" event="dialog.exit">
<assign name="state0" expr="'bridged'"/>
<join sessionid1="callid_in" sessionid2="callid_out"/>
</transition>
<join>, we link our two saved Call IDs together, and the beauty of human-to-human communication is achieved.
<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE THAT WE *MUST* DECLARE THE xmlns ATTRIBUTE -->
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">
<var name="state0" expr="'init'"/>
<eventhandler statevariable="state0">
<transition state="'init'" event="connection.CONNECTION_ALERTING">
<accept/>
</transition>
<transition state="'init'" event="connection.CONNECTION_CONNECTED" name="evt">
<var name="callid_in" expr="evt.callid"/>
<assign name="state0" expr="'enterpin'"/>
<dialogstart src="'enterpin.vxml'" type="'application/xml+vxml;platform=motorola'"/>
</transition>
<transition state="'enterpin'" event="dialog.exit" name="evt">
<log expr="'PIN = [' + evt.pin + ']'"/>
<if cond="'1234' != evt.pin">
<exit/>
<else/>
<var name="pin" expr="evt.pin"/>
</if>
<assign name="state0" expr="'calling'"/>
<dialogstart src="'holdmusic.vxml'" name="holdMusicDlg" type="'application/xml+vxml;platform=motorola'"/>
<createcall dest="'8315551234'"/>
</transition>
<transition state="'calling'" event="connection.CONNECTION_FAILED">
<assign name="state0" expr="'callfailed'"/>
<dialogterminate sessionid="holdMusicDlg"/>
</transition>
<transition state="'callfailed'" event="dialog.exit">
<assign name="state0" expr="'playingCallFailed'"/>
<dialogstart src="'callfailed.vxml'" type="'application/xml+vxml;platform=motorola'"/>
</transition>
<transition state="'playingCallFailed'" event="dialog.exit">
<disconnect/>
</transition>
<transition state="'calling'" event="connection.CONNECTION_CONNECTED" name="evt">
<var name="callid_out" expr="evt.callid"/>
<assign name="state0" expr="'callAccepted'"/>
<dialogstart src="'newcall.php'" namelist="pin" type="'application/xml+vxml;platform=motorola'"/>
</transition>
<transition state="'callAccepted'" event="dialog.exit" name="evt">
<if cond="evt.callid == callid_in">
<exit/>
<else/>
<assign name="state0" expr="'beforeBridging'"/>
<dialogterminate sessionid="holdMusicDlg"/>
</if>
</transition>
<transition state="'beforeBridging'" event="dialog.exit">
<assign name="state0" expr="'bridged'"/>
<join sessionid1="callid_in" sessionid2="callid_out"/>
</transition>
<transition event="call.CALL_INVALID" name="evt">
<if cond="callid_in == evt.callid">
<voxeo:sendemail to="'yourEmail@there.com'"
from="'myApp@here.com'"
type="'debug'"
body=" 'call.CALL_INVALID detected ! ' "/>
<exit/>
</if>
</transition>
<transition event="error.*" name="evt">
<log expr="'an error has occured (' + evt.error + ')'"/>
<voxeo:sendemail to="'yourEmail@there.com'"
from="'myApp@here.com'"
type="'debug'"
body=" 'generic error detected ! ' "/>
<exit/>
</transition>
</eventhandler>
</ccxml>
| ANNOTATIONS: EXISTING POSTS |
jason.m.hanna
|
|
| I noticed that the holdmusic.vxml dialog generates an error in the logs because it creates a loop by calling itself.
Obviously this is the behavior we want while waiting for a call to be connected, but does the occurence and handling of the error degrade performance or otherwise cause issues on the Voxeo platform in any way? In short I guess I'm asking if there is a better way to program an audio loop. 14:14:37.543: =========================== An error occurred while executing the following dialog. Initial URL: file:///c:/nuance/callrouting/motnewcall.vxml Current URL: holdmusic.vxml Calling Number (ANI): 0000123456 Called Number (DNIS): dialog.vxml.http%3a%2f%2fmydomain.com%3a8080%2fvoice%2fpa Redirecting Number (RDNIS): "" State: Form VoiceXML Browser Version: 5.5.129.122 Date/Time: 2007/2/23 14:14:37.543 VoiceException: error.semantic.fatal Fetched and compiled 20 documents in a row that didn't listen to the user. Probable dialog loop. Dialog stack trace: State (Dialog) URL (Document) -------------- ------------------------------ Form http://mydomain.com:8080/voice/pages/ccxml/SampleBridge/holdmusic.vxml Thanks! -jmh |
|
MattHenry
|
|
|
Hi there, The short answer is that this can really be rectified by having a much longer audio or TTS prompt in the dialog itself, or by creating a "dummy" field as illustrated in our VXML docs. In terms of this affecting the network at any level, the message that you have received is a notification that our loop detection is stopping the VXML long before it could degrade performance on our server. Hope this helps to explain! ~Matthew Henry |
| login |
|