question

Nikolai Chashchin avatar image
Nikolai Chashchin asked Phong Vu answered

Webhook notifications come twice from time to time

Hi Community,

In our appilcation we subscribe to the account telephony session events through webhook.

We observe that sometimes notification comes twice for the same call code. F.ex:

{"uuid":"7777042260982796122","event":"/restapi/v1.0/account/<company_account>/extension/647381065/telephony/sessions","timestamp":"2022-11-08T09:58:34.520Z","subscriptionId":"a3034c8c-7095-4480-bfd5-7b4230832eba","ownerId":"<ownerId>","body":{"sequence":7,"sessionId":"1602332329064","telephonySessionId":"s-a30166b23b631z18456ad370az66dc3b00000","serverId":"10.48.22.107.TAM","eventTime":"2022-11-08T09:58:34.442Z","parties":[{"accountId":"<company_account>","extensionId":"647381065","id":"p-a30166b23b631z18456ad370az66dc3b00000-1","direction":"Outbound","to":{"phoneNumber":"<phone>"},"from":{"phoneNumber":"<phone>","extensionId":"647381065","deviceId":"805212642064"},"status":{"code":"Hold","rcc":false},"park":{},"missedCall":false,"standAlone":false,"muted":false}],"origin":{"type":"Call"}}}
{"uuid":"1120450367869856758","event":"/restapi/v1.0/account/<company_account>/extension/647381065/telephony/sessions","timestamp":"2022-11-08T09:58:34.517Z","subscriptionId":"a3034c8c-7095-4480-bfd5-7b4230832eba","ownerId":"<ownerId>","body":{"sequence":7,"sessionId":"1602332331064","telephonySessionId":"s-a30166f23bcc2z18456ad3726z66fd3a50000","serverId":"10.48.22.111.TAM","eventTime":"2022-11-08T09:58:34.441Z","parties":[{"accountId":"<company_account>","extensionId":"647381065","id":"p-a30166f23bcc2z18456ad3726z66fd3a50000-1","direction":"Outbound","to":{"phoneNumber":"<phone>"},"from":{"phoneNumber":"<phone>","extensionId":"647381065","deviceId":"805212642064"},"status":{"code":"Hold","rcc":false},"park":{},"missedCall":false,"standAlone":false,"muted":false}],"origin":{"type":"Call"}}}

We can see that some fields are different: sessionId, telephonySessionId, serverId etc. So why does it happen? Can it be avoided?

In our internal system we use sessionId field from the notification to group all the notifications that belong to the same call. Since sessionId field can change as in above example there is no reliable way to determine that both belong to the same call.

Best,

Nikolai Chashchin

webhooks
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

How often do you see this happens? Do you have a pattern/sequence to reproduce it? I need to reproduce it in my environment to report it to the team. Thanks

1 |3000

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

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