Obter tronco SIP
curl --request GET \
--url https://suasofia.online/api/user/phone-numbers/sip-trunks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://suasofia.online/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://suasofia.online/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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provedor X — Principal",
"sip_username": "myuser",
"sip_address": "sip.provedor.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"
}
}
{
"error": "Tronco SIP não encontrado."
}
SIP Trunks
Obter tronco SIP
Obter um único tronco SIP pelo ID
GET
/
user
/
phone-numbers
/
sip-trunks
/
{id}
Obter tronco SIP
curl --request GET \
--url https://suasofia.online/api/user/phone-numbers/sip-trunks/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://suasofia.online/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://suasofia.online/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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://suasofia.online/api/user/phone-numbers/sip-trunks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provedor X — Principal",
"sip_username": "myuser",
"sip_address": "sip.provedor.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"
}
}
{
"error": "Tronco SIP não encontrado."
}
Este endpoint retorna informações detalhadas sobre um tronco SIP específico, incluindo IDs de tronco internos úteis para depuração.
Parâmetros de Caminho
integer
required
O identificador único do tronco SIP
Resposta
object
O objeto do tronco SIP
Show Propriedades do tronco SIP
Show Propriedades do tronco SIP
integer
O identificador único do tronco SIP
string
A extensão SIP ou número de telefone (DID) no formato E.164
string
Um rótulo curto e amigável para o tronco (ou
null se não estiver definido)string
O nome de usuário usado para autenticação SIP
string
O endereço do servidor SIP
string
O formato do número de chamada de saída:
+e164, e164 ou nationalstring
O método de autorização de entrada:
auth ou iparray
Array de endereços IP autorizados (apenas quando
inbound_authorization_type é ip)boolean
Se as chamadas de saída usam um endereço IP de proxy fixo
string
O código do país ISO 3166-2
string
Identificador interno para o tronco de voz de entrada (útil para depuração)
string
Identificador interno para o tronco de voz de saída (útil para depuração)
string
Timestamp ISO 8601
string
Timestamp ISO 8601
{
"data": {
"id": 42,
"phone_number": "1000",
"nickname": "Provedor X — Principal",
"sip_username": "myuser",
"sip_address": "sip.provedor.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"
}
}
{
"error": "Tronco SIP não encontrado."
}

