SIP Registration Status
Returns the live SIP registration status for a Telnyx endpoint: whether it is currently registered, when the current registration expires, and the last response Telnyx received from the registrar.
The endpoint supports three credential types, selected with the credential_type query parameter. Each type is keyed by a different identifier:
credential_type | Keyed by | Use case |
|---|---|---|
uac_external_credential | connection_id | A UAC (SIP attach) connection that registers to an external PBX. |
telephony_credential | username | An ephemeral, one-time-use telephony credential. |
sip_credential_connection | username | A traditional SIP credential connection that registers directly to Telnyx. |
The authenticated account is taken from your API key; you can only read the registration status of connections and credentials your account owns.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const sipRegistrationStatus = await client.sipRegistrationStatus.retrieve({
credential_type: 'uac_external_credential',
});
console.log(sipRegistrationStatus.connection_id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
sip_registration_status = client.sip_registration_status.retrieve(
credential_type="uac_external_credential",
)
print(sip_registration_status.connection_id)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
sipRegistrationStatus, err := client.SipRegistrationStatus.Get(context.TODO(), telnyx.SipRegistrationStatusGetParams{
CredentialType: telnyx.SipRegistrationStatusGetParamsCredentialTypeUacExternalCredential,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", sipRegistrationStatus.ConnectionID)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.sipregistrationstatus.SipRegistrationStatusRetrieveParams;
import com.telnyx.sdk.models.sipregistrationstatus.SipRegistrationStatusRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SipRegistrationStatusRetrieveParams params = SipRegistrationStatusRetrieveParams.builder()
.credentialType(SipRegistrationStatusRetrieveParams.CredentialType.UAC_EXTERNAL_CREDENTIAL)
.build();
SipRegistrationStatusRetrieveResponse sipRegistrationStatus = client.sipRegistrationStatus().retrieve(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
sip_registration_status = telnyx.sip_registration_status.retrieve(credential_type: :uac_external_credential)
puts(sip_registration_status)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$sipRegistrationStatus = $client->sipRegistrationStatus->retrieve(
credentialType: 'uac_external_credential',
connectionID: 'connection_id',
username: 'username',
);
var_dump($sipRegistrationStatus);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx sip-registration-status retrieve \
--api-key 'My API Key' \
--credential-type uac_external_credentialcurl --request GET \
--url https://api.telnyx.com/v2/sip_registration_status \
--header 'Authorization: Bearer <token>'{
"connection_id": "1234567890",
"connection_name": "FreePBX UAC 1002",
"credential_type": "uac_external_credential",
"credential_username": "useralice12345",
"registered": true,
"sip_registration_status": "registered",
"last_registration_response": "200 OK",
"sip_registration_details": {
"auth_retries": 0,
"expires": 1780404431,
"uptime": 1780401551699908,
"next_action_at": 1780414482,
"failures": 0,
"sip_uri_user_host": "[email protected]"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The kind of credential to look up. uac_external_credential is keyed by connection_id; telephony_credential and sip_credential_connection are keyed by username.
uac_external_credential, telephony_credential, sip_credential_connection Identifier of the UAC connection to look up. Required when credential_type is uac_external_credential.
SIP username to look up. Required when credential_type is telephony_credential or sip_credential_connection.
Response
Registration status payload
Identifier of the connection associated with the credential.
Human-readable connection name.
The credential type that was looked up.
uac_external_credential, telephony_credential, sip_credential_connection SIP username used for the registration.
True if the endpoint is currently registered.
Human-readable registration status derived from the registrar state.
unregistering, connection_disabled, standby, failed, trying, registered, unknown SIP response from the last registration attempt.
"200 OK"
Detailed registration information reported by the registrar. The populated fields depend on credential_type: UAC external credentials report auth_retries, uptime, next_action_at, failures, and sip_uri_user_host; telephony credentials and SIP credential connections report ua_ip, ua_port, transport, and last_modified. All types report expires, but its unit differs by credential_type — see that field.
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const sipRegistrationStatus = await client.sipRegistrationStatus.retrieve({
credential_type: 'uac_external_credential',
});
console.log(sipRegistrationStatus.connection_id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
sip_registration_status = client.sip_registration_status.retrieve(
credential_type="uac_external_credential",
)
print(sip_registration_status.connection_id)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
sipRegistrationStatus, err := client.SipRegistrationStatus.Get(context.TODO(), telnyx.SipRegistrationStatusGetParams{
CredentialType: telnyx.SipRegistrationStatusGetParamsCredentialTypeUacExternalCredential,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", sipRegistrationStatus.ConnectionID)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.sipregistrationstatus.SipRegistrationStatusRetrieveParams;
import com.telnyx.sdk.models.sipregistrationstatus.SipRegistrationStatusRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SipRegistrationStatusRetrieveParams params = SipRegistrationStatusRetrieveParams.builder()
.credentialType(SipRegistrationStatusRetrieveParams.CredentialType.UAC_EXTERNAL_CREDENTIAL)
.build();
SipRegistrationStatusRetrieveResponse sipRegistrationStatus = client.sipRegistrationStatus().retrieve(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
sip_registration_status = telnyx.sip_registration_status.retrieve(credential_type: :uac_external_credential)
puts(sip_registration_status)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$sipRegistrationStatus = $client->sipRegistrationStatus->retrieve(
credentialType: 'uac_external_credential',
connectionID: 'connection_id',
username: 'username',
);
var_dump($sipRegistrationStatus);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx sip-registration-status retrieve \
--api-key 'My API Key' \
--credential-type uac_external_credentialcurl --request GET \
--url https://api.telnyx.com/v2/sip_registration_status \
--header 'Authorization: Bearer <token>'{
"connection_id": "1234567890",
"connection_name": "FreePBX UAC 1002",
"credential_type": "uac_external_credential",
"credential_username": "useralice12345",
"registered": true,
"sip_registration_status": "registered",
"last_registration_response": "200 OK",
"sip_registration_details": {
"auth_retries": 0,
"expires": 1780404431,
"uptime": 1780401551699908,
"next_action_at": 1780414482,
"failures": 0,
"sip_uri_user_host": "[email protected]"
}
}