Créer un trunk SIP
curl --request POST \
--url https://app.famulor.de/api/user/phone-numbers/sip-trunks \
--header 'Content-Type: application/json' \
--data '
{
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"nickname": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"allowed_inbound_ips": [
{}
],
"country_code": "<string>",
"outbound_proxy": true
}
'import requests
url = "https://app.famulor.de/api/user/phone-numbers/sip-trunks"
payload = {
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"nickname": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"allowed_inbound_ips": [{}],
"country_code": "<string>",
"outbound_proxy": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sip_trunk_type: '<string>',
phone_number: '<string>',
nickname: '<string>',
sip_username: '<string>',
sip_password: '<string>',
sip_address: '<string>',
sip_calling_format: '<string>',
inbound_authorization_type: '<string>',
allowed_inbound_ips: [{}],
country_code: '<string>',
outbound_proxy: true
})
};
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));<?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>',
'nickname' => '<string>',
'sip_username' => '<string>',
'sip_password' => '<string>',
'sip_address' => '<string>',
'sip_calling_format' => '<string>',
'inbound_authorization_type' => '<string>',
'allowed_inbound_ips' => [
[
]
],
'country_code' => '<string>',
'outbound_proxy' => true
]),
CURLOPT_HTTPHEADER => [
"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 \"nickname\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"allowed_inbound_ips\": [\n {}\n ],\n \"country_code\": \"<string>\",\n \"outbound_proxy\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/phone-numbers/sip-trunks")
.header("Content-Type", "application/json")
.body("{\n \"sip_trunk_type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"nickname\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"allowed_inbound_ips\": [\n {}\n ],\n \"country_code\": \"<string>\",\n \"outbound_proxy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/phone-numbers/sip-trunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sip_trunk_type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"nickname\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"allowed_inbound_ips\": [\n {}\n ],\n \"country_code\": \"<string>\",\n \"outbound_proxy\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "SIP trunk created successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Main",
"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."
}
Trunks SIP
Créer un trunk SIP
Crée un nouveau trunk SIP avec identifiants, adresse et paramètres de proxy
POST
/
api
/
user
/
phone-numbers
/
sip-trunks
Créer un trunk SIP
curl --request POST \
--url https://app.famulor.de/api/user/phone-numbers/sip-trunks \
--header 'Content-Type: application/json' \
--data '
{
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"nickname": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"allowed_inbound_ips": [
{}
],
"country_code": "<string>",
"outbound_proxy": true
}
'import requests
url = "https://app.famulor.de/api/user/phone-numbers/sip-trunks"
payload = {
"sip_trunk_type": "<string>",
"phone_number": "<string>",
"nickname": "<string>",
"sip_username": "<string>",
"sip_password": "<string>",
"sip_address": "<string>",
"sip_calling_format": "<string>",
"inbound_authorization_type": "<string>",
"allowed_inbound_ips": [{}],
"country_code": "<string>",
"outbound_proxy": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sip_trunk_type: '<string>',
phone_number: '<string>',
nickname: '<string>',
sip_username: '<string>',
sip_password: '<string>',
sip_address: '<string>',
sip_calling_format: '<string>',
inbound_authorization_type: '<string>',
allowed_inbound_ips: [{}],
country_code: '<string>',
outbound_proxy: true
})
};
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));<?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>',
'nickname' => '<string>',
'sip_username' => '<string>',
'sip_password' => '<string>',
'sip_address' => '<string>',
'sip_calling_format' => '<string>',
'inbound_authorization_type' => '<string>',
'allowed_inbound_ips' => [
[
]
],
'country_code' => '<string>',
'outbound_proxy' => true
]),
CURLOPT_HTTPHEADER => [
"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 \"nickname\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"allowed_inbound_ips\": [\n {}\n ],\n \"country_code\": \"<string>\",\n \"outbound_proxy\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/phone-numbers/sip-trunks")
.header("Content-Type", "application/json")
.body("{\n \"sip_trunk_type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"nickname\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"allowed_inbound_ips\": [\n {}\n ],\n \"country_code\": \"<string>\",\n \"outbound_proxy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/phone-numbers/sip-trunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sip_trunk_type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"nickname\": \"<string>\",\n \"sip_username\": \"<string>\",\n \"sip_password\": \"<string>\",\n \"sip_address\": \"<string>\",\n \"sip_calling_format\": \"<string>\",\n \"inbound_authorization_type\": \"<string>\",\n \"allowed_inbound_ips\": [\n {}\n ],\n \"country_code\": \"<string>\",\n \"outbound_proxy\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "SIP trunk created successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Main",
"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."
}
API Famulor 1.0 (héritée). Cette page concerne uniquement Famulor 1.0 (
app.famulor.de) et est conservée pour la compatibilité. Pour la plateforme actuelle, consultez la référence API Famulor 2.0.Paramètres du corps
string
requis
Le type de trunk SIP :
extension pour une extension SIP, ou number pour un numéro de téléphone (DID). Cela détermine le format attendu du champ phone_number.string
requis
L’extension SIP (1 à 15 caractères, par ex.
1000) lorsque sip_trunk_type vaut extension, ou un numéro de téléphone au format E.164 (par ex. +14155551234) lorsque sip_trunk_type vaut number.string
Une étiquette courte et conviviale pour le trunk (par ex. « Fournisseur X — Principal »). 50 caractères maximum.
string
requis
Nom d’utilisateur pour l’authentification SIP (3 à 128 caractères)
string
requis
Mot de passe pour l’authentification SIP (3 caractères minimum)
string
requis
L’adresse du serveur SIP sans le port (par ex.
sip.provider.com)string
requis
Le format du numéro appelant sortant :
+e164- International avec préfixe+(par ex.+12025550123)e164- International sans préfixe+(par ex.12025550123)national- Format national sans indicatif pays (par ex.0741926265)
string
requis
Comment les appels entrants sont authentifiés :
auth- Utilise le même nom d’utilisateur et mot de passe SIP configurés pour les appels sortantsip- Autorise des adresses IP spécifiques via liste blanche (nécessiteallowed_inbound_ips)
array
Tableau des adresses IP autorisées à envoyer des appels entrants. Requis lorsque
inbound_authorization_type vaut ip. Doit contenir au moins une adresse IP valide.string
requis
Code pays ISO 3166-2 où se situe le trunk SIP (par ex.
US, GB, DE). Lorsque sip_trunk_type vaut number, le pays est détecté automatiquement à partir du numéro de téléphone si possible.boolean
Achemine les appels sortants via une adresse IP fixe. Par défaut :
false. N’activez ceci que si votre fournisseur SIP exige une authentification basée sur l’IP pour le trafic sortant.Réponse
string
Message de succès
object
L’objet trunk SIP créé (mêmes champs que Récupérer un trunk SIP)
{
"message": "SIP trunk created successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Main",
"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."
}
Ce qui se passe après la création
Lorsque vous créez un trunk SIP, la plateforme effectue automatiquement les actions suivantes :- Provisionne un trunk entrant sur l’infrastructure vocale - en utilisant soit l’authentification par nom d’utilisateur/mot de passe, soit l’authentification basée sur l’IP selon votre paramètre
inbound_authorization_type - Provisionne un trunk sortant - en utilisant l’adresse SIP et les identifiants que vous avez fournis, éventuellement via le proxy sortant
500 est renvoyée.
Étapes suivantes
Après avoir créé un trunk SIP, assignez-le à un assistant IA :- Créer un assistant - Utilisez le paramètre
phone_number_id - Mettre à jour un assistant - Modifiez le numéro de téléphone d’un assistant existant