Legacy Dev Forum Posts

 View Only

Sign Up

Notification API for 3rd Party Screen pop

  • 1.  Notification API for 3rd Party Screen pop

    Posted 06-05-2025 18:13

    yuezhong | 2018-01-19 04:33:43 UTC | #1

    I have customer has a application requires screen pop when agent answer the call. the 3rd party app support restful API.

    I developed a middleware application which connected to PureCloud via Java SDK, it sends out a restful request when it detect agent answered the call..

    I used the Notification API, topic is "v2.users." + userId + ".conversations.calls"; I have a class implements NotificationListener<CallConversationNotification>

    I got all sort of event for whenever the conversation changed (Participant join/leave change state),

    I'd like to get some suggest how to filter out unnecessary notification event, i'm only expecting for the event that agent answered the call, so i can send a restful API request, otherwise, I may send multiple times.

    thank you. Yuezhong


    tim.smith | 2018-01-19 16:37:16 UTC | #2

    You'll need to diff the state of the conversation object to see what changed and only act on the event if the changed data meets your criteria.


    vitaly | 2018-01-29 19:29:42 UTC | #3

    One way you might want to do that is as follows.

    1. Find an "agent" participant. For this find a participant with purpose = "agent" or "user" whose userId equals to your user's id.
    2. Find a "customer" participant. This one may have purpose = "customer" or "external" or"station". Potentially, it may also be an "agent" or a "user" depending on scenarios you have to handle. You might also want to remember its participantId. I also assume you don't need to handle multi-party calls. This participant should also have a current call in some active state i.e. not DISCONNECTED or TERMINATED. When I say "current call" I mean that you might need to check its connectedTime and select the latest one, it all depends on your scenarios.
    3. Check the states of the active calls of both participants. When both of them become CONNECTED that's the start of the call. Most likely you also need to maintain the state of this call to filter out duplicate notifications.
    4. You might also want to keep track of a current conversationId.

    system | 2018-03-01 19:41:16 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 2373