{"__v":15,"_id":"5489d5e61ea5330b007b5a51","category":{"__v":21,"_id":"543bf3e22a30961a00b66eb3","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":1,"slug":"inboundxml","title":"InboundXML"},"parentDoc":null,"project":"542dbe0ecb19820800c1f4d7","user":"543ed56855bb100800095599","version":{"__v":29,"_id":"542ecc0a6b0eb6080066ca77","forked_from":"542dbe0fcb19820800c1f4da","project":"542dbe0ecb19820800c1f4d7","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"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-12-11T17:35:34.697Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":false,"results":{"codes":[]},"settings":"","try":true,"auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"InboundXML describes how Zang should handle a call or SMS message. An InboundXML document is made up of various XML elements nested in the response element. Every phone number registered with Zang points to a URL containing one of these InboundXML documents.\n\nUpon receiving a call or SMS, Zang follows the InboundXML instructions, enabling developers to easily build telephony apps with all the same function and power found in traditional phone systems.\n\nWhen a call or sms is initiated using the REST API, the URL of a InboundXML document is passed as a parameter to describe what will happen when the contacted party answers.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Implementing InboundXML\"\n}\n[/block]\nUsing InboundXML simplifies hosting a file containing InboundXML. Point the Voice or SMS URL's on one of your Zang number's to the file you created, and you're good to go. Call or text into that number and you'll see it in action!\n\n**Step 1:**\nCreate an InboundXML document in the InboundXML Editor (Developers > InboundXML Editor) and save it:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<Response>\\n <Say voice=\\\"woman\\\">Welcome to your new Zang account.</Say>\\n <Say>Let us know if we can help you in any way during your development.</Say>\\n</Response>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n**Step 2:**\nProceed to _Dashboard > Manage Numbers_ and set the InboundXML Public URL as one of your Zang number's Voice Request URL. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1u4dc9PvTOOMOuIO2zc7_Screen%20Shot%202016-05-15%20at%206.07.44%20PM.png\",\n        \"Screen Shot 2016-05-15 at 6.07.44 PM.png\",\n        \"1924\",\n        \"1208\",\n        \"#de4d43\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**Thats it!**\nYou're ready to start receiving calls and SMS messages through Zang!\nIf you are trying to initiate an outbound call or sms from your application, see [Getting Started with Zang](doc:getting-started).","excerpt":"","slug":"inboundxml-overview","type":"basic","title":"Overview"}
InboundXML describes how Zang should handle a call or SMS message. An InboundXML document is made up of various XML elements nested in the response element. Every phone number registered with Zang points to a URL containing one of these InboundXML documents. Upon receiving a call or SMS, Zang follows the InboundXML instructions, enabling developers to easily build telephony apps with all the same function and power found in traditional phone systems. When a call or sms is initiated using the REST API, the URL of a InboundXML document is passed as a parameter to describe what will happen when the contacted party answers. [block:api-header] { "type": "basic", "title": "Implementing InboundXML" } [/block] Using InboundXML simplifies hosting a file containing InboundXML. Point the Voice or SMS URL's on one of your Zang number's to the file you created, and you're good to go. Call or text into that number and you'll see it in action! **Step 1:** Create an InboundXML document in the InboundXML Editor (Developers > InboundXML Editor) and save it: [block:code] { "codes": [ { "code": "<Response>\n <Say voice=\"woman\">Welcome to your new Zang account.</Say>\n <Say>Let us know if we can help you in any way during your development.</Say>\n</Response>", "language": "xml" } ] } [/block] **Step 2:** Proceed to _Dashboard > Manage Numbers_ and set the InboundXML Public URL as one of your Zang number's Voice Request URL. [block:image] { "images": [ { "image": [ "https://files.readme.io/1u4dc9PvTOOMOuIO2zc7_Screen%20Shot%202016-05-15%20at%206.07.44%20PM.png", "Screen Shot 2016-05-15 at 6.07.44 PM.png", "1924", "1208", "#de4d43", "" ] } ] } [/block] **Thats it!** You're ready to start receiving calls and SMS messages through Zang! If you are trying to initiate an outbound call or sms from your application, see [Getting Started with Zang](doc:getting-started).