Menu

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?

IP Access Control Lists

The IP Access Control Lists subresource contains the list of IP Access Control List instances associated with this Trunk. If an INVITE is received for a Trunk, the source IP address must be in one of the lists for the INVITE to be accepted.

In order to create, list, and delete IP Access Control List instances please see the core Twilio REST API. Check out the IP Access Control List reference docs for more information.

Actions


List all IP Access Control Lists for a Trunk

Back To Top

GET /Trunks/{Trunk SID}/IpAccessControlLists

Get a paged listing of all IP Access Control List instances for this SIP Trunk.

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

Example Response

{
  "ip_access_control_lists": [
    {
      "sid": "ALda698f172824105e9037b3e9a167dfb8",
      "account_sid": "ACxxx",
      "trunk_sid": "TKfa1e5a85f63bfc475c2c753c0f289932",
      "friendly_name": "10.0.0.1",
      "date_created": "2014-10-30T23:59:12Z",
      "date_updated": "2014-10-30T23:59:12Z",
      "url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/IpAccessControlLists/ALda698f172824105e9037b3e9a167dfb8"
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/IpAccessControlLists?PageSize=50&Page=0",
    "previous_page_url": null,
    "url": "https://trunking.twilio.com/v1/Trunks/TKfa1e5a85f63bfc475c2c753c0f289932/IpAccessControlLists?PageSize=50&Page=0",
    "next_page_url": null,
    "key": "ip_access_control_lists"
  }
}


Associate an IP Access Control List with a Trunk

Back To Top

POST /Trunks/{Trunk SID}/IpAccessControlLists

Associate a IP Access Control List (by SID) with this SIP Trunk.

curl -XPOST https://trunking.twilio.com/v1/Trunks/{trunk sid}/IpAccessControlLists \
    -d "IpAccessControlListSid=xxx" \
    -u '{twilio account sid}:{twilio auth token}'

Required Parameters

Names in js format
ipAccessControlListSid
Required
post sid<AL> Not PII

The SID of the IP Access Control List that you want to associate with this trunk.

Example Response

{
  "sid": "ALda698f172824105e9037b3e9a167dfb8",
  "account_sid": "ACxxx",
  "trunk_sid": "TK298268bb645f1854e9ad171bd1427003",
  "friendly_name": "10.0.0.1",
  "date_created": "2014-10-30T23:59:12Z",
  "date_updated": "2014-10-30T23:59:12Z",
  "url": "https://trunking.twilio.com/v1/Trunks/TK298268bb645f1854e9ad171bd1427003/IpAccessControlLists/ALda698f172824105e9037b3e9a167dfb8"
}


Remove an associated IP Access Control List from a Trunk

Back To Top

DELETE /Trunks/{Trunk SID}/IpAccessControlLists/{IP Access Control List SID}

Remove a IP Access Control List (identified by a SID) from this SIP Trunk.

curl -XDELETE https://trunking.twilio.com/v1/Trunks/{trunk sid}/IpAccessControlLists/{list sid} \
    -u '{twilio account sid}:{twilio auth token}'

Example Response

A successful request returns an HTTP status code 204 and an empty body.

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.