.Net SDK (from NuGet)
I am trying to get a list of all phones, somewhat similar to what is shown on Phone System>>Phone Numbers>>All Numbers. The purpose is a simple lookup to be used with the from/to numbers in the call log.
The columns i think i want are: Number, Name, Assigned to, Type, Primary, UsageType
Assigned To seems to comes from Client.Restapi.Account.Extension.List(). I can create a dictionary, using id as the .key and .name as the value. Though the api lists .primary, the .net SDK does not return it.
[On a side note, the Try it out returns only 2 records. The actual call does return them all.]
Client.Restapi.V2.Accounts.PhoneNumbers.Get() has .callerIdName, .phoneNumber, .type, .usageType. It also has .extension.id which can be used to get the name from the dictionary. It does not have .label/.name, nor does it have .primary.
Client.Restapi.Account.PhoneNumber.List, does have .label and .primary, however, it only returns the In Use numbers, and leaves out the ones in Inventory.
Because the primary number has to be in use, i guess i could make the V1 call to search for the primary number. It would also give me the labels for the In Use numbers.
That leaves me with a couple questions:
- Is there a way (via this sdk) to get the labels for Inventory numbers?
- Am i going about this the right way?