| CallXML 2.0 Development Guide | Home | Frameset Home |
|
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
</block>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
<assign var="ParentSessionID" value="$session.ID;"/>
<assign var="NumToCall" value="18005551234"/>
</block>
</callxml>
run value="newCall.xml", a variable sequence to pass: submit="*", and the http method of sending that variable sequence: method="get"; however, we also have an attribute called var which stores the session.id of the NEW session: var="NewSessionID". Note that var is not the name of the new session, it is the name of the variable that holds the id of the new session. Tricky, right? Let's take a look and see:
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
<assign var="ParentSessionID" value="$session.ID;"/>
<assign var="NumToCall" value="18005551234"/>
<run value="newCall.xml" submit="*" method="get" var="NewSessionID" />
<wait value="10s"/>
</block>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
<assign var="ParentSessionID" value="$session.ID;"/>
<assign var="NumToCall" value="18005551234"/>
<run value="newCall.xml" submit="*" method="get" var="NewSessionID" />
<wait value="10s"/>
<block label="HoldMusic"
repeat="3">
<playaudio format="audio/wav"
value="HoldMusic.wav"
termdigits=""/>
</block>
</block>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
<assign var="ParentSessionID" value="$session.ID;"/>
<assign var="NumToCall" value="18005551234"/>
<run value="newCall.xml" submit="*" method="get" var="NewSessionID" />
<block label="HoldMusic"
repeat="3">
<playaudio format="audio/wav"
value="HoldMusic.wav"
termdigits=""/>
<onexternalevent value="Success">
<conference targetsessions="$session.EventsenderID;"/>
<hangup/>
</onexternalevent>
<onexternalevent value="Busy">
<text>
All lines are currently busy.
Please hang up and try your call again later.
</text>
<hangup/>
</onexternalevent>
<onexternalevent value="TimedOut">
<text>
There is no answer.
Please hang up and try your call again later.
</text>
<hangup/>
</onexternalevent>
<onexternalevent value="Error">
<text>
A connection can not be made at this time.
Please hang up and try your call again later.
</text>
<sendemail from="MyApp@here.com"
to="YourEmail@there.net" type="debug">
We caught an error in our application. Details follow...
</sendemail>
<hangup/>
</onexternalevent>
</block>
</block>
</callxml>
<?xml version="1.0" encoding="UTF-8" ?>
<callxml version="2.0">
<block>
<call value="$NumToCall;"
maxtime="30s"/>
<onanswer>
<sendevent value="Success"
session="$ParentSessionID;"/>
</onanswer>
<oncallfailure>
<sendevent value="Busy"
session="$ParentSessionID;"/>
</oncallfailure>
<onmaxtime>
<sendevent value="TimedOut"
session="$ParentSessionID;"/>
</onmaxtime>
<onerror>
<sendevent value="Error"
session="$ParentSessionID;"/>
</onerror>
</block>
</callxml>
<call value="$NumToCall;" maxtime="30s"/>
run element like an http method to start a new sessionwait</wait> element<onexternalevent value="Success">, which will catch events spawned from the new session started by: newCall.xml| ANNOTATIONS: EXISTING POSTS |
| login |
|