{"_id":"542ef4fd1161420800d8370c","project":"542dbe0ecb19820800c1f4d7","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"},"parentDoc":null,"category":{"_id":"54538e5608d1800800473d9a","project":"542dbe0ecb19820800c1f4d7","__v":0,"pages":["542ef4fd1161420800d8370c","544a9f7c4688c708001866a2","544ab18abb58010800710b86","543acbefe14e09080000a0ac","544c5f7236475e0e005014c7","543bd73c5e7c871600f190da","543bf3f25e7c871600f19170","544577290a8dbc1a00ff6a23"],"version":"542ecc0a6b0eb6080066ca77","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-31T13:27:50.899Z","from_sync":false,"order":2,"slug":"calls","title":"Calls"},"editedParams2":true,"user":"542dc547cb19820800c1f4f1","__v":22,"editedParams":true,"is_link":false,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-03T19:11:57.244Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":true,"examples":{"codes":[{"language":"curl","code":"curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSid}/Calls.json' -u '{AccountSid}:{AuthToken}' -d 'From=XXX-XXX-XXXX&To=XXX-XXX-XXXX&Url=http://zang.io/ivr/welcome/call'"}]},"method":"post","try":true,"results":{"codes":[{"code":"<?xml version=\"1.0\" ?>\n\t<Response>\n\t\t<Call>\n\t\t\t<DateUpdated>Wed, 13 Jul 2016 15:11:37 -0000</DateUpdated>\n\t\t\t<ParentCallSid></ParentCallSid>\n\t\t\t<Duration>0</Duration>\n\t\t\t<From>+15555555555</From>\n\t\t\t<To>+19999999999</To>\n\t\t\t<CallerIdBlocked>false</CallerIdBlocked>\n\t\t\t<AnsweredBy>nobody</AnsweredBy>\n\t\t\t<Sid>{CallSid}</Sid>\n\t\t\t<RecordingsCount></RecordingsCount>\n\t\t\t<Price>0.00</Price>\n\t\t\t<ApiVersion>v2</ApiVersion>\n\t\t\t<Status>queued</Status>\n\t\t\t<Direction>outbound-api</Direction>\n\t\t\t<StartTime>None</StartTime>\n\t\t\t<DateCreated>Wed, 13 Jul 2016 15:11:37 -0000</DateCreated>\n\t\t\t<SubresourceUris>\n\t\t\t\t<Notifications>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications</Notifications>\n\t\t\t\t<Recordings>/v2/Accounts/{AccountSid}/Calls/{CallSid}/Recordings</Recordings>\n\t\t\t</SubresourceUris>\n\t\t\t<ForwardedFrom></ForwardedFrom>\n\t\t\t<Uri>/v2/Accounts/{AccountSid}/Calls/{CallSid}</Uri>\n\t\t\t<AccountSid>{AccountSid}</AccountSid>\n\t\t\t<DurationBilled>0</DurationBilled>\n\t\t\t<EndTime>None</EndTime>\n\t\t\t<PhoneNumberSid></PhoneNumberSid>\n\t\t</Call>\n\t</Response>","language":"xml","name":"XML"},{"name":"JSON","language":"json","code":"{\n\t\"date_updated\": \"Wed, 13 Jul 2016 15:25:01 -0000\",\n\t\"parent_call_sid\": \"\",\n\t\"duration\": 0,\n\t\"from\": \"+15555555555\",\n\t\"to\": \"+19999999999\",\n\t\"caller_id_blocked\": \"false\",\n\t\"answered_by\": \"nobody\",\n\t\"sid\": \"{CallSid}\",\n\t\"recordings_count\": \"\",\n\t\"price\": \"0.00\",\n\t\"api_version\": \"v2\",\n\t\"status\": \"queued\",\n\t\"direction\": \"outbound-api\",\n\t\"start_time\": null,\n\t\"date_created\": \"Wed, 13 Jul 2016 15:25:01 -0000\",\n\t\"subresource_uris\": {\n\t\t\"notifications\": \"/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications\",\n\t\t\"recordings\": \"/v2/Accounts/{AccountSid}/Calls/{CallSid}/Recordings\"\n\t},\n\t\"forwarded_from\": \"\",\n\t\"uri\": \"/v2/Accounts/{AccountSid}/Calls/{CallSid}\",\n\t\"account_sid\": \"{AccountSid}\",\n\t\"duration_billed\": 0,\n\t\"end_time\": null,\n\t\"phone_number_sid\": \"\"\n}"},{"language":"text","code":"date_updated,parent_call_sid,duration,from,to,caller_id_blocked,answered_by,sid,recordings_count,price,api_version,status,direction,start_time,date_created,subresource_uris,forwarded_from,uri,account_sid,duration_billed,end_time,phone_number_sid\nWed, 13 Jul 2016 15:19:13 -0000,,,+15555555555,+19999999999,false,nobody,{CallSid},,0.00,v2,queued,outbound-api,,Wed, 13 Jul 2016 15:19:13 -0000,{'notifications': u'/v2/Accounts/{AccountSid}/Calls/{CallSid}/Notifications', 'recordings': u'/v2/Accounts/{AccountSid}/Calls/{CallSid}/Recordings'},,/v2/Accounts/{AccountSid}/Calls/{CallSid},{AccountSid},,,\n","name":"CSV"}]},"settings":"","auth":"optional","params":[{"_id":"54344b33edce04080040956a","ref":"","in":"body","required":true,"desc":"The phone number or SIP endpoint to call. Phone number should be in international format and one recipient per request. For e.g, to dial a number in the US, the To should be, +17325551212. SIP endpoints must be prefixed with sip: e.g sip:12345:::at:::sip.zang.io.","default":"","type":"string","name":"To"},{"_id":"54344b33edce040800409569","ref":"","in":"body","required":true,"desc":"The number to display as calling (i.e. Caller ID). The value does not have to be a real phone number or even in a valid format. For example, 8143 could be passed to the From parameter and would be displayed as the caller ID.  Spoofed calls carry an additional charge.","default":"","type":"string","name":"From"},{"_id":"54344b33edce040800409568","ref":"","in":"body","required":true,"desc":"The URL requested once the call connects. This URL must be valid and should return InboundXML containing instructions on how to process your call. A badly formatted URL will NOT fallback to the FallbackUrl but return an error without placing the call. URL length is limited to 200 characters.","default":"","type":"string","name":"Url"},{"_id":"5434c48a0ef9c008001654f0","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the URL once the call connects. Valid parameters are GET and POST - any other value will default to POST.","default":"POST","type":"string","name":"Method"},{"_id":"5434c48a0ef9c008001654ef","ref":"","in":"body","required":false,"desc":"URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL. Url length is limited to 200 characters.","default":"","type":"string","name":"FallbackUrl"},{"_id":"5434d670b7f6f01000b01d3f","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the FallbackUrl once the call connects. Valid parameters are GET and POST - any other value will default to POST.","default":"POST","type":"string","name":"FallbackMethod"},{"_id":"5434d670b7f6f01000b01d3e","ref":"","in":"body","required":false,"desc":"A URL that will be requested when the call connects and ends, sending information about the call. URL length is limited to 200 characters.","default":"","type":"string","name":"StatusCallback"},{"_id":"5434d670b7f6f01000b01d3d","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the StatusCallback URL. Valid parameters are GET and POST - any other value will default to POST.","default":"POST","type":"string","name":"StatusCallbackMethod"},{"_id":"5434d8f7d569490800800c07","ref":"","in":"body","required":false,"desc":"A URL that will be requested every 60 seconds during the call, sending information about the call. The HeartbeatUrl will NOT be requested unless at least 60 seconds of call time have elapsed. URL length is limited to 200 characters.","default":"","type":"string","name":"HeartbeatUrl"},{"_id":"5434d9dcb7f6f01000b01d6e","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the HeartbeatUrl. Valid parameters are GET and POST - any other value will default to POST.","default":"POST","type":"string","name":"HeartbeatMethod"},{"_id":"5434dbb6d569490800800c1b","ref":"","in":"body","required":false,"desc":"Specifies the Forwarding From number to pass to the carrier.","default":"","type":"string","name":"ForwardedFrom"},{"_id":"5434df96b7f6f01000b01dd3","ref":"","in":"body","required":false,"desc":"Dial digits or play tones using DTMF as soon as the call connects. Useful for navigating IVRs. Allowed values for digits are 0-9, #, \\*, W, or w (W and w are for .5 second pauses), for example 142##\\* (spaces are valid).  Tones follow the @1000 syntax, for example to play the tone 4 for two seconds, [email protected] (milliseconds) would be used.","default":"","type":"string","name":"PlayDtmf"},{"_id":"5434ece53513400800a14002","ref":"","in":"body","required":false,"desc":"Number of seconds call stays on line while waiting for an answer. The max time limit is 999.","default":"60","type":"string","name":"Timeout"},{"_id":"54353d4aadf50e0800b890f4","ref":"","in":"body","required":false,"desc":"Specifies if the Caller ID will be blocked. Allowed positive values are \"true\" and \"True\" - any other value will default to \"false\".","default":"false","type":"string","name":"HideCallerId"},{"_id":"54353e6a3513400800a145b8","ref":"","in":"body","required":false,"desc":"Specifies if this call should be recorded. Allowed positive values are \"true\", \"True\" and \"1\" - any other value will default to \"false\". Please note that no more than 5 recordings may be associated with a single call.","default":"false","type":"string","name":"Record"},{"_id":"543546a0adf50e0800b89195","ref":"","in":"body","required":false,"desc":"The URL some parameters regarding the recording will be passed to once it is completed. The longer the recording time, the longer the process delay in returning the recording information. If no RecordCallback is given, the recording will still be saved to the system and available either in your [Recording Logs](https://www.zang.io/logs/recordings/) or via a REST [List Recordings](http://docs.zang.io/docs/list-recordings) request. Url length is limited to 200 characters.","default":"","type":"string","name":"RecordCallback"},{"_id":"543546a0adf50e0800b89194","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the RecordCallback. Valid parameters are GET and POST - any other value will default to POST.","default":"POST","type":"string","name":"RecordCallbackMethod"},{"_id":"543549573513400800a1469f","ref":"","in":"body","required":false,"desc":"Specifies whether this call should be transcribed. Allowed positive values are \"true\", \"True\", and \"1\".","default":"false","type":"string","name":"Transcribe"},{"_id":"543549573513400800a1469e","ref":"","in":"body","required":false,"desc":"The URL some parameters regarding the transcription will be passed to once it is completed. The longer the recording time, the longer the process delay in returning the transcription information. If no TranscribeCallback is given, the recording will still be saved to the system and available either in your [Transcriptions Logs](https://www.zang.io/logs/transcriptions) or via a REST List Transcriptions (ADD URL LINK) request. Url length is limited to 200 characters.","default":"POST","type":"string","name":"TranscribeCallback"},{"_id":"54354ce03513400800a146d7","ref":"","in":"body","required":false,"desc":"Specifies whether this call should be sent straight to the user's voicemail. Allowed positive values are \"true\" and \"True\" - any other value will default to \"false\".","default":"false","type":"string","name":"StraightToVoicemail"},{"_id":"543574615ff8a51a006e41e9","ref":"","in":"body","required":false,"desc":"Specifies how Zang should handle this call if it goes to voicemail. Allowed values are \"continue\" to proceed as normal, \"redirect\" to redirect the call to the ifMachineUrl, or \"hangup\" to hang up the call. Hangup occurs when the tone is played. IfMachine accuracy is around 90% and may not work in all countries.","default":"continue","type":"string","name":"IfMachine"},{"_id":"543ac77748cf1f0800e11f10","ref":"","in":"body","required":false,"desc":"The URL Zang will redirect to for instructions if a voicemail machine is detected while the IfMachine parameter is set to \"redirect\". Url length is limited to 200 characters.","default":"","type":"string","name":"IfMachineUrl"},{"_id":"543ac81748cf1f0800e11f11","ref":"","in":"body","required":false,"desc":"The HTTP method used to request the IfMachineUrl. Valid parameters are GET and POST - any other value will default to POST.","default":"POST","type":"string","name":"IfMachineMethod"},{"_id":"54515d94a66f020800dbabe3","ref":"","in":"body","required":false,"desc":"Your authenticated SIP username, used only for SIP calls.","default":"","type":"string","name":"SipAuthUsername"},{"_id":"54515d94a66f020800dbabe2","ref":"","in":"body","required":false,"desc":"Your authenticated SIP password, used only for SIP calls.","default":"","type":"string","name":"SipAuthPassword"}],"url":"/v2/Accounts/{AccountSID}/Calls.json"},"isReference":false,"order":0,"body":"The ability to send and receive calls is a core Zang feature. There are a few different parameters that can be used to modify calls initiated through the REST API. The call start is defined by the connection and not by the dial. If the call does not connect, no charge is incurred.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"UTC\",\n  \"body\": \"All time values returned by Zang are UTC (Universal Time Coordinated)\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"FORMAT\",\n  \"body\": \"The To, From, and ForwardedFrom parameters are automatically formatted on our end. White space will be trimmed and invalid values like letters or symbols will be parsed out. This allows you to use any formatting you wish. For example:\\n\\n- XXX-XXX-XXXX \\n- X (XXX) XXX-XXXX\\n- XX X X XXXX X XX\"\n}\n[/block]\nBe careful not to set Timeout too low since there is delay between the dial and the recipient's ringing. For example, a 5 second Timeout will likely end the call before the recipient's phone has rung at all.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response Parameters\"\n}\n[/block]\nResponse parameters are equal to those on [\"View Call\" API call](/v2/docs/view-call).\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"If for any reason you hear \\\"An Error Has Occurred\\\" message playing to you while you are on the call that means that your InboundXML document contains issues. In order to resolve issues please visit \\\"Notifications\\\" located at Zang dashboard.\",\n  \"title\": \"An Error Has Occurred\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Making a SIP Call\"\n}\n[/block]\nZang offers full VoIP support, allowing you to make calls using SIP. The only difference between a SIP call and a regular one are the To, From, SipAuthUsername and SipAuthPassword parameters.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"To\"\n}\n[/block]\nIn a SIP call the To parameter is the SIP URI you are trying to connect to. This is a required parameter. It must be a valid SIP URI under 255 characters.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sip:[email protected]\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"From\"\n}\n[/block]\nThe From parameter can be set to the SIP URI you wish to show up in the From header of the SIP request.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Headers\"\n}\n[/block]\nYou can add headers to the To parameter by appending them to the SIP URI. Character length in the header must not exceed 1024.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sip:[email protected]?headerone=ya&headertwo=hoo\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Transport\"\n}\n[/block]\nYou can specify a transport protocol (only TCP or UDP). The default is UDP.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sip:[email protected]?;transport=tcp\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"SipAuthUsername\"\n}\n[/block]\nYour authenticated username.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"SipAuthPassword\"\n}\n[/block]\nYour authenticated password.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example cURL\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSid}/Calls.json' -u '{AccountSid}:{AuthToken}' -d 'From=Mark&To=sip:[email protected]&Url=http://zang.io/ivr/welcome/call'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"If you're using cURL on Windows, be sure to change those single quotes to double quotes!\"\n}\n[/block]","excerpt":"","slug":"make_call","type":"endpoint","title":"Make Call"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

