Avneet Singh Posted October 15, 2018 Report Share Posted October 15, 2018 Hello All, Is there any phone number's api to differentiate "spare numbers" and "number in use" . Also is there any api to describe that phone number is assigned to which user . Thanks Quote Link to comment Share on other sites More sharing options...
0 Mooseable Posted October 15, 2018 Report Share Posted October 15, 2018 Yeshttps://github.com/2600hz/kazoo/blob/master/applications/crossbar/doc/phone_numbers.md orhttps://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. Quote Link to comment Share on other sites More sharing options...
0 Avneet Singh Posted October 16, 2018 Author Report Share Posted October 16, 2018 what here states "aging", "available", "in_service", "port_in", "reserved" means in the document https://docs.2600hz.com/supported/applications/crossbar/doc/phone_numbers/ Can we differentiate "spare numbers" and "numbers in use" using this filter_state. Quote Link to comment Share on other sites More sharing options...
0 CCP Posted October 16, 2018 Report Share Posted October 16, 2018 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. Quote Link to comment Share on other sites More sharing options...
0 Avneet Singh Posted October 16, 2018 Author Report Share Posted October 16, 2018 I havn't assigned phone number to callflow but still it reamains "in_service" and filter_state=avaialble not responds any data Quote Link to comment Share on other sites More sharing options...
0 mc_ Posted October 17, 2018 Report Share Posted October 17, 2018 Number states can be read about more here: https://docs.2600hz.com/dev/core/kazoo_number_manager/doc/number_states/ I'm not sure what monster-ui uses to determine "spare" vs "in-use"; @azefiel ? Quote Link to comment Share on other sites More sharing options...
0 Barnaby Puttick Posted April 1, 2019 Report Share Posted April 1, 2019 On 10/17/2018 at 5:05 PM, mc_ said: I'm not sure what monster-ui uses to determine "pvt_used_by": "callflow" Quote Link to comment Share on other sites More sharing options...
Question
Avneet Singh
Hello All,
Is there any phone number's api to differentiate "spare numbers" and "number in use" . Also is there any api to describe that phone number is assigned to which user .
Thanks
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.