Subscribing to events
Events are sent from the CTI server to indicate a change in the status, either of the extension or of the agent.
After you create your own implementation, override the Pega Call bundle rule in your implementation ruleset and add your implementation JavaScript file to the existing framework so that your javascript file gets loaded with the Pega Call toolbar.
The SubscribeForEvents activity is called to send a request to start an event subscription for a dewhen a user tries to monitor an extension.
The following are the properties available to the SubscribeForEvents activity. You can see these properties on the adapter step page of the clipboard.
Properties of the SubscribeForEvents activity
Property | Description |
---|---|
DN | The device number on which the event is subscribed. |
AgentID | The agent ID logged in to the extension. |
AgentPassword | The password configured for that agent ID. |
In header of Dev Studio, search for the SubscribeForEvents activity in the OpenCTI adapter class.
Copy the activity into the implementation class add the Pega Platform integration connector to subscribe for the event for a device.
In the activity page, add any steps that is required for the adapter to subscribe for events for the user identified. For more information on the properties, see the property table.
If the subscription of the device fails, then an error should be returned. For more information, see Handling errors.
Previous topic Sending Requests to the CTI server Next topic Unsubscribing from events