SIP trunks and connections
Connections are SIP trunks and links to other phone systems.
In the Key Admin this is the SIP trunks and connections switch. Read lets a key call the GET endpoints below. Write lets it call the ones that change data.
List connections
/domains/~/connectionsReturns the connections on the account.
Read Key Admin switch: SIP trunks and connections, Read. Read only keys also work.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
device-sip-registration-uri | query | string | Find a device by its registration address. |
termination-match | query | string | Only return connections with this termination match. |
reseller | query | string | Leave this out. Your key already decides what you can see. |
route-chain | query | string | Only return connections in this route chain. |
user-scope | query | string | Only return subscriptions with this permission scope. |
Example request
curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/connections" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/connections", {
method: "GET",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://api.noodlevoice.com/ns-api/v2/domains/~/connections",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 200
[
{
"connection-orig-match-pattern": "string",
"domain": "string",
"description": "string",
"connection-term-match-pattern": "string",
"connection-audio-relay-enabled": "yes",
"connection-address": "string",
"dial-plan": "string",
"dial-policy": "string",
"...": "51 more fields"
}
]Response fields (59)
| Field | Type | Notes |
|---|---|---|
connection-orig-match-pattern | string | |
domain | string | The account the item belongs to. Max length 64 |
description | string | A note about the item. |
connection-term-match-pattern | string | |
connection-audio-relay-enabled | string | Turns connection audio relay on or off (yes or no). |
connection-address | string | |
dial-plan | string | The dial plan the item uses. |
dial-policy | string | The dial policy the item uses. |
limits-max-active-calls-orig | integer | |
limits-max-active-calls-term | integer | |
limits-max-active-calls-total | integer | |
connection-linked-billing-user | string | |
connection-sip-registration-username | string | |
connection-sip-registration-password | string | |
connection-sip-registration-realm | string | |
connection-orig-enabled | string | Turns connection orig on or off (yes or no). One of: yes, no Default yes |
connection-term-enabled | string | Turns connection term on or off (yes or no). One of: yes, no Default yes |
connection-translation-request-host | string | |
connection-translation-destination-host | string | Default '' |
connection-translation-request-user | string | Default '' |
connection-translation-destination-user | string | Default '' |
connection-translation-source-user | string | Default '' |
connection-source-ip-checking-enabled | string | Turns connection source ip checking on or off (yes or no). One of: yes, no Default no |
connection-include-server-header-enabled | string | Turns connection include server header on or off (yes or no). One of: yes, no Default no |
connection-relay-comfort-noise-enabled | string | Turns connection relay comfort noise on or off (yes or no). Default system-default |
connection-pcmu-only-enabled | string | Turns connection pcmu only on or off (yes or no). One of: yes, no Default no |
connection-enforce-minimum-duration-enabled | string | Turns connection enforce minimum duration on or off (yes or no). One of: yes, no Default no |
connection-bind-to-alternate-interface-enabled | string | Turns connection bind to alternate interface on or off (yes or no). One of: yes, no Default no |
connection-block-video-in-sdp-enabled | string | Turns connection block video in sdp on or off (yes or no). One of: yes, no Default no |
connection-sip-get-new-dialog-destination-from | string | Default default-ip |
connection-sip-get-response-destination-from | string | Default default-ip |
connection-require-encrypted-audio-enabled | string | Turns connection require encrypted audio on or off (yes or no). Default no |
connection-sip-transport-protocol | string | Default UDP |
connection-check-orig-matching-sip-header | string | Default from |
connection-sip-session-timer-enabled | string | Turns connection sip session timer on or off (yes or no). Default system-default |
connection-prevent-rtp-port-change-enabled | string | Turns connection prevent rtp port change on or off (yes or no). One of: yes, no Default no |
connection-hide-post-dial-delay-with-ringback-enabled | string | Turns connection hide post dial delay with ringback on or off (yes or no). One of: yes, no Default no |
connection-remote-ringback-handling | string | Default allowed |
connection-block-media-in-sip-180-ringing | string | One of: yes, no Default no |
connection-allow-mid-call-uri-updates-enabled | string | Turns connection allow mid call uri updates on or off (yes or no). One of: yes, no Default no |
connection-record-all-calls-enabled | string | Turns connection record all calls on or off (yes or no). One of: yes, no Default no |
connection-custom-p-asserted-id-format | string | |
connection-require-sip-authentication-enabled | string | Turns connection require sip authentication on or off (yes or no). One of: yes, no Default no |
connection-translation-source-host | string | |
utc-offset | string | |
time-zone | string | Time zone name, like America/New_York. |
minimum-call-duration-seconds | integer | Minimum call duration, in seconds. Default 0 |
connection-sip-registration-expires-datetime | string | Connection sip registration expires (date and time). |
connection-sip-authenticate-as-client-enabled | string | Turns connection sip authenticate as client on or off (yes or no). One of: yes, no Default no |
connection-is-carrier-trunk | string | One of: yes, no Default no |
call-routing | string | |
active-calls-max-last-month | integer | |
active-calls-max-this-month | integer | |
active-calls-orig-current | integer | |
active-calls-orig-since-startup | integer | |
active-calls-term-current | integer | |
active-calls-term-since-startup | integer | |
connection-sip-registration-datetime | string | Connection sip registration (date and time). |
last-modified-datetime | string | Last modified (date and time). |
Get a connection
/domains/~/connections/{connection-id}Returns one connection by its ID.
Read Key Admin switch: SIP trunks and connections, Read. Read only keys also work.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
connection-id required | path | string | The connection ID. |
Example request
curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{connection_id}" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{connection_id}", {
method: "GET",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{connection_id}",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 200
[
{
"connection-orig-match-pattern": "string",
"domain": "string",
"description": "string",
"connection-term-match-pattern": "string",
"connection-audio-relay-enabled": "yes",
"connection-address": "string",
"dial-plan": "string",
"dial-policy": "string",
"...": "51 more fields"
}
]Response fields (59)
| Field | Type | Notes |
|---|---|---|
connection-orig-match-pattern | string | |
domain | string | The account the item belongs to. Max length 64 |
description | string | A note about the item. |
connection-term-match-pattern | string | |
connection-audio-relay-enabled | string | Turns connection audio relay on or off (yes or no). |
connection-address | string | |
dial-plan | string | The dial plan the item uses. |
dial-policy | string | The dial policy the item uses. |
limits-max-active-calls-orig | integer | |
limits-max-active-calls-term | integer | |
limits-max-active-calls-total | integer | |
connection-linked-billing-user | string | |
connection-sip-registration-username | string | |
connection-sip-registration-password | string | |
connection-sip-registration-realm | string | |
connection-orig-enabled | string | Turns connection orig on or off (yes or no). One of: yes, no Default yes |
connection-term-enabled | string | Turns connection term on or off (yes or no). One of: yes, no Default yes |
connection-translation-request-host | string | |
connection-translation-destination-host | string | Default '' |
connection-translation-request-user | string | Default '' |
connection-translation-destination-user | string | Default '' |
connection-translation-source-user | string | Default '' |
connection-source-ip-checking-enabled | string | Turns connection source ip checking on or off (yes or no). One of: yes, no Default no |
connection-include-server-header-enabled | string | Turns connection include server header on or off (yes or no). One of: yes, no Default no |
connection-relay-comfort-noise-enabled | string | Turns connection relay comfort noise on or off (yes or no). Default system-default |
connection-pcmu-only-enabled | string | Turns connection pcmu only on or off (yes or no). One of: yes, no Default no |
connection-enforce-minimum-duration-enabled | string | Turns connection enforce minimum duration on or off (yes or no). One of: yes, no Default no |
connection-bind-to-alternate-interface-enabled | string | Turns connection bind to alternate interface on or off (yes or no). One of: yes, no Default no |
connection-block-video-in-sdp-enabled | string | Turns connection block video in sdp on or off (yes or no). One of: yes, no Default no |
connection-sip-get-new-dialog-destination-from | string | Default default-ip |
connection-sip-get-response-destination-from | string | Default default-ip |
connection-require-encrypted-audio-enabled | string | Turns connection require encrypted audio on or off (yes or no). Default no |
connection-sip-transport-protocol | string | Default UDP |
connection-check-orig-matching-sip-header | string | Default from |
connection-sip-session-timer-enabled | string | Turns connection sip session timer on or off (yes or no). Default system-default |
connection-prevent-rtp-port-change-enabled | string | Turns connection prevent rtp port change on or off (yes or no). One of: yes, no Default no |
connection-hide-post-dial-delay-with-ringback-enabled | string | Turns connection hide post dial delay with ringback on or off (yes or no). One of: yes, no Default no |
connection-remote-ringback-handling | string | Default allowed |
connection-block-media-in-sip-180-ringing | string | One of: yes, no Default no |
connection-allow-mid-call-uri-updates-enabled | string | Turns connection allow mid call uri updates on or off (yes or no). One of: yes, no Default no |
connection-record-all-calls-enabled | string | Turns connection record all calls on or off (yes or no). One of: yes, no Default no |
connection-custom-p-asserted-id-format | string | |
connection-require-sip-authentication-enabled | string | Turns connection require sip authentication on or off (yes or no). One of: yes, no Default no |
connection-translation-source-host | string | |
utc-offset | string | |
time-zone | string | Time zone name, like America/New_York. |
minimum-call-duration-seconds | integer | Minimum call duration, in seconds. Default 0 |
connection-sip-registration-expires-datetime | string | Connection sip registration expires (date and time). |
connection-sip-authenticate-as-client-enabled | string | Turns connection sip authenticate as client on or off (yes or no). One of: yes, no Default no |
connection-is-carrier-trunk | string | One of: yes, no Default no |
call-routing | string | |
active-calls-max-last-month | integer | |
active-calls-max-this-month | integer | |
active-calls-orig-current | integer | |
active-calls-orig-since-startup | integer | |
active-calls-term-current | integer | |
active-calls-term-since-startup | integer | |
connection-sip-registration-datetime | string | Connection sip registration (date and time). |
last-modified-datetime | string | Last modified (date and time). |
Other responses: 400, 401, 404. See errors.
Update a connection
/domains/~/connections/{connection-orig-match-pattern}Changes a SIP trunk or connection, found by its origination match pattern.
Write Key Admin switch: SIP trunks and connections, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
connection-orig-match-pattern required | path | string | The connection's origination match pattern, which identifies it. |
Request body application/json
| Field | Type | Notes |
|---|---|---|
description | string | A note about the item. |
connection-term-match-pattern | string | |
connection-audio-relay-enabled | string | Turns connection audio relay on or off (yes or no). |
connection-address | string | |
dial-plan | string | The dial plan the item uses. |
dial-policy | string | The dial policy the item uses. |
limits-max-active-calls-orig | integer | |
limits-max-active-calls-term | integer | |
limits-max-active-calls-total | integer | |
connection-linked-billing-user | string | |
connection-sip-registration-username | string | |
connection-sip-registration-password | string | |
connection-sip-registration-realm | string | |
connection-orig-enabled | string | Turns connection orig on or off (yes or no). One of: yes, no Default yes |
connection-term-enabled | string | Turns connection term on or off (yes or no). One of: yes, no Default yes |
connection-translation-request-host | string | |
connection-translation-destination-host | string | Default '' |
connection-translation-request-user | string | Default '' |
connection-translation-destination-user | string | Default '' |
connection-translation-source-user | string | Default '' |
connection-source-ip-checking-enabled | string | Turns connection source ip checking on or off (yes or no). One of: yes, no Default no |
connection-include-server-header-enabled | string | Turns connection include server header on or off (yes or no). One of: yes, no Default no |
connection-relay-comfort-noise-enabled | string | Turns connection relay comfort noise on or off (yes or no). Default system-default |
connection-pcmu-only-enabled | string | Turns connection pcmu only on or off (yes or no). One of: yes, no Default no |
connection-enforce-minimum-duration-enabled | string | Turns connection enforce minimum duration on or off (yes or no). One of: yes, no Default no |
connection-bind-to-alternate-interface-enabled | string | Turns connection bind to alternate interface on or off (yes or no). One of: yes, no Default no |
connection-block-video-in-sdp-enabled | string | Turns connection block video in sdp on or off (yes or no). One of: yes, no Default no |
connection-sip-get-new-dialog-destination-from | string | Default default-ip |
connection-sip-get-response-destination-from | string | Default default-ip |
connection-require-encrypted-audio-enabled | string | Turns connection require encrypted audio on or off (yes or no). Default no |
connection-sip-transport-protocol | string | Default UDP |
connection-check-orig-matching-sip-header | string | Default from |
connection-sip-session-timer-enabled | string | Turns connection sip session timer on or off (yes or no). Default system-default |
connection-prevent-rtp-port-change-enabled | string | Turns connection prevent rtp port change on or off (yes or no). One of: yes, no Default no |
connection-hide-post-dial-delay-with-ringback-enabled | string | Turns connection hide post dial delay with ringback on or off (yes or no). One of: yes, no Default no |
connection-remote-ringback-handling | string | Default allowed |
connection-block-media-in-sip-180-ringing | string | One of: yes, no Default no |
connection-allow-mid-call-uri-updates-enabled | string | Turns connection allow mid call uri updates on or off (yes or no). One of: yes, no Default no |
connection-record-all-calls-enabled | string | Turns connection record all calls on or off (yes or no). One of: yes, no Default no |
connection-custom-p-asserted-id-format | string | |
connection-require-sip-authentication-enabled | string | Turns connection require sip authentication on or off (yes or no). One of: yes, no Default no |
connection-translation-source-host | string | |
utc-offset | string | |
time-zone | string | Time zone name, like America/New_York. |
minimum-call-duration-seconds | integer | Minimum call duration, in seconds. Default 0 |
connection-sip-registration-expires-datetime | string | Connection sip registration expires (date and time). |
connection-sip-authenticate-as-client-enabled | string | Turns connection sip authenticate as client on or off (yes or no). One of: yes, no Default no |
connection-is-carrier-trunk | string | One of: yes, no Default no |
call-routing | string | |
active-calls-max-last-month | integer | |
active-calls-max-this-month | integer | |
active-calls-orig-current | integer | |
active-calls-orig-since-startup | integer | |
active-calls-term-current | integer | |
active-calls-term-since-startup | integer | |
connection-sip-registration-datetime | string | Connection sip registration (date and time). |
last-modified-datetime | string | Last modified (date and time). |
Example request
curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{match_pattern}" \
-H "Authorization: Bearer $NOODLEVOICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"connection-term-match-pattern": "string",
"connection-audio-relay-enabled": "yes",
"connection-address": "string",
"dial-plan": "string"
}'const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{match_pattern}", {
method: "PUT",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"description": "string",
"connection-term-match-pattern": "string",
"connection-audio-relay-enabled": "yes",
"connection-address": "string",
"dial-plan": "string"
}),
});
const data = await res.json();import os, requests
r = requests.put(
"https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{match_pattern}",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
json={
"description": "string",
"connection-term-match-pattern": "string",
"connection-audio-relay-enabled": "yes",
"connection-address": "string",
"dial-plan": "string"
},
)
print(r.status_code, r.json())Response 202
Returns a status code with a short JSON message.
Delete a connection
/domains/~/connections/{connection-id}Removes a connection. This can't be undone.
Write Key Admin switch: SIP trunks and connections, Write.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
connection-id required | path | string | The connection ID. |
Example request
curl -X DELETE "https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{connection_id}" \
-H "Authorization: Bearer $NOODLEVOICE_KEY"const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{connection_id}", {
method: "DELETE",
headers: {
Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
},
});
const data = await res.json();import os, requests
r = requests.delete(
"https://api.noodlevoice.com/ns-api/v2/domains/~/connections/{connection_id}",
headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())Response 202
{
"code": 1,
"message": "Hello from NoodleVoice"
}Response fields (2)
| Field | Type | Notes |
|---|---|---|
code | integer | HTTP status code. |
message | string | What happened, in words. |
Other responses: 400, 401, 404. See errors.