To:
required
string
The phone number or SIP endpoint to call. Phone number should be in international format and one recipient per request. For e.g, to dial a number in the US, the To should be, +17325551212. SIP endpoints must be prefixed with sip: e.g sip:[email protected]
From:
required
string
The number to display as calling (i.e. Caller ID). The value does not have to be a real phone number or even in a valid format. For example, 8143 could be passed to the From parameter and would be displayed as the caller ID. Spoofed calls carry an additional charge.
Url:
required
string
The URL requested once the call connects. This URL must be valid and should return InboundXML containing instructions on how to process your call. A badly formatted URL will NOT fallback to the FallbackUrl but return an error without placing the call. URL length is limited to 200 characters.
Method:
stringPOST
The HTTP method used to request the URL once the call connects. Valid parameters are GET and POST - any other value will default to POST.
FallbackUrl:
string
URL used if the required URL is unavailable or if any errors occur during execution of the InboundXML returned by the required URL. Url length is limited to 200 characters.
FallbackMethod:
stringPOST
The HTTP method used to request the FallbackUrl once the call connects. Valid parameters are GET and POST - any other value will default to POST.
StatusCallback:
string
A URL that will be requested when the call connects and ends, sending information about the call. URL length is limited to 200 characters.
StatusCallbackMethod:
stringPOST
The HTTP method used to request the StatusCallback URL. Valid parameters are GET and POST - any other value will default to POST.
HeartbeatUrl:
string
A URL that will be requested every 60 seconds during the call, sending information about the call. The HeartbeatUrl will NOT be requested unless at least 60 seconds of call time have elapsed. URL length is limited to 200 characters.
HeartbeatMethod:
stringPOST
The HTTP method used to request the HeartbeatUrl. Valid parameters are GET and POST - any other value will default to POST.
ForwardedFrom:
string
Specifies the Forwarding From number to pass to the carrier.
PlayDtmf:
string
Dial digits or play tones using DTMF as soon as the call connects. Useful for navigating IVRs. Allowed values for digits are 0-9, #, \*, W, or w (W and w are for .5 second pauses), for example 142##\* (spaces are valid). Tones follow the @1000 syntax, for example to play the tone 4 for two seconds, [email protected] (milliseconds) would be used.
Timeout:
string60
Number of seconds call stays on line while waiting for an answer. The max time limit is 999.
HideCallerId:
stringfalse
Specifies if the Caller ID will be blocked. Allowed positive values are "true" and "True" - any other value will default to "false".
Record:
stringfalse
Specifies if this call should be recorded. Allowed positive values are "true", "True" and "1" - any other value will default to "false". Please note that no more than 5 recordings may be associated with a single call.
RecordCallback:
string
The URL some parameters regarding the recording will be passed to once it is completed. The longer the recording time, the longer the process delay in returning the recording information. If no RecordCallback is given, the recording will still be saved to the system and available either in your [Recording Logs](https://www.zang.io/logs/recordings/) or via a REST [List Recordings](http://docs.zang.io/docs/list-recordings) request. Url length is limited to 200 characters.
RecordCallbackMethod:
stringPOST
The HTTP method used to request the RecordCallback. Valid parameters are GET and POST - any other value will default to POST.
Transcribe:
stringfalse
Specifies whether this call should be transcribed. Allowed positive values are "true", "True", and "1".
TranscribeCallback:
stringPOST
The URL some parameters regarding the transcription will be passed to once it is completed. The longer the recording time, the longer the process delay in returning the transcription information. If no TranscribeCallback is given, the recording will still be saved to the system and available either in your [Transcriptions Logs](https://www.zang.io/logs/transcriptions) or via a REST List Transcriptions (ADD URL LINK) request. Url length is limited to 200 characters.
StraightToVoicemail:
stringfalse
Specifies whether this call should be sent straight to the user's voicemail. Allowed positive values are "true" and "True" - any other value will default to "false".
IfMachine:
stringcontinue
Specifies how Zang should handle this call if it goes to voicemail. Allowed values are "continue" to proceed as normal, "redirect" to redirect the call to the ifMachineUrl, or "hangup" to hang up the call. Hangup occurs when the tone is played. IfMachine accuracy is around 90% and may not work in all countries.
IfMachineUrl:
string
The URL Zang will redirect to for instructions if a voicemail machine is detected while the IfMachine parameter is set to "redirect". Url length is limited to 200 characters.
IfMachineMethod:
stringPOST
The HTTP method used to request the IfMachineUrl. Valid parameters are GET and POST - any other value will default to POST.
SipAuthUsername:
string
Your authenticated SIP username, used only for SIP calls.
SipAuthPassword:
string
Your authenticated SIP password, used only for SIP calls.

Examples


Result Format


Documentation

The ability to send and receive calls is a core Zang feature. There are a few different parameters that can be used to modify calls initiated through the REST API. The call start is defined by the connection and not by the dial. If the call does not connect, no charge is incurred. [block:callout] { "type": "info", "title": "UTC", "body": "All time values returned by Zang are UTC (Universal Time Coordinated)" } [/block] [block:callout] { "type": "info", "title": "FORMAT", "body": "The To, From, and ForwardedFrom parameters are automatically formatted on our end. White space will be trimmed and invalid values like letters or symbols will be parsed out. This allows you to use any formatting you wish. For example:\n\n- XXX-XXX-XXXX \n- X (XXX) XXX-XXXX\n- XX X X XXXX X XX" } [/block] Be careful not to set Timeout too low since there is delay between the dial and the recipient's ringing. For example, a 5 second Timeout will likely end the call before the recipient's phone has rung at all. [block:api-header] { "type": "basic", "title": "Response Parameters" } [/block] Response parameters are equal to those on ["View Call" API call](/v2/docs/view-call). [block:callout] { "type": "danger", "body": "If for any reason you hear \"An Error Has Occurred\" message playing to you while you are on the call that means that your InboundXML document contains issues. In order to resolve issues please visit \"Notifications\" located at Zang dashboard.", "title": "An Error Has Occurred" } [/block] [block:api-header] { "type": "basic", "title": "Making a SIP Call" } [/block] Zang offers full VoIP support, allowing you to make calls using SIP. The only difference between a SIP call and a regular one are the To, From, SipAuthUsername and SipAuthPassword parameters. [block:api-header] { "type": "basic", "title": "To" } [/block] In a SIP call the To parameter is the SIP URI you are trying to connect to. This is a required parameter. It must be a valid SIP URI under 255 characters. [block:code] { "codes": [ { "code": "sip:[email protected]", "language": "text" } ] } [/block] [block:api-header] { "type": "basic", "title": "From" } [/block] The From parameter can be set to the SIP URI you wish to show up in the From header of the SIP request. [block:api-header] { "type": "basic", "title": "Headers" } [/block] You can add headers to the To parameter by appending them to the SIP URI. Character length in the header must not exceed 1024. [block:code] { "codes": [ { "code": "sip:[email protected]?headerone=ya&headertwo=hoo", "language": "text" } ] } [/block] [block:api-header] { "type": "basic", "title": "Transport" } [/block] You can specify a transport protocol (only TCP or UDP). The default is UDP. [block:code] { "codes": [ { "code": "sip:[email protected]?;transport=tcp", "language": "text" } ] } [/block] [block:api-header] { "type": "basic", "title": "SipAuthUsername" } [/block] Your authenticated username. [block:api-header] { "type": "basic", "title": "SipAuthPassword" } [/block] Your authenticated password. [block:api-header] { "type": "basic", "title": "Example cURL" } [/block] [block:code] { "codes": [ { "code": "curl -X POST 'https://api.zang.io/v2/Accounts/{AccountSid}/Calls.json' -u '{AccountSid}:{AuthToken}' -d 'From=Mark&To=sip:[email protected]&Url=http://zang.io/ivr/welcome/call'", "language": "shell" } ] } [/block] [block:callout] { "type": "warning", "body": "If you're using cURL on Windows, be sure to change those single quotes to double quotes!" } [/block]