Skip to navigation

update

View as MarkdownOpen in Claude

Replace a SIP endpoint resource. Uses PUT for full replacement.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the SIP endpoint.

Request

usernamestringOptional
The username of the Sip Endpoint
passwordstringOptional
A new password for the Sip Endpoint. Omit to keep the current password.
caller_idstringOptional
The caller ID that will showup when dialing from this Sip Endpoint
send_asstringOptional
The Sip username that will show up on the calle's side. Overrides the username.
cipherslist of enumsOptional
Ciphers that can be enabled for calls on this Sip Endpoint.
Allowed values:
codecslist of enumsOptional
Codecs that can be enabled for calls on this Sip Endpoint.
encryptionenumOptional
The set encryption type on the Sip Endpoint. Omit to keep the current setting.
Allowed values:
call_handlerenumOptional
Specify how the SIP endpoint will handle outbound calls. - **default**: The SIP endpoint will pull the outbound policy setting from the [SIP Profile Settings](https://my.signalwire.com?page=sip_profile/edit). This allows centralized management of outbound call behavior across multiple endpoints from a single configuration. - **passthrough**: The SIP endpoint will be allowed to dial PSTN numbers. This permits outbound calling to traditional phone numbers without restrictions. - **block-pstn**: The SIP endpoint will be blocked from dialing PSTN numbers. Use this to restrict the endpoint from initiating calls to the public telephone network. - **resource**: Outbound calls from this SIP endpoint will dial the specified resource and execute its instructions. Requires setting `calling_handler_resource_id` to a valid resource. This enables custom call handling workflows for outbound calls.
Allowed values:
calling_handler_resource_idstring or nullOptionalformat: "uuid"
The ID of the resource that handles outbound calls. Required when `call_handler` is `resource`.

Response

idstringRequiredformat: "uuid"
Unique ID of the SIP Endpoint.
project_idstringRequiredformat: "uuid"
Unique ID of the Project.
display_namestringRequired
Display name of the SIP Endpoint Fabric Resource
typeenumRequired
Type of the Fabric Resource
Allowed values:
created_atdatetimeRequired
Date and time when the resource was created.
updated_atdatetimeRequired
Date and time when the resource was updated.
sip_endpointobjectRequired
SIP Endpoint data.

Response Example

Response
{
"id": "993ed018-9e79-4e50-b97b-984bd5534095",
"project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
"display_name": "Conference Room Phone",
"type": "sip_endpoint",
"created_at": "2024-05-06T12:20:00Z",
"updated_at": "2024-05-06T12:20:00Z",
"sip_endpoint": {
"id": "993ed018-9e79-4e50-b97b-984bd5534095",
"username": "User",
"caller_id": "123456789",
"send_as": "Support",
"ciphers": [
"AEAD_AES_256_GCM_8",
"AES_256_CM_HMAC_SHA1_32"
],
"codecs": [
"G722",
"PCMA",
"PCMU",
"VP8"
],
"encryption": "default",
"call_handler": "default",
"calling_handler_resource_id": "993ed018-9e79-4e50-b97b-984bd5534095"
}
}

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
updated = client.fabric.sip_endpoints.update("endpoint-id", username="updated-user")
print(f"Updated: {updated['name']}")