Get a voice number
GET
/v1/voice/numbers/{number_id}
const number = await bird.voice.numbers.get("number-id");
console.log(number.phone_number, number.directions);number = client.voice.numbers.get("number-id")
print(number.phone_number, number.directions)number, err := client.Voice.Numbers.Get(context.Background(), "number-id")
if err != nil {
log.Fatal(err)
}
fmt.Println(number.PhoneNumber, number.Directions)$number = $bird->voice->numbers->get('number-id');
echo $number->getPhoneNumber(), "\n";bird voice numbers get <number-id>curl -X GET "https://us1.platform.bird.com/v1/voice/numbers/{number_id}" \
-H "Authorization: Bearer $TOKEN"प्रतिक्रिया200
{
"id": "vnu_01krdgeqcxet5s7t44vh8rt9mg",
"phone_number": "+14155551234",
"country_code": "US",
"name": "Support line",
"provider": {
"type": "allocation",
"number_id": "nda_01krdgeqcxet5s7t44vh8rt9mg"
},
"inbound_configuration": {
"route": {
"type": "reject"
},
"configuration_error": "unsupported_route_type",
"forward_as_options": [
"dialed_number",
"calling_number"
]
}
}
Returns one of the numbers your workspace can use for voice.
A number nobody has configured reads back with its inbound route set to
"reject", which is where every number starts rather than an absence.
पैरामीटर
number_id
string
Response Payload
id
string
आवश्यक
Identifier of this number, to pass to the operations that read and change it. A number you registered as a caller ID carries the same identifier there, with the caller-ID prefix.
phone_number
string
आवश्यक
The phone number in E.164 format.
country_code
nullable string
आवश्यक
Country the number belongs to. Null when the number is not geographic or its country cannot be determined.
name
nullable string
आवश्यक
Your own label for this number, to tell several apart. Null when it has none. Only you see it, so it never affects what a caller sees.
provider
object
आवश्यक
Where this number came from, and the facts that belong to that answer. The type selects the shape. allocation is a number we allocated to your workspace, and it carries that allocation's identifier. verified_number is a number from another carrier, and it carries how far proving control of it has got.
चाइल्ड एट्रिब्यूट दिखाएँ
provider.type
string
आवश्यक
A number we allocated to your workspace.
Value: allocation
provider.number_id
nullable string
आवश्यक
Identifier of this number's allocation, to pass to the numbers operations. Null when the allocation behind this number cannot be resolved.
provider.type
string
आवश्यक
A number from another carrier that you registered here. That carrier decides where calls to it go; we only present it on calls you place.
Value: verified_number
provider.status
string
आवश्यक
How far proving control of this number has got.
Possible values (may grow over time): pending, verified, failed
provider.verified_at
nullable string
आवश्यक
When control of this number was last proven. Null until it is.
directions
object
आवश्यक
Which directions this number can carry. Both follow from the number itself, so neither is yours to change. On a SIP trunk each direction is a setting you turn on; here it is a fact about the number.
चाइल्ड एट्रिब्यूट दिखाएँ
directions.inbound
boolean
आवश्यक
Whether calls to this number arrive here. False for a number from another carrier, whose calls that carrier routes, and for one allocated to you that cannot carry calls.
directions.outbound
boolean
आवश्यक
Whether this number can be presented on a call you place. Buying a number does not grant this on its own: proving control of it does.
inbound_configuration
object
आवश्यक
What happens to a call arriving for this number.
चाइल्ड एट्रिब्यूट दिखाएँ
inbound_configuration.route
nullable object
आवश्यक
Null when the stored route type is unsupported; inspect configuration_error before changing it.
चाइल्ड एट्रिब्यूट दिखाएँ
inbound_configuration.route.type
string
आवश्यक
Refuses the call. Every number starts here, and setting it again is how you stop a number answering without giving it up.
Value: reject
inbound_configuration.route.type
string
आवश्यक
Delivers the call to one of your SIP trunks.
Value: trunk
inbound_configuration.route.trunk_id
string
आवश्यक
The SIP trunk that answers calls to this number. It must be one of yours and must have inbound calling enabled. Turning that trunk's inbound calling off, or deleting it, puts this number back on "reject".
inbound_configuration.route.type
string
आवश्यक
Places a call to another of your numbers and connects the two.
Value: forward
inbound_configuration.route.forward_to
string
आवश्यक
The number calls are forwarded to, in E.164 format. It has to be one of your verified caller IDs. That is checked when you set it and again on every call it forwards, so a caller ID you later remove stops forwarding rather than carrying on.
inbound_configuration.route.forward_as
string
आवश्यक
Which number the forwarded leg presents as its caller. Include the choice
on every write. Reads return the effective choice; older configurations
without a stored choice return dialed_number.
Possible values: dialed_number, calling_number
inbound_configuration.route.type
string
आवश्यक
Runs the named sequence's active publication from the selected voice-call entry.
Value: sequence
inbound_configuration.route.sequence_id
string
आवश्यक
Named sequence whose active publication handles the call.
inbound_configuration.route.entry_node_id
string
आवश्यक
Voice-call entry in the sequence's active publication.
inbound_configuration.configuration_error
string
Possible values: unsupported_route_type
inbound_configuration.forward_as_options
array of string
Caller identities available when configuring a forward. Use these values to populate the choice in your editor. The current choices are dialed_number and calling_number.
created_at
string
आवश्यक
When this number became usable for voice: when it was allocated to you, or when you first registered it, whichever this number is.
संबंधित संसाधन
इस विषय के लिए डॉक्यूमेंटेशन, गाइड और उदाहरणों के साथ आगे बढ़ें। संसाधन अंग्रेज़ी में हैं।
कॉन्सेप्ट समझेंShould I use a Bird SDK or call the API directly?लर्निंग पाथ फ़ॉलो करेंBuild your first integrationइम्प्लीमेंटेशन गाइडSend your first email
इम्प्लीमेंटेशन ब्रीफ़ पाएँ