sip_trunk.not_found
The workspace has no connected SIP trunk.
The workspace has no connected SIP trunk.
sip_trunk.not_found means the workspace has no SIP trunk connected. It is returned by GET, PUT and DELETE /v1/sip-trunk.
A workspace has one trunk and there is no trunk id. GET and DELETE fail with this error when no trunk has been connected, or after it was disconnected.
PUT creates the trunk when there is none, so it returns this error only when a DELETE /v1/sip-trunk ran at the same moment as the PUT.
Connect a trunk first:
await fetch("https://api.sautikit.com/v1/sip-trunk", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.SAUTIKIT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
label: "Head office trunk",
auth_mode: "registration",
proxy: "sip.example-carrier.com",
transport: "udp",
username: "sautikit_100",
password: process.env.CARRIER_SIP_PASSWORD,
}),
});If you expected a trunk to exist, GET /v1/sip-trunk shows what is connected. If the error came from a PUT, do not run DELETE and PUT on the trunk at the same time: send the PUT again.
{
"error": {
"code": "sip_trunk.not_found",
"message": "no SIP trunk is connected to this workspace",
"request_id": "req_01900000abc"
}
}numbers.byo_requires_trunk: the same state, seen when you add a number.