Webhook ingress
Carrier inbound-call webhook (media stream)
Verified with the carrier’s request signature, keyed by the account that holds the dialled number; an unbound number is refused. Answers with call-control markup that connects the call’s audio to the media-stream route, or declines the call when the deployment or the workspace is at capacity. Off unless the deployment enables it.
POST
/
v1
/
webhooks
/
telephony
/
voice
Carrier inbound-call webhook (media stream)
curl --request POST \
--url https://api.sempera.org/v1/webhooks/telephony/voice \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'X-Twilio-Signature: <api-key>' \
--data 'To=<string>' \
--data 'CallSid=<string>' \
--data Direction=inboundimport requests
url = "https://api.sempera.org/v1/webhooks/telephony/voice"
payload = {
"To": "<string>",
"CallSid": "<string>",
"Direction": "inbound"
}
headers = {
"X-Twilio-Signature": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Twilio-Signature': '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({To: '<string>', CallSid: '<string>', Direction: 'inbound'})
};
fetch('https://api.sempera.org/v1/webhooks/telephony/voice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<string>{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}Authorizations
Carrier signature over the public request URL and form fields.
Body
application/x-www-form-urlencoded
Response
Call-control markup
The response is of type string.
⌘I
Carrier inbound-call webhook (media stream)
curl --request POST \
--url https://api.sempera.org/v1/webhooks/telephony/voice \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'X-Twilio-Signature: <api-key>' \
--data 'To=<string>' \
--data 'CallSid=<string>' \
--data Direction=inboundimport requests
url = "https://api.sempera.org/v1/webhooks/telephony/voice"
payload = {
"To": "<string>",
"CallSid": "<string>",
"Direction": "inbound"
}
headers = {
"X-Twilio-Signature": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Twilio-Signature': '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({To: '<string>', CallSid: '<string>', Direction: 'inbound'})
};
fetch('https://api.sempera.org/v1/webhooks/telephony/voice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<string>{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}{
"error": {
"code": "AGENT_ENV_UNPINNED",
"message": "<string>",
"request_id": "<string>",
"field": "<string>",
"scope": "<string>",
"reason": "<string>"
}
}