Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Active call participantId

    Posted 06-05-2025 19:19

    skansakar | 2016-09-14 14:21:15 UTC | #1

    When a call move from one agent to another (e.g. RONA), a new 'agent' participant is added to the participants list every time with previous agent getting a call statte of 'DISCONNECTED'

    What is the best way to know the current partcipicantId of the 'agent' (out of list)? Is there a property I can rely on?

    <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/0ae76e5754d39296ebf29021e0840edea3054c94.jpg" width="690" height="163">


    KevinGlinski | 2016-09-14 14:23:53 UTC | #2

    participants still on the call with have a segment that doesn't have a defined segmentEnd


    skansakar | 2016-09-14 14:37:36 UTC | #3

    I cannot find segment. Is it part of the call or the participant object?


    KevinGlinski | 2016-09-14 14:39:09 UTC | #4

    a participant has a list of sessions and each session has a list of segments


    skansakar | 2016-09-14 14:45:01 UTC | #5

    sorry. I am not sure I follow what you mean. I have the following:

    { "id":"24dd6258-9ca6-48fa-9533-b187dda549fd", "connectedTime":"2016-09-14T14:35:33+0000", "userId":"520fcd40-e7e3-460c-9101-b138a10f4d07", "queueId":"b3da65f2-ef01-40eb-9ce1-f2cbec28b7e3", "purpose":"agent", "address":"sip:testphone1_1@10.1.4.1", "wrapupRequired":true, "wrapupExpected":true, "wrapupPrompt":"timeout", "wrapupTimeoutMs":1000, "attributes":{

    }, "calls":[ { "state":"CONNECTED", "recording":false, "recordingState":"NONE", "muted":false, "confined":false, "held":false, "direction":"INBOUND", "self":{ "nameRaw":"xx@xx.com", "addressNormalized":"sip:testphone11@10.1.4.1", "addressRaw":"sip:testphone11@10.121.4.201;language=en-us;user=station", "addressDisplayable":"sip:stestphone1_1@10.1.4.1", "additionalProperties":{

    } }, "other":{ "name":"Glasgow, United Kingdom", "nameRaw":"Glasgow, United Kingdom", "addressNormalized":"sip:+441411110000@10.1.4.1;user=phone", "addressRaw":"sip:+441411110000@10.1.4.1;user=phone", "additionalProperties":{

    } }, "connectedTime":"2016-09-14T14:35:33+0000", "additionalProperties":{

    } } ], "additionalProperties":{

    } }


    KevinGlinski | 2016-09-14 14:49:31 UTC | #6

    sorry, i was answering using the analytics/historical query response schema. For the /conversation/calls/{conversationId} endpoint, there is a endTime property you can use.


    skansakar | 2016-09-14 14:56:02 UTC | #7

    That is what I am currently doing. I am looking for an agent with 'disconnectedTime' not set.

    However, the problem with this approach is when a notification message arrives at the end (e.g. on a call dropped/termination), I cannot find any agent (as this time it has genuinely finished) to take relevant actions.

    Any ideas on how to get this to work?


    KevinGlinski | 2016-09-14 15:04:49 UTC | #8

    so when a call is now disconnected, you are looking for the last agent who was on the call? In that case it should just be the agent with the latest disconnectedTime, no?


    skansakar | 2016-09-14 18:18:47 UTC | #9

    True but that means i need to maintain each agents disconnectedTime and compare.

    I was hoping there was some field that would have defined it. (e.g. purpose is always 'agent' for the latest one and the purpose for others have been modified to something else or for the agent participants who have disconnected a disconnectType of 'RONA') etc?


    skansakar | 2016-09-15 16:19:14 UTC | #10

    @tim.smith @KevinGlinski is there anything else i could with out having to maintain and compare? Are you able to add a new field to differentiate it?


    KevinGlinski | 2016-09-16 12:15:13 UTC | #11

    we don't want to create summary properties on conversations because every 3rd party developer is going to need something different and that is going to lead to bloat. If you are using an sdk we can look at adding helper methods to the sdk to do that (of if you wanted to create a pull requests we would accept it)


    skansakar | 2016-09-19 16:08:33 UTC | #12

    Yes, I am using Java SDK.

    Another question, what is the best way to know if the notification message received is a result from a conference call (Add participant). What can I use in that scenario?


    KevinGlinski | 2016-09-19 19:07:53 UTC | #13

    You would have to do a diff of the new notification vs the last notification to tell what changed


    system | 2017-08-28 19:27:14 UTC | #14


    This post was migrated from the old Developer Forum.

    ref: 396