Skip to main content

Hi. I am currently working on an app that will reassign phone numbers of our employees. I am using this call https://platform.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/phone-number. When I do, I get not only the numbers assigned to the extensions but others including “the features and company-level numbers that may be used when performing different operations on behalf of this extension”

 

I just want numbers assigned directly to the extension. I’ve tried changing the parameters but “usage” and “type” but those are independent of this and do not help. Is there a way I can get this information?

Set the usageType=DirectNumber filter param should only return phone numbers assigned to that extension.
 

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/phone-number?usageType=DirectNumber

 


Thanks for your reply.

Hmmm. I still get a bunch of other numbers. I have noticed that all the additional numbers are have a extension.type of ivrMenu. I think I could filter them out using that.

Would you happen to know why these ivrMenu numbers are showing up here? Or is this expected behavior?


Thanks for your reply.

Hmmm. I still get a bunch of other numbers. I have noticed that all the additional numbers are have a extension.type of ivrMenu. I think I could filter them out using that.

Would you happen to know why these ivrMenu numbers are showing up here? Or is this expected behavior?

 

Oh, I know what you want now. They are “direct” numbers but some of the numbers are not owned by the extension, but rather the number(s) are assigned to the extension via IVRs, call queues etc.

If you are looking for only those phone numbers directly owned by the extension, you have to call the API the same way (usageType=DirectNumber), and you have to parse the response and choose only the response objects which do not have the “extension” object. But remember that you cannot reassign a DL (Digital Line) number because it is associated with a provisioned device.


Reply