Addison Cahill avatar image
Addison Cahill asked Addison Cahill commented

Handling Call Transfers and Sessions with SessionId of 0

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"


call handlingcall forwardingwebhooksconference call
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Addison Cahill commented


- "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"
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Addison Cahill avatar image Addison Cahill commented ·


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.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Addison Cahill commented ·

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.

1 Like 1 ·
Addison Cahill avatar image Addison Cahill Phong Vu ♦♦ commented ·

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?

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys