Mettre à jour un trunk SIP
curl --request PUT \
--url https://app.famulor.de/api/user/phone-numbers/sip-trunks/{id} \
--header 'Content-Type: application/json' \
--data '
{
"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/{id}"
payload = {
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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/{id}"
payload := strings.NewReader("{\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("PUT", 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.put("https://app.famulor.de/api/user/phone-numbers/sip-trunks/{id}")
.header("Content-Type", "application/json")
.body("{\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\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 updated successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Main",
"sip_username": "new_username",
"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_newtrunkid1",
"outbound_trunk_id": "ST_newtrunkid2",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T12:00:00.000000Z"
}
}
{
"message": "SIP trunk updated 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": "ip",
"allowed_inbound_ips": ["203.0.113.10"],
"outbound_proxy": false,
"country_code": "US",
"inbound_trunk_id": "ST_newtrunkid1",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T12:00:00.000000Z"
}
}
{
"error": "SIP trunk not found."
}
{
"message": "The given data was invalid.",
"errors": {
"allowed_inbound_ips": ["At least one allowed IP address is required when authorization type is \"ip\"."]
}
}
{
"error": "Failed to update SIP trunk. Please try again or contact support."
}
Trunks SIP
Mettre à jour un trunk SIP
Met à jour la configuration d’un trunk SIP existant dans Famulor via l’API. Modifiez les identifiants, les règles de routage et les numéros de téléphone assignés pour votre téléphonie vocale IA.
PUT
/
api
/
user
/
phone-numbers
/
sip-trunks
/
{id}
Mettre à jour un trunk SIP
curl --request PUT \
--url https://app.famulor.de/api/user/phone-numbers/sip-trunks/{id} \
--header 'Content-Type: application/json' \
--data '
{
"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/{id}"
payload = {
"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.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
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/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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/{id}"
payload := strings.NewReader("{\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("PUT", 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.put("https://app.famulor.de/api/user/phone-numbers/sip-trunks/{id}")
.header("Content-Type", "application/json")
.body("{\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\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 updated successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Main",
"sip_username": "new_username",
"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_newtrunkid1",
"outbound_trunk_id": "ST_newtrunkid2",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T12:00:00.000000Z"
}
}
{
"message": "SIP trunk updated 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": "ip",
"allowed_inbound_ips": ["203.0.113.10"],
"outbound_proxy": false,
"country_code": "US",
"inbound_trunk_id": "ST_newtrunkid1",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T12:00:00.000000Z"
}
}
{
"error": "SIP trunk not found."
}
{
"message": "The given data was invalid.",
"errors": {
"allowed_inbound_ips": ["At least one allowed IP address is required when authorization type is \"ip\"."]
}
}
{
"error": "Failed to update 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 de chemin
integer
requis
L’identifiant unique du trunk SIP à mettre à jour
Paramètres du corps
Tous les champs sont optionnels. N’envoyez que les champs que vous souhaitez mettre à jour.string
L’extension SIP ou le numéro de téléphone (1 à 15 caractères)
string
Une étiquette courte et conviviale pour le trunk. 50 caractères maximum. Envoyez
null pour l’effacer.string
Nom d’utilisateur pour l’authentification SIP (3 à 128 caractères)
string
Mot de passe pour l’authentification SIP (3 caractères minimum)
string
L’adresse du serveur SIP sans le port
string
Le format du numéro appelant sortant :
+e164, e164 ou nationalstring
Comment les appels entrants sont authentifiés :
auth ou ip. Lors du passage à ip, vous devez également fournir allowed_inbound_ips. Lors du passage à auth, toute liste blanche d’IP existante est effacée.array
Tableau des adresses IP autorisées pour les appels entrants. Requis lorsque
inbound_authorization_type est défini sur ip.string
Code pays ISO 3166-2
boolean
Achemine les appels sortants via une adresse IP fixe
Réponse
string
Message de succès
object
L’objet trunk SIP mis à jour (mêmes champs que Récupérer un trunk SIP)
{
"message": "SIP trunk updated successfully.",
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provider X — Main",
"sip_username": "new_username",
"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_newtrunkid1",
"outbound_trunk_id": "ST_newtrunkid2",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T12:00:00.000000Z"
}
}
{
"message": "SIP trunk updated 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": "ip",
"allowed_inbound_ips": ["203.0.113.10"],
"outbound_proxy": false,
"country_code": "US",
"inbound_trunk_id": "ST_newtrunkid1",
"outbound_trunk_id": "ST_yyyyyyyyyyyy",
"created_at": "2026-03-31T10:00:00.000000Z",
"updated_at": "2026-03-31T12:00:00.000000Z"
}
}
{
"error": "SIP trunk not found."
}
{
"message": "The given data was invalid.",
"errors": {
"allowed_inbound_ips": ["At least one allowed IP address is required when authorization type is \"ip\"."]
}
}
{
"error": "Failed to update SIP trunk. Please try again or contact support."
}
Comportement de re-provisionnement
Les modifications des champs suivants déclenchent un re-provisionnement automatique des trunks d’infrastructure vocale :| Champ modifié | Trunk entrant | Trunk sortant |
|---|---|---|
sip_username | Recréé | Recréé |
sip_password | Recréé | Recréé |
sip_address | - | Recréé |
phone_number | Recréé | Recréé |
inbound_authorization_type | Recréé | - |
allowed_inbound_ips | Recréé | - |
outbound_proxy | - | Recréé |
sip_calling_format et country_code sont stockés localement et ne déclenchent pas de re-provisionnement.⌘I