question

matt-resmer13992 avatar image
matt-resmer13992 asked ·

WebHook receiving multiple incoming-call-pickup events per call

Hi,

I've got a WebHook that's successfully receiving subscribed incoming-call-pickup events for an extension when I make a call to it (dev sandbox) ... but ... for each single test call, I seem to receive MANY such events. For example, one call I did a while ago received 18 such events, all for the same call.

So, what I'd like to know is ...

- Is it that I'm somehow not responding to those callbacks properly or something so it keeps sending them? Or is that just normal behaviour?

- If it is normal behaviour, is there a better filter I can use so I only get one event per call with all the call data in it?

- If I do just need to keep receiving multiple events like that, how do I differentiate them? My system needs to be notified, once, for each individual call ... how can I check if an event I receive is for the same call as an event I received earlier, and therefore know to ignore it?

Many thanks for the help!
General Topic
1 |1500 characters needed characters left characters exceeded

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

Tyler Liu avatar image
Tyler Liu answered ·
First of all, please confirm you didn't create duplicate WebHook subscriptions. You can get the list by HTTP GET /restapi/v1.0/subscription

1 comment
1 |1500 characters needed characters left characters exceeded

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

Thanks Tyler, I also had a follow up question which I posted as another reply to myself ... should've put it here.
0 Likes 0 ·
matt-resmer13992 avatar image
matt-resmer13992 answered ·
Ahhh that's it, thank you Tyler. I seem to have 9 of them ... which explains the 18 events ... 9 start rings and 9 stop rings.

If I just have start and stop ring events, how do I know if the call was actually picked up?

The stop ring event seems to occur both if the call was picked up AND if the caller just hung up before the call was answered ... how do I actually know when a call is picked up by an extention? That event along with the call info is what I actually need
1 |1500 characters needed characters left characters exceeded

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

matt-resmer13992 avatar image
matt-resmer13992 answered ·
Worked it out ... just for the reference of anyone else who may read this later ...

Turns out that incoming-call-pickup events have absolutely nothing to do with calls being picked up. Instead, use this event filter ...

/restapi/v1.0/account/{accountId}/extension/{extensionId}/presence?detailedTelephonyState=true

When a call is ACTUALLY picked up, you'll receive one of these with a "CallConnected" telephonyStatus and a direction status of Inbound ... that's how you know an incoming call to that extension has been answered
1 |1500 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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