const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({defaultAgentId: '<string>'})
};
fetch('https://blackbox.dasha.ai/api/v1/sip-domains/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://blackbox.dasha.ai/api/v1/sip-domains/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultAgentId": "<string>"
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/sip-domains/{id}"
payload = { "defaultAgentId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orgId": "<string>",
"domain": "<string>",
"status": "PendingVerification",
"createdTime": "2023-11-07T05:31:56Z",
"lastUpdateTime": "2023-11-07T05:31:56Z",
"exampleSipUri": "<string>",
"dns": {
"verification": {
"type": "<string>",
"name": "<string>",
"value": "<string>",
"target": "<string>"
},
"routing": {
"type": "<string>",
"name": "<string>",
"value": "<string>",
"target": "<string>"
},
"sipTarget": "<string>"
},
"lastError": "<string>",
"verifiedTime": "2023-11-07T05:31:56Z",
"defaultAgentId": "<string>",
"defaultAgentName": "<string>",
"routingRecordsDetected": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Update inbound routing of a custom SIP domain
Sets the agent that answers every inbound call on the domain whose SIP user part is not a registered call id, so your PBX or carrier can send calls to sip:anything@your-domain and the agent picks up. Registered calls keep precedence. Pass null to stop routing such calls (they are rejected with SIP 404).
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({defaultAgentId: '<string>'})
};
fetch('https://blackbox.dasha.ai/api/v1/sip-domains/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://blackbox.dasha.ai/api/v1/sip-domains/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"defaultAgentId": "<string>"
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/sip-domains/{id}"
payload = { "defaultAgentId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orgId": "<string>",
"domain": "<string>",
"status": "PendingVerification",
"createdTime": "2023-11-07T05:31:56Z",
"lastUpdateTime": "2023-11-07T05:31:56Z",
"exampleSipUri": "<string>",
"dns": {
"verification": {
"type": "<string>",
"name": "<string>",
"value": "<string>",
"target": "<string>"
},
"routing": {
"type": "<string>",
"name": "<string>",
"value": "<string>",
"target": "<string>"
},
"sipTarget": "<string>"
},
"lastError": "<string>",
"verifiedTime": "2023-11-07T05:31:56Z",
"defaultAgentId": "<string>",
"defaultAgentName": "<string>",
"routingRecordsDetected": true
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Path Parameters
Domain identifier
Body
Routing settings
Inbound routing settings of a custom SIP domain.
Agent that answers every inbound call on the domain whose SIP user part is not a registered call id. Null rejects such calls. The agent must belong to your organization.
Response
Routing updated
Custom SIP domain with its verification state and the DNS records to publish.
Unique identifier of the domain record. Pass it as sipDomainId when registering a call.
Organization that owns the domain.
1Normalized hostname.
1PendingVerification until the TXT record is found and the platform registration succeeds; Active when usable; Failed when the platform refused the domain.
PendingVerification, Active, Failed Timestamp when the domain was added.
Timestamp of the last change.
Example of the SIP URI registered calls will get on this domain.
1DNS records to publish for verification and routing.
Show child attributes
Show child attributes
Reason for the last failed verification or registration attempt, if any.
When the domain became Active.
Agent that answers inbound calls on this domain whose SIP user part is not a registered call id. Null means such calls are rejected with SIP 404.
Display name of the default agent, when set.
Result of the last routing DNS check: true when the domain already resolves to the Dasha SIP host (CNAME or copied A records). Only set by the verify endpoint.
Was this page helpful?