Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

OriginationUrl Resource

The OriginationUrl Resource represents the Origination SIP URL(s) of your Trunk. OriginationUrls identify the network element entry point(s) into your communications infrastructure (e.g. IP-PBX, SBC). See Origination Settings in the SIP Trunking configuration page
for more information.

OriginationUrl properties

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the OriginationUrl resource.

sid
sid<OU> Not PII

The unique string that we created to identify the OriginationUrl resource.

trunkSid
sid<TR> Not PII

The SID of the Trunk that owns the Origination URL.

weight
integer Not PII

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.

enabled
boolean Not PII

Whether the URL is enabled. The default is true.

sipUrl

The SIP address you want Twilio to route your Origination calls to. This must be a sip: schema.

friendlyName
string Not PII

The string that you assigned to describe the resource.

priority
integer Not PII

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.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

url
url Not PII

The absolute URL of the resource.

Create an OriginationUrl resource

post
https://trunking.twilio.com/v1/Trunks/{TrunkSid}/OriginationUrls
Parameters
Names in None format
trunk_sid
Required
post sid<TR> Not PII

The SID of the Trunk to associate the resource with.

weight
Required
post integer Not PII

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.

priority
Required
post integer Not PII

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.

enabled
Required
post boolean Not PII

Whether the URL is enabled. The default is true.

friendly_name
Required
post string Not PII

A descriptive string that you create to describe the resource. It can be up to 64 characters long.

sip_url
Required
post url PII MTL: 30 DAYS

The SIP address you want Twilio to route your Origination calls to. This must be a sip: schema.

Example
        
        
        
        

        Fetch an OriginationUrl resource

        get
        https://trunking.twilio.com/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}
        Parameters
        Names in None format
        trunk_sid
        Required
        get sid<TR> Not PII

        The SID of the Trunk from which to fetch the OriginationUrl.

        sid
        Required
        get sid<OU> Not PII

        The unique string that we created to identify the OriginationUrl resource to fetch.

        Example
              
              
              
              

              Read multiple OriginationUrl resources

              get
              https://trunking.twilio.com/v1/Trunks/{TrunkSid}/OriginationUrls
              Parameters
              Names in None format
              trunk_sid
              Required
              get sid<TR> Not PII

              The SID of the Trunk from which to read the OriginationUrl.

              Example
                    
                    
                    
                    

                    Update an OriginationUrl resource

                    post
                    https://trunking.twilio.com/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}
                    Parameters
                    Names in None format
                    trunk_sid
                    Required
                    post sid<TR> Not PII

                    The SID of the Trunk from which to update the OriginationUrl.

                    sid
                    Required
                    post sid<OU> Not PII

                    The unique string that we created to identify the OriginationUrl resource to update.

                    weight
                    Optional
                    post integer Not PII

                    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.

                    priority
                    Optional
                    post integer Not PII

                    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.

                    enabled
                    Optional
                    post boolean Not PII

                    Whether the URL is enabled. The default is true.

                    friendly_name
                    Optional
                    post string Not PII

                    A descriptive string that you create to describe the resource. It can be up to 64 characters long.

                    sip_url
                    Optional
                    post url PII MTL: 30 DAYS

                    The SIP address you want Twilio to route your Origination calls to. This must be a sip: schema. sips is NOT supported.

                    Example
                          
                          
                          
                          

                          Delete an OriginationUrl resource

                          delete
                          https://trunking.twilio.com/v1/Trunks/{TrunkSid}/OriginationUrls/{Sid}
                          Parameters
                          Names in None format
                          trunk_sid
                          Required
                          delete sid<TR> Not PII

                          The SID of the Trunk from which to delete the OriginationUrl.

                          sid
                          Required
                          delete sid<OU> Not PII

                          The unique string that we created to identify the OriginationUrl resource to delete.

                          Example
                                
                                
                                
                                
                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.