News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Handling Call Transfers and Sessions with SessionId of 0
Tags: webhooks, call forwarding, call handling, conference call
Dec 19, 2023 at 5:34am   •   1 replies  •  0 likes
Addison Cahill

Good day all,

My company has an integration with RC where we receive call data via telephony webhook and process that data on behalf of our customers. I have two questions:

1. Our code does not properly handle transferred/ multi-leg calls. I have been doing some research and believe I can tell a call has been transferred by the presence of an event with the status code of "Gone". Is it accurate to say this event represent the start of a new leg of the call? Additionally, I noticed that a "Gone" event can have the following reasons: "Pickup", "Undefined", "AttendedTransfer", "Conference", "Supervising". Would you kindly briefly explain these reasons?

2. One other thing I noticed in our data is that we receive calls with a session id of 0. Specifically, I am noticing these calls have to do with conferencing. Is there any other reason why a session would have a sessionid of 0 other than conferencing? See below example of transfer to conference with peer id.sessionid of 0.

"code": "Gone",

"reason": "Conference",

"peerId": {

"telephonySessionId": "s-a0dd888305b18z18c590772c3z13204cb0000",

"sessionId": "0",

"partyId": "p-a0dd888305b18z18c590772c3z13204cb0000-2"


1 Answer
answered on Dec 19, 2023 at 8:56am  


- "Gone" - "AttendedTransfer" => A call is warm transferred. The original call is gone

- "Gone" - "Supervising" => A supervising call leg is established

- "Gone" - "Conference" => A call is merged to a 3-way conference call. The original 2-way call is gone.

I am not aware of the "Gone" - "Pickup" and "Undefined" though.

2. A 3-way conference call made by the RC app is a bridge call. It has the origin type

 "origin": {
        "type": "Conference"

And it has the sessionId=0. The conference (bridge) call has the telephonySessionId and it is referenced in the peerId object.

"peerId": {
    "telephonySessionId": "s-a0dd888305b18z18c590772c3z13204cb0000",
    "sessionId": "0",
    "partyId": "p-a0dd888305b18z18c590772c3z13204cb0000-2"

on Dec 19, 2023 at 9:15am   •  0 likes


thank you so very much for your prompt reply! Two follow up questions. When you say the original call is gone, we can still construct the original call using the previous events in the session, correct? For example, a call takes place as normal however, event 8 of the session is Gone (Attended Transfer), we can still construct the original call with events 1-7, correct? When we detect a transfer, how can we tell the new numbers involved in the call? For example, if 404-809-6345 calls 104 and then gets transfered to 106, how can we tell from the event the new number involved in the call? I see on a transfer, the peerId object has a new session id, will that new session be sent to us via webhook with the next leg of the call? Hopefully that makes sense.

on Dec 20, 2023 at 8:20am   •  1 likes

Do you use the events to create some kind of call log? I can warn you that it is very complicated.

A warm transferred call has 2 sessions and "Gone" does not mean that the original session is completely "disconnected", just one party is disconnected.

It also depends on how you subscribe for the telephony session event notifications, at the account level or for each of the individual extension, then the amount of events can be more or less.

I recommend you to make test call and examine the events of each method, warm transfer, blind transfer, conference etc.

on Dec 20, 2023 at 11:23am   •  0 likes

We do in fact use the events sent to us via webhook to create a call log. Is there a better solution? I'm familiar with the call log API endpoint but that would not give us calls in real time. Is there a webhook for receiving complete calls instead of events?

We do subscribe on the account level, not extension. Will the telephony events webhook send the session whose id can be found in the peer Id of object of the transfer event?

A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

Developer Platform
Integrated Apps
App Gallery
Developer support
Games and rewards

Resource center
Product Releases
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us