| CallXML 3.0 Development Guide | Home | Frameset Home |
|
<title>Demonstration Session Trigger Application</title>
<form name="SampleForm" action="http://api.voxeo.net/SessionControl/CallXML.start " method="POST">
<input type="hidden" name="tokenid" value="sometoken">
Phone number to call:<br>
<input type="text" name="Phone" size="20" maxlength="20" value=""><br><br>
Enter your text to say here:<br>
<input type="text" name="TTS" size="100" value=""><br><br>
<input type="reset" value="Clear">
<input type="submit" name="submitMe" value="Give me a call!">
</form>
action="http://api.voxeo.net/SessionControl/CallXML.start "<input type="hidden" name="tokenid" value= "sometoken"><form> tag that passes three variables ("Phone," "TTS," and "submit"). Any and all such variables are passed into the session initiator script, and then passed from there into the callxml script. Thus, the telephony events are completely transparent from this, the web side.
<?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0">
<%
'------------------------------------------------------------------------
' Need to use ASP to grab the variables from the querystring.
'------------------------------------------------------------------------
Phone = request.querystring("phone")
Message = request.querystring("TTS")
'----------------------------------------------------------------------------
' Now we will transfer those ASP variables to callxml variables
'----------------------------------------------------------------------------
response.write "<assign var=""Phone"" value=""" & Phone & """/>"
response.write "<assign var=""Message"" value=""" & Message & """/>"
%>
<call value="$Phone;" maxtime="30s"/>
<on event="answer">
<do label="MessageBlock" repeat="3">
<say>$Message;</say>
<wait value="3s"/>
</do>
</on>
<on event="callfailure">
<log value="***** Call failed to connect *****."/>
<sendemail from="MyApp@here.com"
to="YourEmail@there.net" type="debug">
We caught an error in our application. Details follow...
</sendemail>
</on>
</callxml>
<?php
header('Cache-Control: no-cache');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo "<callxml version=\"3.0\">";
echo "<assign var=\"Phone\" value=\"" . $_REQUEST["Phone"] ."\" />";
echo "<assign var=\"Message\" value=\"'" . $_REQUEST["TTS"] ."'\" />";
?>
<call value="$Phone;" maxtime="30s"/>
<on event="answer">
<do label="MessageBlock" repeat="3">
<say>$Message;</say>
<wait value="3s"/>
</do>
</on>
<on event="callfailure">
<log value="***** Call failed to connect *****."/>
<sendemail from="MyApp@here.com"
to="YourEmail@there.net" type="debug">
We caught an error in our application. Details follow...
</sendemail>
</on>
</callxml>
<call> tag. If someone answers the telephone call (<on event="answer"> event is matched), then we simply read the text message entered on the website. That’s all there is to it. You are now empowered to make snazzy buttons and integrate the web and the phone in ways your children will talk about for years...| ANNOTATIONS: EXISTING POSTS |
saurin
|
|
| This is a good technique for generating outbound call, but this solution requires the two pages to be uploaded to your webserver and then there is a third file (that we have no control on) which maps the tokenid and initiates the call through voxeo.
How could we implement similar outbound call on stand alone Prophecy system? Regards, Saurin |
|
VoxeoDante
|
|
| Hello,
You will want to define a route in the call routing tab of the management console to point to the Application.jsp http://docs.voxeo.com/prophecy/8.0/callrouting.htm Then you would have the Web application point to the token for the application. So it would make an HTTP request to http://127.0.0.1/callxml.start/(routeID) This would then make a call to the HTTP address in the route (Application.jsp) and pass along any query string parameters to the Application.jsp. The prophecy server would then invoke the callxml application returned by the JSP. I hope that makes sense. Please let me know if there is anything else I can do to clarify. Cheers, Dante Vitulano Voxeo Corporation |
|
saurin
|
|
|
|
|
saurin
|
|
| Dear Dante,
Got it working with following url http://[ip of server]:9999/CallXML.start?tokenid=[route ID] Thanks, Saurin |
|
voxeojeremyr
|
|
| Hello,
That is great news. We are glad that you were able to get it working. Please let us know if you have any additional questions. Regards, Jeremy Richmond Voxeo Support |
|
grajeev72
|
|
| Hi,
How is token mapping points to our asp file i.e. where we should write the code to map the Token to our .asp file. Regards, Rajeev |
|
VoxeoDustin
|
|
| Hey Rajeev,
Your application URL is the Voice URL option under your application settings in Application Manager. The token assigned to that application will launch the Voice URL assigned to it when invoked. Regards, Dustin Hayre Technical Account Lead Voxeo Corporation |
| login |
|