Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Subscribing to events

Updated on October 7, 2021

Events are sent from the CTI server to indicate a change in the status either of the extension or of the agent.

Implement the following activities in the OpenCTI implementation class to determine the action you want to perform on the event:

SubscribeForEvents activity
The SubscribeForEvents activity is called to send a request to start an event subscription for a device when a user tries to monitor an extension.
UnSubscribeForEvents activity
This activity is called to send the request to stop the event subscription for a device.
  1. In Dev Studio, search for the SubscribeForEvents activity in the OpenCTI adapter class.
  2. Copy the activity into the implementation class add the Pega Platform 8.6 integration connector to subscribe for the event for a device.
  3. In the activity page, add any steps that are required for the adapter to subscribe for events for the user identified. For more information on the properties, see the property table.
    Property NameDescription
    DNThe device number on which the event is subscribed
    AgentIDThe agent ID logged in to the extension
    AgentPasswordThe password configured for that agent ID
    Some CTI servers do not need AgentID and AgentPassword for monitoring. In this case, the OpenCTI developer can ignore these properties when subscribing for events.
  4. If the subscription of the device fails, then an error should be returned. For more information, see Handling Errors.
  5. In Dev Studio, search for the UnSubscribeForEvents activity in the OpenCTI adapter class.
  6. Copy this activity to the implementation class and add the Pega 7 Platform integration connector to unsubscribe for the event for a device.
    The following are the properties included in the UnSubscribeForEvents activity. You can see these properties on the adapter step page of the clipboard.
    Property NameDescription
    DNThe device number on which the event is subscribed
    AgentIDThe agent ID logged in to the extension
  7. If the unsubscribe event of the device fails, then an error should be returned. For more information, seeHandling Errors.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us