Jump to content
KAZOOcon: hackathon signup and details here! ×

phone number


Recommended Posts

Yes
https://github.com/2600hz/kazoo/blob/master/applications/crossbar/doc/phone_numbers.md
or
https://docs.2600hz.com/supported/applications/crossbar/doc/phone_numbers/

/v2/phone_numbers?prefix={PREFIX}&quantity={QUANTITY}&offset={OFFSET}&country={COUNTRY} should return numbers, and their status. Don't know if it shows who it is assigned to. Worst case, you could loop through accounts and use GET /v2/accounts/{ACCOUNT_ID}/phone_numbers

Someone might know a better method, or you can look at how the number manager in monsterui does it.

Link to comment
Share on other sites

AFAIK, only way to do this is to use /v2/accounts/{account_id}/phone_numbers

If you set account_id to your root re-seller account, it will return all numbers for subaccounts also and you can loop through them/page through. You can also apply filters, such as "?filter_state=in_service or ?created_from=63627345744

in_service should mean that it's assigned to a callflow. avaialble should mean that it is not assigned to a callflow. You can look at the assigned_to field to see if it's assigned to a subaccount/an account other than your root re-seller account.

Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...