Create origination url
Network element entry points into your communications infrastructure
Path parameters
-
The SID of the Trunk to associate the resource with.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^TK[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.
curl \
--request POST 'https://trunking.twilio.com/v1/Trunks/{TrunkSid}/OriginationUrls' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'SipUrl=sip%3A%2F%2Fsip-box.com%3A1234&Weight=1&Enabled=true&Priority=1&FriendlyName=friendly_name'
{"SipUrl"=>"sip://sip-box.com:1234", "Weight"=>1, "Enabled"=>true, "Priority"=>1, "FriendlyName"=>"friendly_name"}
{
"sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/OriginationUrls/OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"weight": 1,
"enabled": true,
"sip_url": "sip://sip-box.com:1234",
"priority": 1,
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2018-05-07T20:50:58Z",
"date_updated": "2018-05-07T20:50:58Z",
"friendly_name": "friendly_name"
}