Alan Christensen avatar image
Alan Christensen asked Phong Vu commented

What is the reliability of webhooks?

I have a telephony/sessions subscription and it seems I missed a message or some messages.

For this particular session I never got the disconnect to show the call ended. It does seem that I did not receive all the messages based on the sequence numbers. I only see a 3,5,6.

What is the expected reliability on those subscriptions? Is it possible that some messages are missed? What could I do to recover from this missed message scenario? Is this my end not receiving the messages or the other end not sending them?

{"uuid":"7709450238821189519","event":"/restapi/v1.0/account/538209032/extension/538295032/telephony/sessions","timestamp":"2021-08-25T18:07:32.800Z","subscriptionId":"e86347a8-689c-4bb6-a72a-9f969b1c8dea","ownerId":"701308032","body":{"sequence":3,"sessionId":"536405079032","telephonySessionId":"s-02b4237d2b5c47ceb327198d7d72e190","serverId":"","eventTime":"2021-08-25T18:07:32.716Z","parties":[{"accountId":"538209032","extensionId":"538295032","id":"p-02b4237d2b5c47ceb327198d7d72e190-2","direction":"Inbound","to":{"phoneNumber":"5343","name":"Mike Hutchinson","extensionId":"538295032"},"from":{"phoneNumber":"5299","name":"Switch Board Operator","extensionId":"538253032","deviceId":"801178602032"},"status":{"code":"Setup","rcc":false},"park":{},"missedCall":false,"standAlone":false,"muted":false}],"origin":{"type":"Call"}}}

{"uuid":"1350348032124045025","event":"/restapi/v1.0/account/538209032/extension/538295032/telephony/sessions","timestamp":"2021-08-25T18:07:36.068Z","subscriptionId":"e86347a8-689c-4bb6-a72a-9f969b1c8dea","ownerId":"701308032","body":{"sequence":5,"sessionId":"536405079032","telephonySessionId":"s-02b4237d2b5c47ceb327198d7d72e190","serverId":"","eventTime":"2021-08-25T18:07:35.980Z","parties":[{"accountId":"538209032","extensionId":"538295032","id":"p-02b4237d2b5c47ceb327198d7d72e190-2","direction":"Inbound","to":{"phoneNumber":"5343","name":"Mike Hutchinson","extensionId":"538295032"},"from":{"phoneNumber":"5299","name":"Switch Board Operator","extensionId":"538253032","deviceId":"801178602032"},"status":{"code":"Proceeding","mobilePickupData":{"ccMailboxes":["538295032"],"to":"","sid":"35720777167864","srvLvl":"-149699523","srvLvlExt":"406"},"rcc":false},"park":{},"missedCall":false,"standAlone":false,"muted":false}],"origin":{"type":"Call"}}}

{"uuid":"8579565434175763696","event":"/restapi/v1.0/account/538209032/extension/538295032/telephony/sessions","timestamp":"2021-08-25T18:07:42.983Z","subscriptionId":"e86347a8-689c-4bb6-a72a-9f969b1c8dea","ownerId":"701308032","body":{"sequence":6,"sessionId":"536405079032","telephonySessionId":"s-02b4237d2b5c47ceb327198d7d72e190","serverId":"","eventTime":"2021-08-25T18:07:42.872Z","parties":[{"accountId":"538209032","extensionId":"538295032","id":"p-02b4237d2b5c47ceb327198d7d72e190-2","direction":"Inbound","to":{"phoneNumber":"5343","name":"Mike Hutchinson","extensionId":"538295032"},"from":{"phoneNumber":"5299","name":"Switch Board Operator","extensionId":"538253032","deviceId":"801178602032"},"status":{"code":"Answered","mobilePickupData":{"ccMailboxes":["538295032"],"to":"","sid":"35720777167864","srvLvl":"-149699523","srvLvlExt":"406"},"rcc":false},"park":{},"missedCall":false,"standAlone":false,"muted":false}],"origin":{"type":"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 Phong Vu commented

Not all the events (some internal) are fired so you should not expect continuous sequence number. It works quite reliably for all my apps.

How often do you miss the 'disconnect' event? If you do not get the 'disconnect' event, can you make a new call to see if you receive other events or not. That way you can tell if the event is missed or your webhooks just got interrupted etc.

1 |3000

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

When I have seen "missing" events it's usually temporary. I'll get more events later. On my app I don't see the message come in. It could be the server, it could be the network. But I see messages reliable most of the time but here and there I seem to miss some events. The disconnect is the most troubling because it makes my code think the phone is still on a call and it never disconnected.

0 Likes 0 ·

Whenever you miss a 'disconnected' event, can you pick the session id and read your call log to see how the call ended. Then we can trace it out.

You can check this session id "536405079032" from the call you provided above.

0 Likes 0 ·

Is there an expected sequence order on the /telephony/sessions events, so I can detect if one was missed or if it's expected to skip sequence numbers?

0 Likes 0 ·

Call in the same session should have the sequence number in order. However, not all events are fired (some internal) so you may not see some sequence like 1, 2 etc. Sequence numbers from the same call session are in order but the events may not come in the same order due to networking factor sometimes. You can relies also on the eventTime to put them together.

All in all, you can not rely on the sequence number to define if an event is missing. Some calls are more/less complicated than others such as hold/unhold, recording/pause, call forwarding, call transferring or ring-out call etc.

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