Avaya 16-300272 manual Schedulemessage.asp

Page 81

Appendix A Push XML API

Sample ASP Pages

schedule_message.asp

The following sample code shows how to write the XML required to create and schedule an alert, send the alert to the Application Gateway, and then send report status to the application from the Application Gateway.

The image paths and IP addresses in schedule_message.asp are examples.

<%@ Language=VBScript %> <HTML>

<HEAD>

</HEAD>

<%

'Put together some XML to

post off

xmlString

=

"<?xml version=""1.0""?>" & vbcrlf

xmlString

=

xmlString

&

"<ManagePushMessage>" & vbcrlf

xmlString

=

xmlString

&

"<PushMessage message_id='7' priority='1' action='bcs'>" & vbcrlf

xmlString

=

xmlString

&

"

<Recipient id='1' type='distribution'/>" & vbcrlf

xmlString

=

xmlString

&

"

<Subject>Dinner?</Subject>" & vbcrlf

xmlString

=

xmlString

&

"

<Body>Im still not hungry</Body>" & vbcrlf

xmlString

=

xmlString

&

"

<Image>http://192.168.1.16/push_image.png</Image>" & vbcrlf

xmlString

=

xmlString

&

"

<Audio>http://192.168.1.16/moo.wav</Audio>" & vbcrlf

xmlString

=

xmlString

&

"

<Schedule>" & vbcrlf

xmlString

=

xmlString

&

"

<BeginDate>09/2/2005</BeginDate>" & vbcrlf

xmlString

=

xmlString

&

"

<EndDate>10/25/2005</EndDate>" & vbcrlf

xmlString

=

xmlString

&

"

<Days sunday='1' monday='1' tuesday='1' wednesday='1'

thursday='1' friday='1'

saturday='1'/>" & vbcrlf

xmlString

=

xmlString

&

"

<BeginTime>10:00:00 AM</BeginTime>" & vbcrlf

xmlString

=

xmlString

&

"

<EndTime>11:59:50 PM</EndTime>" & vbcrlf

xmlString

=

xmlString

&

"

</Schedule>" & vbcrlf

xmlString

=

xmlString

&

"</PushMessage>"

xmlString

=

xmlString

&

"</ManagePushMessage>"

'Load the

XML into an

XMLDOM object

Set SendDoc

= server.createobject("Microsoft.XMLDOM")

SendDoc.ValidateOnParse= True

SendDoc.LoadXML(xmlString)

'Set the URL of the receiver

sURL = "http://192.168.1.201:9998/"

'Call the XML Send function (defined below)

set NewDoc = xmlSend (sURL, SendDoc)'xmlString) 'We receive back another XML DOM object!

Broadcast Server User Guide

73

Image 81
Contents Broadcast Server User Guide Release 2.1 Service Pack Copyright 2004-2006,Avaya Inc All Rights Reserved Contents A P T E R 6 Subscriber Management A P T E R 9 External Service Management Vi Broadcast Server User Guide Preface AudienceRelated Documentation Related Documentation Viii Broadcast Server User Guide Introduction to Broadcast Server ChapterBroadcast Server Overview Subscribers and Distribution Lists UsersAlerts BCS Interaction with Phones Sending AlertsConfiguring Broadcast Server Opening and Using the Broadcast Server InterfaceInitial Configuration Broadcast Server Maintenance Application Gateway and Broadcast Server Operation Application Gateway and Broadcast Server Operation Component Versions System ManagementSupport items Server configurationHome page tips System Management Home page tips Broadcast Server User Guide System Messages Quick FAQSystem Messages Quick FAQ Broadcast Server User Guide User Management List User ManagementAdministrator user Password UserUser information General user permissions Shared distribution list accessAlert access User Management The User Broadcast Server User Guide Subscriber Management List Subscriber ManagementGo to the Distribution List Management page, select Subscriber information SubscriberDistribution list membership Subscriber settingsDistribution List Distribution List ManagementList ownership Automatically created distribution listsSharing distribution lists Distribution List Management Distribution List Management Distribution List Membership Adding and removing distribution list members Distribution List User PermissionsRevoking users’ permission to send to the list Granting users permission to send to the listBroadcast Server User Guide Media List Media ManagementSystem media Media linkage Media ownershipMedia Uploading a media fileSupported graphic formats WAV Supported audio formatsMedia Management The Media Broadcast Server User Guide External Services Management List External Service ManagementExternal Service External Service Management Page Alert List Broadcast Alert ManagementColumn Descriptions Emergency alerts Alert TypesNormal alerts Background alertsBroadcast Alert Management Quick FAQ Title AlertSend to the following Use audio alert Page Setting the maximum list entries to display Changing your passwordMy Preferences Set the number of alerts perPage Common problems TroubleshootingTroubleshooting Common problems Broadcast Server User Guide Push XML API Appendix aTo enable the Push XML API on the Application Gateway PushMessage Request Push XML API OperationRecipient Schedule Member DistributionList RequestServerRegistration Response Subscribers ResponsePushMessageResponse Response Push XML Reference Character Set and Character EntitiesXML Declaration Element Parent Element Attributes Enumeration Description ManagePushMessageMessageid Appendix a Push XML API DistributionList ManageDistributionListsSubscribers ServerRegistrationPushMessageResponse Distributionlist.asp Sample ASP PagesLoad the XML into an Xmldom object Schedulemessage.asp Appendix a Push XML API Sample ASP Pages