Skip to navigation
REST ClientSIP Profile

update

View as MarkdownOpen in Claude

Update the project SIP profile. Uses PUT for full replacement.

Request

domain_identifierstringOptional
String representing the domain_identifier portion of the profile. Must be unique across your project.
default_codecslist of stringsOptional
A list of codecs this profile will support. Currently supported values are: OPUS, G722, PCMU, PCMA, VP8, H264.
default_cipherslist of stringsOptional
A list of encryption ciphers this profile will support. Currently supported values are: AEAD_AES_256_GCM_8, AES_256_CM_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_32.
default_encryptionenumOptional
A string representing whether connections to an endpoint that uses this profile require encryption or if encryption is optional. Encryption will always be used if possible. Possible values are required or optional.
Allowed values:
default_outbound_policyenumOptional
How calls placed by a SIP endpoint whose `call_handler` is `default` are handled. `passthrough` connects the call to the dialed destination, including PSTN numbers, and `block-pstn` does the same but blocks calls to PSTN numbers. Omit it to keep the current value; `null` is rejected with `422`.
Allowed values:
default_send_asstring or nullOptional
The E.164 number SIP endpoints that use this profile send as their From number when dialing PSTN phone numbers. It must be a number purchased or verified in the project. Send `null` or an empty string to clear it so that a purchased or verified number from the project is chosen. The value `random`, which [Get SIP profile](/docs/apis/rest/sip-profile/retrieve-sip-profile) returns when no number is set, is not accepted here and returns `422`; to keep the current setting, omit the field.

Response

domainstringOptional
A string representation of the fully qualified domain name for this profile.
domain_identifierstringOptional
String representing the domain_identifier portion of the profile. Must be unique across your project.
default_codecslist of stringsOptional
A list of codecs this profile will support. Currently supported values are: OPUS, G722, PCMU, PCMA, VP8, H264.
default_cipherslist of stringsOptional
A list of encryption ciphers this profile will support. Currently supported values are: AEAD_AES_256_GCM_8, AES_256_CM_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_32.
default_encryptionenumOptional
A string representing whether connections to an endpoint that uses this profile require encryption or if encryption is optional. Encryption will always be used if possible. Possible values are required or optional.
Allowed values:
default_outbound_policyenumOptional
How calls placed by a SIP endpoint whose `call_handler` is `default` are handled. `passthrough` connects the call to the dialed destination, including PSTN numbers, and `block-pstn` does the same but blocks calls to PSTN numbers.
Allowed values:
default_send_asstringOptional
The E.164 number SIP endpoints that use this profile send as their From number when dialing PSTN phone numbers. Returns `random` when no number is set, meaning a purchased or verified number from the project is chosen. `random` is only a response value: to clear the number with [Update SIP profile](/docs/apis/rest/sip-profile/update-sip-profile), send `null` or an empty string.

Response Example

Response
{
"domain": "your-space-example.sip.signalwire.com",
"domain_identifier": "example",
"default_codecs": [
"string"
],
"default_ciphers": [
"string"
],
"default_encryption": "optional",
"default_outbound_policy": "passthrough",
"default_send_as": "+15551234567"
}

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
updated = client.sip_profile.update(username="my-sip-user")
print("Updated username:", updated.get("username"))