Create a SIP Endpoint
POSThttps://YOUR_SPACE.signalwire.com/api/relay/rest/endpoints/sip
To create a new SIP Endpoint, you send a POST
request to the SIP
Endpoint resource.
Permissions
The API token must include the following scopes: Voice.
Request
Responses
- 201
CREATED
Authorization: http
name: basic_authtype: httpscheme: basic
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://YOUR_SPACE.signalwire.com/api/relay/rest/endpoints/sip");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"username\": \"c3p0\",\n \"password\": \"yavinOrBust\",\n \"caller_id\": \"C-3P0\",\n \"send_as\": \"random\",\n \"ciphers\": [\n \"AEAD_AES_256_GCM_8\",\n \"AES_256_CM_HMAC_SHA1_80\",\n \"AES_CM_128_HMAC_SHA1_80\",\n \"AES_256_CM_HMAC_SHA1_32\",\n \"AES_CM_128_HMAC_SHA1_32\"\n ],\n \"codecs\": [\n \"OPUS\",\n \"G722\",\n \"PCMU\",\n \"PCMA\",\n \"VP8\",\n \"H264\"\n ],\n \"encryption\": \"required\",\n \"call_handler\": \"ai_agent\",\n \"call_request_url\": null,\n \"call_request_method\": \"POST\",\n \"call_fallback_url\": null,\n \"call_fallback_method\": \"POST\",\n \"call_status_callback_url\": null,\n \"call_status_callback_method\": \"POST\",\n \"call_laml_application_id\": \"\",\n \"call_relay_topic\": \"office\",\n \"call_relay_topic_status_callback_url\": \"https://myapplication/handle_relay_callbacks\",\n \"call_relay_context\": \"office\",\n \"call_relay_context_status_callback_url\": \"https://myapplication/handle_relay_callbacks\",\n \"call_video_room_id\": \"\",\n \"call_flow_id\": \"\",\n \"call_ai_agent_id\": \"\",\n \"call_relay_script_url\": \"https://dev.signalwire.com/relay-bins/f9d13f68-f71e-4042-95bb-b07b9e2f2f92\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear