{"_id":"5489e243d8dec60b00034297","category":{"_id":"543bf3e22a30961a00b66eb3","__v":21,"pages":["5489d5e61ea5330b007b5a51","5489e243d8dec60b00034297","5489e318aefb240b00d197ef","56cdf622e538330b0021ab5a"],"project":"542dbe0ecb19820800c1f4d7","version":"542ecc0a6b0eb6080066ca77","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-13T15:46:42.097Z","from_sync":false,"order":0,"slug":"inboundxml","title":"InboundXML"},"version":{"_id":"542ecc0a6b0eb6080066ca77","forked_from":"542dbe0fcb19820800c1f4da","project":"542dbe0ecb19820800c1f4d7","__v":31,"createdAt":"2014-10-03T16:17:14.165Z","releaseDate":"2014-10-03T16:17:14.165Z","categories":["542ecc0a6b0eb6080066ca78","542ef44f6b0eb6080066cb24","543bf3e22a30961a00b66eb3","5446952b82bd7e08002768a0","544821ae8d7af31a00dd41ce","544a7885f1aefa08006efc69","544c758e11845f0e001ed8de","544e5565b80812080035be55","544e558dbd51b9080037f8ca","5450b045a66f020800dba73d","5450eb6aa66f020800dba945","5450f39ea66f020800dba989","5450f877a66f020800dba9cf","54510356a66f020800dbaa17","5451274514af501a00b50c99","54513345a66f020800dbab24","54513cc014af501a00b50d24","54515eec14af501a00b50db9","54519b1d14af501a00b50ea9","54519b2aa66f020800dbacb4","54524f9704160008005b1d27","54538d2308d1800800473d95","54538d420c09721000a06a03","54538e5608d1800800473d9a","5453ea9547c30114004fb375","5453eb12b077c31c00067bcb","5453eb27b077c31c00067bcd","5453ed5db077c31c00067bde","548075cbe291c51a00e7e096","5922fa475c48c70f00f21453","59244fd41e32eb190028ad8d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"user":"543ed56855bb100800095599","project":"542dbe0ecb19820800c1f4d7","__v":6,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-12-11T18:28:19.210Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","try":true,"basic_auth":false,"auth":"never","params":[],"url":""},"isReference":false,"order":1,"body":"When handling an inbound call or SMS, Zang requests either the Voice or SMS Request URL (or any other subsequent URLs Zang may interact with) using standard HTTP GET or POST methods. The method can be specified on a case by case basis, but both send the following default request parameters to Zang with information about the call or SMS taking place. If the initial request method is GET, these values are sent as URL query parameters. If it is POST, they are sent as POST parameters.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Default Voice Request Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"AccountSid\",\n    \"0-1\": \"Alphanumeric string identifying the account this call occurred through.\",\n    \"1-0\": \"ApiVersion\",\n    \"1-1\": \"The version of the API the call is using.\",\n    \"2-0\": \"Direction\",\n    \"2-1\": \"The direction of the call.\",\n    \"3-0\": \"CallerName\",\n    \"3-1\": \"The name registered to the phone calling.\",\n    \"4-0\": \"To\",\n    \"4-1\": \"The number called.\",\n    \"5-0\": \"From\",\n    \"5-1\": \"The number calling.\",\n    \"6-0\": \"CallSid\",\n    \"6-1\": \"Alphanumeric string identifying this call.\",\n    \"7-0\": \"CallStatus\",\n    \"7-1\": \"Status of the call. May be: queued, ringing, in-progress, completed, busy, failed, no-answer, or canceled.\",\n    \"8-0\": \"UrlBase\",\n    \"8-1\": \"The base URL that was consulted at call connection.\",\n    \"9-0\": \"Unblocked\",\n    \"9-1\": \"Boolean value specifying whether the inbound number calling was unblocked. This parameter will only be default for DIDs that have unblocking enabled.\",\n    \"10-0\": \"ForwardedFrom\",\n    \"10-1\": \"The number this call was forwarded from. This parameter will only be present if the call was forwarded.\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Default SMS Request Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"AccountSid\",\n    \"0-1\": \"Alphanumeric string identifying the account this SMS occurred through.\",\n    \"1-0\": \"ApiVersion\",\n    \"1-1\": \"The version of the API the SMS is using.\",\n    \"2-0\": \"To\",\n    \"2-1\": \"The number that received the SMS message.\",\n    \"3-0\": \"From\",\n    \"3-1\": \"The number that sent the SMS message.\",\n    \"4-0\": \"SmsSid\",\n    \"4-1\": \"Alphanumeric string identifying this SMS resource.\",\n    \"5-0\": \"SmsStatus\",\n    \"5-1\": \"Status of the SMS.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Number and Date Formats\"\n}\n[/block]\nZang tries to change all phone numbers to [E.164](http://en.wikipedia.org/wiki/E.164) format (e.g. (123)-456-7890 to 1234567890). If it can not, it uses the raw number input.\n\nIn addition, the date \"1:22 PM PDT on January 12th, 2012 \" would be displayed as \"Thu, 12 Jan 2012 01:22:00 -4000\" to adhere to UTC in [RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.","excerpt":"Parameters you can include for a InboundXML Request","slug":"request","type":"basic","title":"Request"}

Request

Parameters you can include for a InboundXML Request

When handling an inbound call or SMS, Zang requests either the Voice or SMS Request URL (or any other subsequent URLs Zang may interact with) using standard HTTP GET or POST methods. The method can be specified on a case by case basis, but both send the following default request parameters to Zang with information about the call or SMS taking place. If the initial request method is GET, these values are sent as URL query parameters. If it is POST, they are sent as POST parameters. [block:api-header] { "type": "basic", "title": "Default Voice Request Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "AccountSid", "0-1": "Alphanumeric string identifying the account this call occurred through.", "1-0": "ApiVersion", "1-1": "The version of the API the call is using.", "2-0": "Direction", "2-1": "The direction of the call.", "3-0": "CallerName", "3-1": "The name registered to the phone calling.", "4-0": "To", "4-1": "The number called.", "5-0": "From", "5-1": "The number calling.", "6-0": "CallSid", "6-1": "Alphanumeric string identifying this call.", "7-0": "CallStatus", "7-1": "Status of the call. May be: queued, ringing, in-progress, completed, busy, failed, no-answer, or canceled.", "8-0": "UrlBase", "8-1": "The base URL that was consulted at call connection.", "9-0": "Unblocked", "9-1": "Boolean value specifying whether the inbound number calling was unblocked. This parameter will only be default for DIDs that have unblocking enabled.", "10-0": "ForwardedFrom", "10-1": "The number this call was forwarded from. This parameter will only be present if the call was forwarded." }, "cols": 2, "rows": 11 } [/block] [block:api-header] { "type": "basic", "title": "Default SMS Request Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "AccountSid", "0-1": "Alphanumeric string identifying the account this SMS occurred through.", "1-0": "ApiVersion", "1-1": "The version of the API the SMS is using.", "2-0": "To", "2-1": "The number that received the SMS message.", "3-0": "From", "3-1": "The number that sent the SMS message.", "4-0": "SmsSid", "4-1": "Alphanumeric string identifying this SMS resource.", "5-0": "SmsStatus", "5-1": "Status of the SMS." }, "cols": 2, "rows": 6 } [/block] [block:api-header] { "type": "basic", "title": "Number and Date Formats" } [/block] Zang tries to change all phone numbers to [E.164](http://en.wikipedia.org/wiki/E.164) format (e.g. (123)-456-7890 to 1234567890). If it can not, it uses the raw number input. In addition, the date "1:22 PM PDT on January 12th, 2012 " would be displayed as "Thu, 12 Jan 2012 01:22:00 -4000" to adhere to UTC in [RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.