| CallXML 3.0 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0">
<call value="tel:1112223333"
maxtime="60"
voxeo-cpa-maxsilence="1"
voxeo-cpa-maxtime="4"
voxeo-cpa-runtime="20"
voxeo-cpa-maskstop="human, machine, beep"
voxeo-cpa-maskevent="human, machine, beep"/>
<on event="answer" next="#waitBlock">
<log value="*** Call has been answered ***" />
</on>
<block label="waitBlock">
<wait value="60"/>
<exit/>
</block>
<on event="cparesult:human">
<log value="*** HUMAN DETECTED ***"/>
<exit/>
</on>
<on event="cparesult:machine">
<log value="*** MACHINE DETECTED ***"/>
<exit/>
</on>
<on event="cparesult:beep">
<log value="*** BEEP DETECTED ***"/>
<exit/>
</on>
<on event="cparesult:unknown">
<log value="*** CPA RUNTIME EXPIIRED ***"/>
<exit/>
</on>
<on event="error">
<log value="*** $session.lasterror; ***"/>
<say>
A naughty error has occured.
This application will now gracefully bow out.
</say>
</on>
</callxml>
<?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0">
<call value="tel:1112223333"
maxtime="60"
voxeo-cpa-maxsilence="1"
voxeo-cpa-maxtime="4"
voxeo-cpa-runtime="300"
voxeo-cpa-maskstop=""
voxeo-cpa-maskevent="machine, beep"/>
<on event="answer" next="#waitBlock">
<log value="*** Call has been answered ***" />
</on>
<block label="waitBlock">
<wait value="60"/>
<exit/>
</block>
<block label="playMessage" repeat="2" next="#messageComplete">
<playaudio value="message.wav"/>
</block>
<block label="messageComplete">
<log value="*** MESSAGE COMPLETE / EXIT ***"/>
<exit/>
</block>
<on event="cparesult:human" next="#playMessage">
<log value="*** HUMAN DETECTED ***"/>
</on>
<on event="cparesult:machine" next="#playMessage">
<log value="*** MACHINE DETECTED ***"/>
</on>
<on event="cparesult:beep" next="#playMessage">
<log value="*** BEEP DETECTED ***"/>
</on>
<on event="cparesult:unknown">
<log value="*** CPA RUNTIME EXPIIRED ***"/>
<exit/>
</on>
<on event="error">
<log value="*** $session.lasterror; ***"/>
<say>
A naughty error has occured.
This application will now gracefully bow out.
</say>
</on>
</callxml>
| ANNOTATIONS: EXISTING POSTS |
jagpno
|
|
| Neither example works with Prophecy version 7.0.242.0, but returns an error: unhandled event "event="oncparesult", id="", type="human"
There are also a couple of typos: <callxml version="2.0"> Should be: <callxml version="3.0"> Advanced CPA reads: <on event="error> Should be: <on event="error"> But even after fixing these, it still does not work. |
|
MattHenry
|
|
|
Hi there, Per the engineering team, it appears as if we recently introduced a system bug where the presence of the <exit/> tag in the block prevents events from being fired correctly while in this block. We have sceduled some engineering face-time with this bug on Monday where we can look at applying a patch for this problem, but in the meantime, we can replace <exit/> with a <goto> that points to a to a block that contains the exit tag. Let me know if this presents any difficulties! ~Matthew Henry |
|
MattHenry
|
|
|
Just as an FYI, this has been fixed in prophecy build 286+. We expect to have a GA release ready within the next few days that will allow you to run the code as presented in the documentation. Cheers, ~Matthew Henry |
|
giridhar
|
|
| in case of an error or MACHINE DETECTED how do i update my database ? or send a message to my web server ? using callxml ?
|
|
VoxeoBrian
|
|
| Hello,
Within CallXML, to submit the status of a call back to a webserver simply utilize the on event to capture any given event. Then, use goto with the submit attribute to store that in your DMBS. Here is an example for a CPA human event: <on event ="cparesult:human"> On Event http://docs.voxeo.com/callxml/3.0/on.htm Goto http://docs.voxeo.com/callxml/3.0/goto.htm Please let me know if this helps to clarify this for you, as well if you have any additional questions we are standing by to assist. Regards Brian |
|
jpw
|
|
| someone was editing and did a global search/replace in several places where do -> block, eg see "Most real-world applications will likely [b]block[/b] a bit more" | |
jpw
|
|
| In the 'advanced' example I think you forgot to add "human" to the maskevent | |
VoxeoDustin
|
|
| Hey JP,
Thanks for the heads-up. I have forwarded this off to our doc maintainers and it should be corrected in the next build of the docs. Thanks, Dustin |
|
Deke
|
|
| In the advanced call process analyzer example, you handle the 'unknown' event even though that isn't a maskevent. Is that a mistake or does it really need to be handled?
Also, this is somewhat minor, but I found this sentence: We block this because we block not want the CPA event "unknown" to fire and interrupt our message. ...I block not like it when people global replace 'do' with 'block'. ;) |
|
VoxeoDante
|
|
| Hello Deke,
The CPA unknown event is thrown when the 'cpa-runtime' expires. It is recommended that you handle this event so that the application is aware if there have not been any CPA events thrown during the time specified. Also thanks for finding that error in the documentation. It looks like we may have done a find and replace on do and removed some things we should not have. I am going to forward this to the Documentation team and ask them to make the update. Regards, Dante Vitulano Customer Support Engineer II Voxeo Corporation |
|
CHardin
|
|
| To use the sit event do I use
<on event="cparesult:*sit"> <log value="*** Disconnected Number ***"/> <sendemail from="CallXML@MyIVR.com" to="Me@MyIVR.com"> $NumToCall; has been disconnected. </sendemail> <exit/> </on> or <on event="cparesult:sit"> <log value="*** Disconnected Number ***"/> <sendemail from="CallXML@MyIVR.com" to="Me@MyIVR.com"> $NumToCall; has been disconnected. </sendemail> <exit/> </on> |
|
VoxeoDante
|
|
| Hello,
It should be the latter, I am not sure where the *sit came from. [code]<on event="cparesult:sit"> <log value="*** Disconnected Number ***"/> <sendemail from="CallXML@MyIVR.com" to="Me@MyIVR.com"> $NumToCall; has been disconnected. </sendemail> <exit/> </on> [/code] Please let us know if you see any results that do not match this. Regards, Dante Vitulano Customer Obsession Team Voxeo Corp. |
| login |
|