| CallXML 2.0 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
</block>
</callxml>
<inputdigits> element allows us collect digits and fill in the aptly named variable "conferenceName".
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<inputdigits
label = "getconid"
value = "enterConferenceID.wav"
var = "conferenceName"
maxdigits = "10"
termdigits = "#"
cleardigits = "false"
maxtime = "30s"
maxsilence = "5s">
<ontermdigit value="#"/>
<onmaxsilence>
<playaudio value="noInput.wav"/>
<goto value="#getconid"/>
</onmaxsilence>
<onmaxtime/>
<onmaxdigits/>
</inputdigits>
<block>
</block>
</callxml>
<createconference> element and supply two attributes, the name to use for this conference and a variable name to store the conference identifier. In CallXML, a conference name is used to uniquely identify a conference -- if you try to create a conference with a name already in use, you will get back the conference identifier for the existing conference. We will use the conference identifier later to join the conference. For this example, we will supply the conference name we collected above. Our code should now look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<inputdigits
label = "getconid"
value = "enterConferenceID.wav"
var = "conferenceName"
maxdigits = "10"
termdigits = "#"
cleardigits = "false"
maxtime = "30s"
maxsilence = "5s">
<ontermdigit value="#"/>
<onmaxsilence>
<playaudio value="noInput.wav"/>
<goto value="#getconid"/>
</onmaxsilence>
<onmaxtime/>
<onmaxdigits/>
</inputdigits>
<playaudio value="joinConference.wav"/>
<block label="test">
<createconference name="$conferenceName;" var="conferenceid" />
</block>
</callxml>
<createconference> tag will only "create" a new conference if the conference name does not already exist on the server. Even though our application may seem like it is creating a new conference each time, only the first call would do this. This is why every member of Project Mayhem can call our application without creating bunches of unnecessary conferences.<joinconference> element and supply two attributes; the conference identifier we obtained when creating the conference, and any termdigits for the conference. Our completed code should look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<inputdigits
label = "getconid"
value = "enterConferenceID.wav"
var = "conferenceName"
maxdigits = "10"
termdigits = "#"
cleardigits = "false"
maxtime = "30s"
maxsilence = "5s">
<ontermdigit value="#"/>
<onmaxsilence>
<playaudio value="noInput.wav"/>
<goto value="#getconid"/>
</onmaxsilence>
<onmaxtime/>
<onmaxdigits/>
</inputdigits>
<playaudio value="joinConference.wav"/>
<block label="test">
<createconference name="$conferenceName;" var="conferenceid" />
<joinconference id="$conferenceid;" termdigits="#"/>
<ontermdigit>
<playaudio value="leaveConference.wav" termdigits="123"/>
<wait value="3000s" termdigits="123"/>
<ontermdigit value="2">
<goto value="#test"/>
</ontermdigit>
<ontermdigit value="3">
<goto value="#getconid"/>
</ontermdigit>
</ontermdigit>
</block>
<onerror>
<sendemail from="MyApp@here.com"
to="YourEmail@there.net" type="debug">
We caught an error in our application. Details follow...
</sendemail>
</onerror>
</callxml>
<createconference> element to create a new multi-party conference<joinconference> element to join a multi-party conference| ANNOTATIONS: EXISTING POSTS |
| login |
|