Update the voice settings
/v1/voice/settingsconst settings = await bird.voice.settings.update({
inbound_configuration: { route: { type: "trunk", trunk_id: "spt_01krdgeqcxet5s7t44vh8rt9mg" } },
});
console.log(settings.inbound_configuration.route.type);from bird import VoiceCallRouteTrunk, VoiceCallRouteWritable, VoiceSettingsInboundConfigurationPut
settings = client.voice.settings.update(
inbound_configuration=VoiceSettingsInboundConfigurationPut(
route=VoiceCallRouteWritable(
VoiceCallRouteTrunk(type="trunk", trunk_id="spt_01krdgeqcxet5s7t44vh8rt9mg")
),
),
)
print(settings.inbound_configuration.route.root.type)bird voice settings update --body-file - <<'JSON'
{
"inbound_configuration": {
"route": {
"type": "trunk",
"trunk_id": "spt_01krdgeqcxet5s7t44vh8rt9mg"
}
}
}
JSONcurl -X PATCH "https://us1.platform.bird.com/v1/voice/settings" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inbound_configuration": {
"route": {
"type": "trunk",
"trunk_id": "spt_01krdgeqcxet5s7t44vh8rt9mg"
}
}
}'{
"inbound_configuration": {
"route": {
"type": "reject"
}
}
}
Changes your workspace's voice settings. Omit a field to leave it as it is.
inbound_configuration.route applies to every Bird number that has no inbound route of its
own, from the next call it receives. A number with its own route keeps it, and verified
caller IDs receive no calls.
The route is checked the same way as a number's: a trunk must be yours and
have inbound calling enabled, and a forward target must be one of your
verified caller IDs, otherwise the update returns 412. A trunk_id that is not
one of your trunks returns 404. Deleting the trunk, or
turning off its inbound calling, sets the default back to "reject".
Request Payload
inbound_configurationThe route for calls arriving on any of your Bird numbers that has no inbound route of its own; verified caller IDs receive no calls. It takes effect on the next call to each of those numbers. Numbers with their own route keep it.
Response Payload
inbound_configurationWhat happens to a call arriving for any of your Bird numbers that has no inbound route of its own.
Show child attributes
inbound_configuration.routeThe workspace's default inbound route. Defaults to "reject".
Show child attributes
inbound_configuration.route.typeRefuses the call. Setting it is how you stop a number answering without giving it up. It is also the default inbound route of a new workspace.
Value: reject
inbound_configuration.route.typeDelivers the call to one of your SIP trunks.
Value: trunk
inbound_configuration.route.trunk_idThe SIP trunk that answers these calls. It must be one of yours and must have inbound calling enabled. Turning that trunk's inbound calling off, or deleting it, removes this route: a number returns to your workspace's default inbound route, and a workspace default becomes "reject".
inbound_configuration.route.typePlaces a call to another of your numbers and connects the two.
Value: forward
inbound_configuration.route.forward_toThe 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_asWhich 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.typeRuns the named sequence's active publication from the selected voice-call entry.
Value: sequence
inbound_configuration.route.sequence_idNamed sequence whose active publication handles the call.
inbound_configuration.route.entry_node_idVoice-call entry in the sequence's active publication.
Related resources
Continue with the documentation, guides and examples for this topic.