Getting extension details regarding two developer accounts as users for one app in one api call

  • 1
  • Question
  • Updated 2 weeks ago
I have two developer accounts as user for one app. basically one super admin(developer 1) invited other(developer2). My aim is to recieve call from multiple extension. I have already integrated sandbox and works for developer 1. but I need to handle the call that is made to developer 2 in same subsription event.. is it possible to do so? if yes, great help if steps are provided
Photo of bron truckx

bron truckx

  • 90 Points 75 badge 2x thumb

Posted 2 weeks ago

  • 1
Photo of Phong Vu

Phong Vu, Devangelist

  • 4,366 Points 4k badge 2x thumb
Hi Bron,

I read and read again but still don't understand what you want to achieve. Can you explain them again.

1. "... two developer accounts as user for one app"? What did you mean?
2. "... one super admin(developer 1) invited other(developer2)"? How to invite and invite to do what?
3. "My aim is to recieve call from multiple extension"? Extensions in within an account or from different accounts?
4. "integrated sandbox and works for developer 1"? Integrated sandbox? and what works for developer 1?
5. "handle the call that is made to developer 2 in same subsription event"? What event notification do you use? You cannot combine notifications for different accounts.

+ Phong


Photo of bron truckx

bron truckx

  • 90 Points 75 badge 2x thumb
Let me share a screenshot to explain 


As I have two developers/users with the above specified role and with extension lets say 101,102 resp. of truckx organisation. Yes I can be wrong, but I was expecting if one can get the details of both the users include thier extension id through some api. and then I can listen to there presence via subscription event.. As a result the event may receive the data on an occasion when a customer calls either of the user. Currently I am able to do this only for one user, I want to achieve for multiple users.
Thanks in advance. 
Photo of Phong Vu

Phong Vu, Devangelist

  • 4,366 Points 4k badge 2x thumb
Thanks for the explanation! I can understand better now.

Basically, if you want to receive incoming call event notification for all extensions under an account, login with an admin user (default is the main company number) and use the presence notification at the account level.
'/restapi/v1.0/account/~/presence'
This will notify you whenever there is status changes to any extension under the same account.

You can learn from this tutorial in Node JS. It's about detecting a new call recording, but you can use the same logic to detect just incoming call.

Let me know if you are working in different programming language and want some example code in that language.

+ Phong
Photo of bron truckx

bron truckx

  • 90 Points 75 badge 2x thumb
Thank you I will check on it .. and get back if required :)
Photo of Tyler Long

Tyler Long, Official Rep

  • 8,916 Points 5k badge 2x thumb
When you setup the subscription, you can add event filters for both extension

eventFilter = 
[
"/restapi/v1.0/account/~/extension/[ID of extension 1]/presence?detailedTelephonyState=true",
"/restapi/v1.0/account/~/extension/[ID of extension 2]/presence?detailedTelephonyState=true"
]