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.