| CallXML 3.0 Development Guide | Home | Frameset Home |
| id | Data Type: (element id) | Default: none - attribute is optional |
The new 'id' attribute in CallXML3.0 is applicable to all container and action elements. Specifying this attribute allows yet another level of control and event handling when events occur and are caught by the <on> element. When an event occurs, the handler will first check the event, and then verify that the handler has a handler specific to the 'id' attribute to execute. This allows the developer to plan a specific course of action for events based on where in the application that they occur. | ||
| value-is | Data Type: STRING | Default: none - attribute is optional |
| Another new attribute, 'value-is', grants the developer with the ability to perform conditional logic upon container elements, or action elements for the first time within the CallXML markup. The value specified in the 'value-is' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is' equate to 'true', then the element specified will execute. If the value equates to 'false' then the element will be skipped during document execution. | ||
| value-is-not | Data Type: STRING | Default: none - attribute is optional |
| Another new attribute, 'value-is-not', grants the developer with the ability to perform conditional logic upon container elements, or action elements, for the first time within the CallXML markup. The value specified in the 'value-is-not' attribute specifies a string to compare against any 'value' attributes. If the 'value' and 'value-is-not' equate to 'false', then the element specified will execute. If the value equates to 'true' then the element will be skipped during document execution. | ||
| <?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0"> <!-- note that 'auto-answer' must be turned off in your application --> <!-- detail screen in order for this work as it is shown here --> <if> <reject test="1=2"> <log> this will not be executed, as '1' is not equal to '2'. </log> </reject> <reject test="1=1"> <log> this will be executed, as '1' is equal to '1'. </log> </reject> </if> </callxml> |
| <?xml version="1.0" encoding="UTF-8"?>
<callxml version="3.0"> <!-- note that 'auto-answer' must be turned off in your application --> <!-- detail screen in order for this work as it is shown here --> <do value="$session.callerid;"> <log/> <!-- this will only answer when the callerID is 4071112222 --> <answer value-is="4071112222"> <say> this is executed when the caller ID is equal to 4 0 7 8 3 5 0 0 5 8. </say> </answer> <!-- this will only reject when the callerID is not 4072223333 --> <reject value-is-not="4072223333"/> <!-- this will only reject when the callerID is 4073334444 --> <reject value-is="4073334444"/> <prompt value="If you got this far, then your call was accepted!"/> </do> </callxml> |
| ANNOTATIONS: EXISTING POSTS |
berndstefan
|
|
| I would like to use the SENDEMAIL element in combination with REJECT, so that calls from specific caller ids will result in an email sent - but apparently REJECT does not allow any other nested elements. Any workaround? Thx | |
jdyer
|
|
| Hello,
You should be able to catch the hangup event in this case and do your sendmail in that handler. A quick example, for example: <callxml version="3.0"> <do label="D1"> <reject/> <on event="hangup"> <log> *** USER HUNG UP ***</log> <sendemail from="GeorgeOrwell@MinistryOfInformation.com" to="WinstonSmith@Oceana.com"> Received call from a comrade at $session.callerid; </sendemail> </on> </do> </callxml> I do hope that helps, and please let us know if there are any other questions! We are always standing by to offer any help our developers may require! Regards, John Dyer Customer Engineer Voxeo Support |
| login |