TriggeringSubscribe

Metreos.Providers.Presence.TriggeringSubscribe

Summary

TriggeringSubscribe will register for status changes with a presence server; the status changes will result in triggering events.

Usage

TriggeringSubscribe is used to cause another script to initiate every time a watched presentity changes status by firing a triggering Notify event.

You can end a subscription by using the Unsubscribe action.

TriggeringSubscribe and NonTriggeringSubscribe offer the same feature from the perspective that both provide a means to watch for presence changes of a presentity. The difference is that one action creates a triggering timer, and the other creates a non-triggering timer. Because script instances are a licensable resource and should be managed closely, the developer of the application must carefully consider which action is more appropriate.

If the TriggeringSubscribe is successful, and the subscription is later ended by either the application with Unsubscribe or by the presence server, then the SubscriptionTerminated will be sent as a triggering event as well.

Remarks

The Presence Provider stores registrations only in memory. If the provider is disabled, or if the Cisco Unified Application Server service is restarted, all outstanding subscriptions will be lost.

If the notify event results in a no handler, then the Presence Provider will remove the subscription automatically.

Often an application will wish to be subscribed to a presentity for the duration of the application being installed and running. If building an application like that has this requirement, StaticConstruction is most likely the best-fit for reaching this requirement. Specifically, such an application can issue TriggeringSubscribe or NonTriggeringSubscribe in the StaticConstruction-triggered script to set up the subscription once the application is loaded.

Action Parameters
Parameter Name.NET TypeDefaultDescription
TimeoutSystem.Int32The Timeout property specifies to the Application Runtime Environment how long to wait for a response from the provider for the current action. The ReturnValue returned in this case is Timeout. The value must be a literal value in milliseconds.
RequestUri *System.StringThe URI of the presentity to be watched.
Subscriber *System.StringThe identity of the watcher.
Password *System.StringThe password of the watcher.
Result Data
Parameter Name.NET TypeDescription
ResultCodeSystem.Int64The result code of the subscribe operation. The following are the possible values:
0

Success

1

Failure

2

Duplicate Subscription

3

Missing Parameter Subscriber

4

Missing Parameter RequestUri

5

Missing Parameter Password

6

Unused

7

Bad Subscriber Format

8

Bad RequestUri Format

9

Missing Registrar Info

10

Missing Domain Name

11

Unknown Domain Name

12

No Subscription

13

Service Not Available

14

Timeout

15

Unauthorized

16

Authentication Failed

Branch Conditions 

Success

No description.

Failure

No description.

Timeout

No description.