{"_id":"57bfbe812588020e004b5c0e","version":{"_id":"57624356653c2d2200fec79c","__v":21,"project":"55c8cff571d7580d0063a5e5","createdAt":"2016-06-16T06:12:38.244Z","releaseDate":"2016-06-16T06:12:38.244Z","categories":["57624356653c2d2200fec79d","57624356653c2d2200fec79e","57624356653c2d2200fec79f","57624356653c2d2200fec7a0","57624356653c2d2200fec7a1","57624356653c2d2200fec7a2","57624356653c2d2200fec7a3","57624356653c2d2200fec7a4","57624356653c2d2200fec7a5","57624356653c2d2200fec7a6","57624356653c2d2200fec7a7","57624356653c2d2200fec7a8","57624356653c2d2200fec7a9","57624356653c2d2200fec7aa","5779ca1b99b40b0e005abb3a","5779d198aea88b0e00f63277","5797d3ab17ced017003c4be4","57ac170ef1cdae0e0053cdfc","57dbfc723ed3450e00dc9e6d","5804d12d16161c0f0077df9b","5841064b652e5b0f0015a7c8","588b5e5f2966b2230009cbf9","58a68ebf3239fa0f00857619","58c23c8b4922930f0050ac91","58fd1460809fc30f00f2ee07","5934eaf5328680002d77de6a","594bf91601cfe6000f40f4c5","595c4ed696b447001ba0cf6d","596524495cee50001575f5be","5970d4f1313162004dd303b5","59780fac24dbd1001a1fa057","59a8cfd3ead78a002d63cafe","59e0323d93da1f001c9ec170","5b0c16f2be9fcb0003e28222"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"4.0.0","version":"4"},"user":"56f99ab84d2b4f3400edb636","__v":0,"parentDoc":null,"githubsync":"","project":"55c8cff571d7580d0063a5e5","category":{"_id":"57624356653c2d2200fec7aa","version":"57624356653c2d2200fec79c","project":"55c8cff571d7580d0063a5e5","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-05-16T21:10:43.732Z","from_sync":false,"order":29,"slug":"account-trunks","title":"Account Trunks"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-26T03:58:57.775Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":0,"body":"SIP Trunks are used to connect your Phone.com account to your PBX.  \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"SIP Trunking Customers Only\",\n  \"body\": \"Your Phone.com account must have [SIP Trunking](https://en.wikipedia.org/wiki/SIP_trunking) enabled in order to use any of our trunking features.  Please contact [Support](http://support.phone.com/) if you need this.  Otherwise, all requests to these services will result in a `403 Forbidden` error.\"\n}\n[/block]\n## Supported Services\n* [List Trunks](doc:list-account-trunks) \n* [Create Trunk](doc:create-account-trunk) \n* [Get Trunk](doc:get-account-trunk) \n* [Replace Trunk](doc:replace-account-trunk) \n* [Delete Trunk](doc:delete-account-trunk) \n\n## Summary Object\nThe Trunk Summary Object is used to briefly represent a trunk. It can be seen in several places throughout this API. Here are the properties:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"\",\n    \"0-0\": \"`id`\",\n    \"0-1\": \"Integer Trunk ID. Read-only.\",\n    \"0-2\": \"\",\n    \"1-0\": \"`name`\",\n    \"1-1\": \"Name. Required.\",\n    \"1-2\": \"\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\nHere's an example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": 3518135,\\n    \\\"name\\\": \\\"Office Gateway\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n## Full Object\nThe Full Trunk Object is identical to the [Trunk Summary Object](#section-summary-object), along with the following:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`uri`\",\n    \"1-0\": \"`max_concurrent_calls`\",\n    \"2-0\": \"`max_minutes_per_month`\",\n    \"3-0\": \"`greeting`\",\n    \"4-0\": \"`error_message`\",\n    \"0-1\": \"Fully-qualified SIP URI. Required.\",\n    \"1-1\": \"Max concurrent calls. Default is 10.\",\n    \"2-1\": \"Max minutes per month. Default is 750.\",\n    \"3-1\": \"[Greeting](doc:account-media). Output is a [Media Summary Object](doc:account-media#section-summary-object). Input must be a [Media Lookup Object](doc:account-media#section-lookup-object). Must refer to a media recording that has `is_hold_music` set to `FALSE`.\",\n    \"4-1\": \"[Error Message](doc:account-media).  Output is a [Media Summary Object](doc:account-media#section-summary-object). Input must be a [Media Lookup Object](doc:account-media#section-lookup-object). Must refer to a media recording that has `is_hold_music` set to `FALSE`.\",\n    \"5-0\": \"`codecs`\",\n    \"5-1\": \"Custom audio codec configuration, if any is needed.  If provided, must be a simple array containing the prioritized list of desired codecs. Supported codecs are: `g711u 64k`, `g711u 56k`, `g711a 64k`, `g711a 56k`, `g7231`, `g728`, `g729`, `g729A`, `g729B`, `g729AB`, `gms full`, `rfc2833`, `t38`, `ilbc`, `h263`, `g722`, `g722_1`, `g729D`, `g729E`, `amr`, `amr_wb`, `efr`, `evrc`, `h264`, `mpeg4`, `red`, `cng`, `SIP Info to 2833`\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n## Lookup Object\nThe Trunk Lookup Object is used to link to a trunk from another object. This is used, for example, when defining actions for [routes](doc:account-routes).  Only *one* of the following properties need to be included. If multiple are specified, then *all* properties must match one of your trunks.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Properties\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`id`\",\n    \"0-1\": \"ID\",\n    \"1-0\": \"`name`\",\n    \"1-1\": \"Name\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\nHere are some examples:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"trunk: {\\n    \\\"id\\\": 988923\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"trunk: {\\n    \\\"name\\\": \\\"Office Gateway\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nInstead of inputting an object, you can also use a scalar value.  A trunk will be found if the input matches any one of the above fields.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"trunk: \\\"Office Gateway\\\"\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"account-trunks","type":"basic","title":"Trunks"}
SIP Trunks are used to connect your Phone.com account to your PBX. [block:callout] { "type": "info", "title": "SIP Trunking Customers Only", "body": "Your Phone.com account must have [SIP Trunking](https://en.wikipedia.org/wiki/SIP_trunking) enabled in order to use any of our trunking features. Please contact [Support](http://support.phone.com/) if you need this. Otherwise, all requests to these services will result in a `403 Forbidden` error." } [/block] ## Supported Services * [List Trunks](doc:list-account-trunks) * [Create Trunk](doc:create-account-trunk) * [Get Trunk](doc:get-account-trunk) * [Replace Trunk](doc:replace-account-trunk) * [Delete Trunk](doc:delete-account-trunk) ## Summary Object The Trunk Summary Object is used to briefly represent a trunk. It can be seen in several places throughout this API. Here are the properties: [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "h-2": "", "0-0": "`id`", "0-1": "Integer Trunk ID. Read-only.", "0-2": "", "1-0": "`name`", "1-1": "Name. Required.", "1-2": "" }, "cols": 2, "rows": 2 } [/block] Here's an example: [block:code] { "codes": [ { "code": "{\n \"id\": 3518135,\n \"name\": \"Office Gateway\"\n}", "language": "json" } ] } [/block] ## Full Object The Full Trunk Object is identical to the [Trunk Summary Object](#section-summary-object), along with the following: [block:parameters] { "data": { "h-0": "Property", "h-1": "Description", "0-0": "`uri`", "1-0": "`max_concurrent_calls`", "2-0": "`max_minutes_per_month`", "3-0": "`greeting`", "4-0": "`error_message`", "0-1": "Fully-qualified SIP URI. Required.", "1-1": "Max concurrent calls. Default is 10.", "2-1": "Max minutes per month. Default is 750.", "3-1": "[Greeting](doc:account-media). Output is a [Media Summary Object](doc:account-media#section-summary-object). Input must be a [Media Lookup Object](doc:account-media#section-lookup-object). Must refer to a media recording that has `is_hold_music` set to `FALSE`.", "4-1": "[Error Message](doc:account-media). Output is a [Media Summary Object](doc:account-media#section-summary-object). Input must be a [Media Lookup Object](doc:account-media#section-lookup-object). Must refer to a media recording that has `is_hold_music` set to `FALSE`.", "5-0": "`codecs`", "5-1": "Custom audio codec configuration, if any is needed. If provided, must be a simple array containing the prioritized list of desired codecs. Supported codecs are: `g711u 64k`, `g711u 56k`, `g711a 64k`, `g711a 56k`, `g7231`, `g728`, `g729`, `g729A`, `g729B`, `g729AB`, `gms full`, `rfc2833`, `t38`, `ilbc`, `h263`, `g722`, `g722_1`, `g729D`, `g729E`, `amr`, `amr_wb`, `efr`, `evrc`, `h264`, `mpeg4`, `red`, `cng`, `SIP Info to 2833`" }, "cols": 2, "rows": 6 } [/block] ## Lookup Object The Trunk Lookup Object is used to link to a trunk from another object. This is used, for example, when defining actions for [routes](doc:account-routes). Only *one* of the following properties need to be included. If multiple are specified, then *all* properties must match one of your trunks. [block:parameters] { "data": { "h-0": "Properties", "h-1": "Description", "0-0": "`id`", "0-1": "ID", "1-0": "`name`", "1-1": "Name" }, "cols": 2, "rows": 2 } [/block] Here are some examples: [block:code] { "codes": [ { "code": "trunk: {\n \"id\": 988923\n}", "language": "json" } ] } [/block] [block:code] { "codes": [ { "code": "trunk: {\n \"name\": \"Office Gateway\"\n}", "language": "json" } ] } [/block] Instead of inputting an object, you can also use a scalar value. A trunk will be found if the input matches any one of the above fields. [block:code] { "codes": [ { "code": "trunk: \"Office Gateway\"", "language": "json" } ] } [/block]