Update origination url
Network element entry points into your communications infrastructure
Path parameters
-
The SID of the Trunk from which to update the OriginationUrl.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^TK[0-9a-fA-F]{32}$
. -
The unique string that we created to identify the OriginationUrl resource to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^OU[0-9a-fA-F]{32}$
.
Body
-
The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.
-
The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.
-
Whether the URL is enabled. The default is
true
. -
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
-
The SIP address you want Twilio to route your Origination calls to. This must be a
sip:
schema.sips
is NOT supported.
curl \
--request POST 'https://trunking.twilio.com/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'SipUrl=sip%3A%2F%2Fsip-updated.com%3A4321&Weight=2&Enabled=false&Priority=2&FriendlyName=updated_name'
{"SipUrl"=>"sip://sip-updated.com:4321", "Weight"=>2, "Enabled"=>false, "Priority"=>2, "FriendlyName"=>"updated_name"}
{
"sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"weight": 2,
"enabled": false,
"sip_url": "sip://sip-updated.com:4321",
"priority": 2,
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2018-05-07T20:50:58Z",
"date_updated": "2018-05-07T20:50:58Z",
"friendly_name": "updated_name"
}