SIP-Trunk erstellen
curl --request POST \
--url https://app.famulor.de/api/user/phone-numbers/sip-trunks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"country_code": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sip_trunk_type: '<string>',
phone_number: '<string>',
sip_username: '<string>',
sip_password: '<string>',
sip_address: '<string>',
sip_calling_format: '<string>',
inbound_authorization_type: '<string>',
country_code: '<string>'
})
};
fetch('https://app.famulor.de/api/user/phone-numbers/sip-trunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/phone-numbers/sip-trunks"
payload = {
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"country_code": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/phone-numbers/sip-trunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sip_trunk_type' => '<string>',
'phone_number' => '<string>',
'sip_username' => '<string>',
'sip_password' => '<string>',
'sip_address' => '<string>',
'sip_calling_format' => '<string>',
'inbound_authorization_type' => '<string>',
'country_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/phone-numbers/sip-trunks"
payload := strings.NewReader("{\n \"sip_trunk_type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"country_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "SIP trunk created successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Haupt",
"sip_username": "myuser",
"sip_address": "sip.provider.com",
"sip_calling_format": "+e164",
"inbound_authorization_type": "auth",
"allowed_inbound_ips": null,
"outbound_proxy": false,
"country_code": "US",
"inbound_trunk_id": "ST_xxxxxxxxxxxx",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T10:00:00.000000Z"
}
}
{
"message": "SIP trunk created successfully.",
"data": {
"id": 43,
"phone_number": "+14155551234",
"nickname": null,
"sip_username": "trunk_user",
"sip_address": "sip.provider.com",
"sip_calling_format": "e164",
"inbound_authorization_type": "ip",
"allowed_inbound_ips": ["203.0.113.10", "198.51.100.20"],
"outbound_proxy": true,
"country_code": "US",
"inbound_trunk_id": "ST_xxxxxxxxxxxx",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T10:00:00.000000Z"
}
}
{
"error": "A SIP trunk with the same phone number, username, and address already exists."
}
{
"message": "The given data was invalid.",
"errors": {
"sip_address": ["SIP server address is required."],
"sip_calling_format": ["SIP calling format must be one of: +e164, e164, national."]
}
}
{
"error": "Failed to create SIP trunk. Please try again or contact support."
}
SIP-Trunk erstellen
Neuen SIP-Trunk mit Zugangsdaten, Adresse und Proxy-Einstellungen erstellen
POST
/
api
/
user
/
phone-numbers
/
sip-trunks
SIP-Trunk erstellen
curl --request POST \
--url https://app.famulor.de/api/user/phone-numbers/sip-trunks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"country_code": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sip_trunk_type: '<string>',
phone_number: '<string>',
sip_username: '<string>',
sip_password: '<string>',
sip_address: '<string>',
sip_calling_format: '<string>',
inbound_authorization_type: '<string>',
country_code: '<string>'
})
};
fetch('https://app.famulor.de/api/user/phone-numbers/sip-trunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/phone-numbers/sip-trunks"
payload = {
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"country_code": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/phone-numbers/sip-trunks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sip_trunk_type' => '<string>',
'phone_number' => '<string>',
'sip_username' => '<string>',
'sip_password' => '<string>',
'sip_address' => '<string>',
'sip_calling_format' => '<string>',
'inbound_authorization_type' => '<string>',
'country_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/phone-numbers/sip-trunks"
payload := strings.NewReader("{\n \"sip_trunk_type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"country_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "SIP trunk created successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Haupt",
"sip_username": "myuser",
"sip_address": "sip.provider.com",
"sip_calling_format": "+e164",
"inbound_authorization_type": "auth",
"allowed_inbound_ips": null,
"outbound_proxy": false,
"country_code": "US",
"inbound_trunk_id": "ST_xxxxxxxxxxxx",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T10:00:00.000000Z"
}
}
{
"message": "SIP trunk created successfully.",
"data": {
"id": 43,
"phone_number": "+14155551234",
"nickname": null,
"sip_username": "trunk_user",
"sip_address": "sip.provider.com",
"sip_calling_format": "e164",
"inbound_authorization_type": "ip",
"allowed_inbound_ips": ["203.0.113.10", "198.51.100.20"],
"outbound_proxy": true,
"country_code": "US",
"inbound_trunk_id": "ST_xxxxxxxxxxxx",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T10:00:00.000000Z"
}
}
{
"error": "A SIP trunk with the same phone number, username, and address already exists."
}
{
"message": "The given data was invalid.",
"errors": {
"sip_address": ["SIP server address is required."],
"sip_calling_format": ["SIP calling format must be one of: +e164, e164, national."]
}
}
{
"error": "Failed to create SIP trunk. Please try again or contact support."
}
Dieser Endpunkt erstellt einen neuen SIP-Trunk. Die Plattform provisioniert automatisch Inbound- und Outbound-Trunks in der Voice-Infrastruktur anhand der übergebenen Daten.
Body-Parameter
string
erforderlich
Der Typ des SIP-Trunks:
extension für eine SIP-Erweiterung oder number für eine Telefonnummer (DID). Das bestimmt das erwartete Format für phone_number.string
erforderlich
SIP-Erweiterung (1-15 Zeichen, z. B.
1000) bei sip_trunk_type = extension oder Telefonnummer im E.164-Format (z. B. +14155551234) bei sip_trunk_type = number.string
Ein kurzes, menschenlesbares Label für den Trunk (z. B. „Provider X — Haupt“). Maximal 50 Zeichen.
string
erforderlich
Benutzername für SIP-Authentifizierung (3-128 Zeichen)
string
erforderlich
Passwort für SIP-Authentifizierung (mindestens 3 Zeichen)
string
erforderlich
SIP-Serveradresse ohne Port (z. B.
sip.provider.com)string
erforderlich
Das ausgehende Rufnummernformat:
+e164- International mit+-Präfix (z. B.+12025550123)e164- International ohne+-Präfix (z. B.12025550123)national- Nationales Format ohne Ländervorwahl (z. B.0741926265)
string
erforderlich
Authentifizierung für eingehende Anrufe:
auth- Verwendet denselben SIP-Benutzernamen und dasselbe Passwort wie Outboundip- Whitelistet bestimmte IP-Adressen (erfordertallowed_inbound_ips)
array
Array mit IP-Adressen, die eingehende Anrufe senden dürfen. Pflichtfeld, wenn
inbound_authorization_type auf ip steht. Muss mindestens eine gültige IP enthalten.string
erforderlich
ISO-3166-2-Ländercode, in dem sich der SIP-Trunk befindet (z. B.
US, GB, DE). Bei sip_trunk_type = number wird das Land nach Möglichkeit aus der Telefonnummer erkannt.boolean
Leitet ausgehende Anrufe über eine feste IP-Adresse. Standard:
false. Nur aktivieren, wenn dein SIP-Provider IP-basierte Authentifizierung für Outbound erfordert.Antwort
string
Erfolgsmeldung
object
Das erstellte SIP-Trunk-Objekt (gleiche Felder wie bei SIP-Trunk abrufen)
{
"message": "SIP trunk created successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Haupt",
"sip_username": "myuser",
"sip_address": "sip.provider.com",
"sip_calling_format": "+e164",
"inbound_authorization_type": "auth",
"allowed_inbound_ips": null,
"outbound_proxy": false,
"country_code": "US",
"inbound_trunk_id": "ST_xxxxxxxxxxxx",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T10:00:00.000000Z"
}
}
{
"message": "SIP trunk created successfully.",
"data": {
"id": 43,
"phone_number": "+14155551234",
"nickname": null,
"sip_username": "trunk_user",
"sip_address": "sip.provider.com",
"sip_calling_format": "e164",
"inbound_authorization_type": "ip",
"allowed_inbound_ips": ["203.0.113.10", "198.51.100.20"],
"outbound_proxy": true,
"country_code": "US",
"inbound_trunk_id": "ST_xxxxxxxxxxxx",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T10:00:00.000000Z"
}
}
{
"error": "A SIP trunk with the same phone number, username, and address already exists."
}
{
"message": "The given data was invalid.",
"errors": {
"sip_address": ["SIP server address is required."],
"sip_calling_format": ["SIP calling format must be one of: +e164, e164, national."]
}
}
{
"error": "Failed to create SIP trunk. Please try again or contact support."
}
Was nach der Erstellung passiert
Wenn du einen SIP-Trunk erstellst, passiert automatisch:- Provisionierung eines Inbound-Trunks in der Voice-Infrastruktur - je nach
inbound_authorization_typeper Benutzername/Passwort oder IP-Authentifizierung - Provisionierung eines Outbound-Trunks - mit der von dir angegebenen SIP-Adresse und den Zugangsdaten, optional über den Outbound-Proxy
500-Fehler zurückgegeben.
Nächste Schritte
Nach dem Erstellen kannst du den SIP-Trunk einem KI-Assistenten zuweisen:- Assistant erstellen - Parameter
phone_number_idverwenden - Assistant aktualisieren - Telefonnummer eines bestehenden Assistenten ändern