sip_trunk.already_exists
This workspace already has a SIP trunk, so it cannot be connected again.
This workspace already has a SIP trunk, so it cannot be connected again.
sip_trunk.already_exists means POST /v1/sip-trunk was called on a workspace that already has a trunk. A workspace has one trunk.
POST connects a trunk and never replaces one. Replacing a working trunk would drop the calls in progress on it, and an approved ip_allowlist trunk would go back to pending_approval until it was reviewed again.
Nothing is saved when this error is returned. The existing trunk is untouched.
To change the trunk you already have, use PUT:
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,
}),
});To see what is connected, call GET /v1/sip-trunk.
To start over, for example when you move to a different carrier, disconnect the trunk first with DELETE /v1/sip-trunk. The numbers on it have to be released before that: see sip_trunk.in_use.
sip_trunk.not_found: no trunk is connected yet.sip_trunk.in_use: the trunk still has numbers on it.