メニュー

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?

オリジネーションURL

トランクのオリジネーション SIP URL を表します。コミュニケーションインフラストラクチャーへのネットワークエレメントエントリーポイントを識別します(IP-PBX、SBC など)。 詳細については、オリジネーション設定を参照してください。

アクション

リソースのプロパティ

オリジネーション URL インスタンスリソースは、以下のプロパティーを持ちます。

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

Twilio にオリジネーション通話をルーティングさせる先の SIP アドレス。 これは sip: スキーマでなければなりません。

friendlyName
文字列 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.


すべてのオリジネーション URL をリストする

先頭に戻る

GET /Trunks/{Trunk SID}/OriginationUrls

このトランクに対するすべてのオリジネーション URL のページ化リストを取得します。

curl -G https://trunking.twilio.com/v1/Trunks/{Trunk SID}/OriginationUrls \
    -u '{twilio account sid}:{twilio auth token}'

レスポンス例

{
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/OriginationUrls?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/OriginationUrls?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "origination_urls"
  },
  "origination_urls": [
    {
      "sid": "OU7d8d1292a8a8b2722cbaff50b371fc33",
      "account_sid": "ACxxx",
      "trunk_sid": "TKfa1e5a85f63bfc475c2c753c0f289932",
      "weight": 60,
      "enabled": true,
      "sip_url": "sip:169.10.1.15",
      "friendly_name": "",
      "priority": 10,
      "date_created": "2015-03-10T19:25:50Z",
      "date_updated": "2015-08-16T05:17:49Z",
      "url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/OriginationUrls/OU7d8d1292a8a8b2722cbaff50b371fc33"
    }
  ]
}


オリジネーション URL を作成する

先頭に戻る

POST /Trunks/{Trunk SID}/OriginationUrls

トランクの新しいオリジネーション URL を作成します。

注:所定のトランクに許容されるオリジネーション URL の最大数は 10 です。

curl -XPOST https://trunking.twilio.com/v1/Trunks/{Trunk SID}/OriginationUrls \
    -d "FriendlyName=MyOriginationUrl" \
    -d "SipUrl=sip:xxx" \
    -d "Priority=0" \
    -d "Weight=1" \
    -d "Enabled=true" \
    -u '{twilio account sid}:{twilio auth token}'

必須パラメーター

Names in PHP format
trunkSid
必須
post sid<TR> Not PII

The SID of the Trunk to associate the resource with.

weight
必須
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
必須
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
必須
post boolean Not PII

Whether the URL is enabled. The default is true.

friendlyName
必須
post 文字列 Not PII

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

sipUrl
必須
post url PII MTL: 30 DAYS

Twilio にオリジネーション通話をルーティングさせる先の SIP アドレス。 これは sip: スキーマでなければなりません。

レスポンス例

{
  "sid": "OUa83fd602a8bcb24b0a8a10bab87b1085",
  "account_sid": "ACxxx",
  "trunk_sid": "TKfa1e5a85f63bfc475c2c753c0f289932",
  "weight": 10,
  "enabled": true,
  "sip_url": "sip:169.10.1.35",
  "friendly_name": "sip:169.10.1.35",
  "priority": 20,
  "date_created": "2015-09-02T23:15:56Z",
  "date_updated": "2015-09-02T23:15:56Z",
  "url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/OriginationUrls/OUa83fd602a8bcb24b0a8a10bab87b1085"
}


すべてのオリジネーション URL を取得する

先頭に戻る

GET /Trunks/{Trunk SID}/OriginationUrls/{URL SID}

トランクに対する特定のオリジネーション URL のインスタンスデータを取得します。

curl -G https://trunking.twilio.com/v1/Trunks/{Trunk SID}/OriginationUrls/{URL SID} \
    -u '{twilio account sid}:{twilio auth token}'

レスポンス例

{
  "sid": "OUa83fd602a8bcb24b0a8a10bab87b1085",
  "account_sid": "ACxxx",
  "trunk_sid": "TKfa1e5a85f63bfc475c2c753c0f289932",
  "weight": 10,
  "enabled": true,
  "sip_url": "sip:169.10.1.35",
  "friendly_name": "sip:169.10.1.35",
  "priority": 20,
  "date_created": "2015-09-02T23:15:56Z",
  "date_updated": "2015-09-02T23:15:56Z",
  "url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/OriginationUrls/OUa83fd602a8bcb24b0a8a10bab87b1085"
}


オリジネーション URL をアップデートする

先頭に戻る

POST /Trunks/{Trunk SID}/OriginationUrls/{URL SID}

トランクのオリジネーション URL のプロパティーをアップデートします。

注:所定のトランクに許容されるオリジネーション URL の最大数は 10 です。

curl -XPOST https://trunking.twilio.com/v1/Trunks/{Trunk SID}/OriginationUrls/{URL SID} \
    -d "Priority=30"  \
    -u '{twilio account sid}:{twilio auth token}'

オプションパラメーター

Names in PHP format
trunkSid
必須
post sid<TR> Not PII

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

sid
必須
post sid<OU> Not PII

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

weight
オプション
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
オプション
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
オプション
post boolean Not PII

Whether the URL is enabled. The default is true.

friendlyName
オプション
post 文字列 Not PII

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

sipUrl
オプション
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.

レスポンス例

{
  "sid": "OUa83fd602a8bcb24b0a8a10bab87b1085",
  "account_sid": "ACxxx",
  "trunk_sid": "TKfa1e5a85f63bfc475c2c753c0f289932",
  "weight": 10,
  "enabled": true,
  "sip_url": "sip:169.10.1.35",
  "friendly_name": "sip:169.10.1.35",
  "priority": 30,
  "date_created": null,
  "date_updated": null,
  "url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/OriginationUrls/OUa83fd602a8bcb24b0a8a10bab87b1085"
}


オリジネーション URL を削除する

先頭に戻る

DELETE /Trunks/{Trunk SID}/OriginationUrls/{URL SID}

このトランクからオリジネーション URL を削除します。

curl -XDELETE https://trunking.twilio.com/v1/Trunks/{Trunk SID}/OriginationUrls/{URL SID} \
    -u '{twilio account sid}:{twilio auth token}'

レスポンス例

リクエストが成功すると、HTTP ステータスコード 204 と空の本文が返されます。

Rate this page:

ヘルプが必要ですか?

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.