API Reference
Key Admin
Account

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

GET/domains/~/connections

Returns the connections on the account.

Read Key Admin switch: SIP trunks and connections, Read. Read only keys also work.

Parameters

NameInTypeNotes
device-sip-registration-uriquerystringFind a device by its registration address.
termination-matchquerystringOnly return connections with this termination match.
resellerquerystringLeave this out. Your key already decides what you can see.
route-chainquerystringOnly return connections in this route chain.
user-scopequerystringOnly 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)
FieldTypeNotes
connection-orig-match-patternstring
domainstringThe account the item belongs to. Max length 64
descriptionstringA note about the item.
connection-term-match-patternstring
connection-audio-relay-enabledstringTurns connection audio relay on or off (yes or no).
connection-addressstring
dial-planstringThe dial plan the item uses.
dial-policystringThe dial policy the item uses.
limits-max-active-calls-originteger
limits-max-active-calls-terminteger
limits-max-active-calls-totalinteger
connection-linked-billing-userstring
connection-sip-registration-usernamestring
connection-sip-registration-passwordstring
connection-sip-registration-realmstring
connection-orig-enabledstringTurns connection orig on or off (yes or no). One of: yes, no Default yes
connection-term-enabledstringTurns connection term on or off (yes or no). One of: yes, no Default yes
connection-translation-request-hoststring
connection-translation-destination-hoststring Default ''
connection-translation-request-userstring Default ''
connection-translation-destination-userstring Default ''
connection-translation-source-userstring Default ''
connection-source-ip-checking-enabledstringTurns connection source ip checking on or off (yes or no). One of: yes, no Default no
connection-include-server-header-enabledstringTurns connection include server header on or off (yes or no). One of: yes, no Default no
connection-relay-comfort-noise-enabledstringTurns connection relay comfort noise on or off (yes or no). Default system-default
connection-pcmu-only-enabledstringTurns connection pcmu only on or off (yes or no). One of: yes, no Default no
connection-enforce-minimum-duration-enabledstringTurns connection enforce minimum duration on or off (yes or no). One of: yes, no Default no
connection-bind-to-alternate-interface-enabledstringTurns connection bind to alternate interface on or off (yes or no). One of: yes, no Default no
connection-block-video-in-sdp-enabledstringTurns connection block video in sdp on or off (yes or no). One of: yes, no Default no
connection-sip-get-new-dialog-destination-fromstring Default default-ip
connection-sip-get-response-destination-fromstring Default default-ip
connection-require-encrypted-audio-enabledstringTurns connection require encrypted audio on or off (yes or no). Default no
connection-sip-transport-protocolstring Default UDP
connection-check-orig-matching-sip-headerstring Default from
connection-sip-session-timer-enabledstringTurns connection sip session timer on or off (yes or no). Default system-default
connection-prevent-rtp-port-change-enabledstringTurns connection prevent rtp port change on or off (yes or no). One of: yes, no Default no
connection-hide-post-dial-delay-with-ringback-enabledstringTurns connection hide post dial delay with ringback on or off (yes or no). One of: yes, no Default no
connection-remote-ringback-handlingstring Default allowed
connection-block-media-in-sip-180-ringingstring One of: yes, no Default no
connection-allow-mid-call-uri-updates-enabledstringTurns connection allow mid call uri updates on or off (yes or no). One of: yes, no Default no
connection-record-all-calls-enabledstringTurns connection record all calls on or off (yes or no). One of: yes, no Default no
connection-custom-p-asserted-id-formatstring
connection-require-sip-authentication-enabledstringTurns connection require sip authentication on or off (yes or no). One of: yes, no Default no
connection-translation-source-hoststring
utc-offsetstring
time-zonestringTime zone name, like America/New_York.
minimum-call-duration-secondsintegerMinimum call duration, in seconds. Default 0
connection-sip-registration-expires-datetimestringConnection sip registration expires (date and time).
connection-sip-authenticate-as-client-enabledstringTurns connection sip authenticate as client on or off (yes or no). One of: yes, no Default no
connection-is-carrier-trunkstring One of: yes, no Default no
call-routingstring
active-calls-max-last-monthinteger
active-calls-max-this-monthinteger
active-calls-orig-currentinteger
active-calls-orig-since-startupinteger
active-calls-term-currentinteger
active-calls-term-since-startupinteger
connection-sip-registration-datetimestringConnection sip registration (date and time).
last-modified-datetimestringLast modified (date and time).

Get a connection

GET/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

NameInTypeNotes
connection-id requiredpathstringThe 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)
FieldTypeNotes
connection-orig-match-patternstring
domainstringThe account the item belongs to. Max length 64
descriptionstringA note about the item.
connection-term-match-patternstring
connection-audio-relay-enabledstringTurns connection audio relay on or off (yes or no).
connection-addressstring
dial-planstringThe dial plan the item uses.
dial-policystringThe dial policy the item uses.
limits-max-active-calls-originteger
limits-max-active-calls-terminteger
limits-max-active-calls-totalinteger
connection-linked-billing-userstring
connection-sip-registration-usernamestring
connection-sip-registration-passwordstring
connection-sip-registration-realmstring
connection-orig-enabledstringTurns connection orig on or off (yes or no). One of: yes, no Default yes
connection-term-enabledstringTurns connection term on or off (yes or no). One of: yes, no Default yes
connection-translation-request-hoststring
connection-translation-destination-hoststring Default ''
connection-translation-request-userstring Default ''
connection-translation-destination-userstring Default ''
connection-translation-source-userstring Default ''
connection-source-ip-checking-enabledstringTurns connection source ip checking on or off (yes or no). One of: yes, no Default no
connection-include-server-header-enabledstringTurns connection include server header on or off (yes or no). One of: yes, no Default no
connection-relay-comfort-noise-enabledstringTurns connection relay comfort noise on or off (yes or no). Default system-default
connection-pcmu-only-enabledstringTurns connection pcmu only on or off (yes or no). One of: yes, no Default no
connection-enforce-minimum-duration-enabledstringTurns connection enforce minimum duration on or off (yes or no). One of: yes, no Default no
connection-bind-to-alternate-interface-enabledstringTurns connection bind to alternate interface on or off (yes or no). One of: yes, no Default no
connection-block-video-in-sdp-enabledstringTurns connection block video in sdp on or off (yes or no). One of: yes, no Default no
connection-sip-get-new-dialog-destination-fromstring Default default-ip
connection-sip-get-response-destination-fromstring Default default-ip
connection-require-encrypted-audio-enabledstringTurns connection require encrypted audio on or off (yes or no). Default no
connection-sip-transport-protocolstring Default UDP
connection-check-orig-matching-sip-headerstring Default from
connection-sip-session-timer-enabledstringTurns connection sip session timer on or off (yes or no). Default system-default
connection-prevent-rtp-port-change-enabledstringTurns connection prevent rtp port change on or off (yes or no). One of: yes, no Default no
connection-hide-post-dial-delay-with-ringback-enabledstringTurns connection hide post dial delay with ringback on or off (yes or no). One of: yes, no Default no
connection-remote-ringback-handlingstring Default allowed
connection-block-media-in-sip-180-ringingstring One of: yes, no Default no
connection-allow-mid-call-uri-updates-enabledstringTurns connection allow mid call uri updates on or off (yes or no). One of: yes, no Default no
connection-record-all-calls-enabledstringTurns connection record all calls on or off (yes or no). One of: yes, no Default no
connection-custom-p-asserted-id-formatstring
connection-require-sip-authentication-enabledstringTurns connection require sip authentication on or off (yes or no). One of: yes, no Default no
connection-translation-source-hoststring
utc-offsetstring
time-zonestringTime zone name, like America/New_York.
minimum-call-duration-secondsintegerMinimum call duration, in seconds. Default 0
connection-sip-registration-expires-datetimestringConnection sip registration expires (date and time).
connection-sip-authenticate-as-client-enabledstringTurns connection sip authenticate as client on or off (yes or no). One of: yes, no Default no
connection-is-carrier-trunkstring One of: yes, no Default no
call-routingstring
active-calls-max-last-monthinteger
active-calls-max-this-monthinteger
active-calls-orig-currentinteger
active-calls-orig-since-startupinteger
active-calls-term-currentinteger
active-calls-term-since-startupinteger
connection-sip-registration-datetimestringConnection sip registration (date and time).
last-modified-datetimestringLast modified (date and time).

Other responses: 400, 401, 404. See errors.

Update a connection

PUT/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

NameInTypeNotes
connection-orig-match-pattern requiredpathstringThe connection's origination match pattern, which identifies it.

Request body application/json

FieldTypeNotes
descriptionstringA note about the item.
connection-term-match-patternstring
connection-audio-relay-enabledstringTurns connection audio relay on or off (yes or no).
connection-addressstring
dial-planstringThe dial plan the item uses.
dial-policystringThe dial policy the item uses.
limits-max-active-calls-originteger
limits-max-active-calls-terminteger
limits-max-active-calls-totalinteger
connection-linked-billing-userstring
connection-sip-registration-usernamestring
connection-sip-registration-passwordstring
connection-sip-registration-realmstring
connection-orig-enabledstringTurns connection orig on or off (yes or no). One of: yes, no Default yes
connection-term-enabledstringTurns connection term on or off (yes or no). One of: yes, no Default yes
connection-translation-request-hoststring
connection-translation-destination-hoststring Default ''
connection-translation-request-userstring Default ''
connection-translation-destination-userstring Default ''
connection-translation-source-userstring Default ''
connection-source-ip-checking-enabledstringTurns connection source ip checking on or off (yes or no). One of: yes, no Default no
connection-include-server-header-enabledstringTurns connection include server header on or off (yes or no). One of: yes, no Default no
connection-relay-comfort-noise-enabledstringTurns connection relay comfort noise on or off (yes or no). Default system-default
connection-pcmu-only-enabledstringTurns connection pcmu only on or off (yes or no). One of: yes, no Default no
connection-enforce-minimum-duration-enabledstringTurns connection enforce minimum duration on or off (yes or no). One of: yes, no Default no
connection-bind-to-alternate-interface-enabledstringTurns connection bind to alternate interface on or off (yes or no). One of: yes, no Default no
connection-block-video-in-sdp-enabledstringTurns connection block video in sdp on or off (yes or no). One of: yes, no Default no
connection-sip-get-new-dialog-destination-fromstring Default default-ip
connection-sip-get-response-destination-fromstring Default default-ip
connection-require-encrypted-audio-enabledstringTurns connection require encrypted audio on or off (yes or no). Default no
connection-sip-transport-protocolstring Default UDP
connection-check-orig-matching-sip-headerstring Default from
connection-sip-session-timer-enabledstringTurns connection sip session timer on or off (yes or no). Default system-default
connection-prevent-rtp-port-change-enabledstringTurns connection prevent rtp port change on or off (yes or no). One of: yes, no Default no
connection-hide-post-dial-delay-with-ringback-enabledstringTurns connection hide post dial delay with ringback on or off (yes or no). One of: yes, no Default no
connection-remote-ringback-handlingstring Default allowed
connection-block-media-in-sip-180-ringingstring One of: yes, no Default no
connection-allow-mid-call-uri-updates-enabledstringTurns connection allow mid call uri updates on or off (yes or no). One of: yes, no Default no
connection-record-all-calls-enabledstringTurns connection record all calls on or off (yes or no). One of: yes, no Default no
connection-custom-p-asserted-id-formatstring
connection-require-sip-authentication-enabledstringTurns connection require sip authentication on or off (yes or no). One of: yes, no Default no
connection-translation-source-hoststring
utc-offsetstring
time-zonestringTime zone name, like America/New_York.
minimum-call-duration-secondsintegerMinimum call duration, in seconds. Default 0
connection-sip-registration-expires-datetimestringConnection sip registration expires (date and time).
connection-sip-authenticate-as-client-enabledstringTurns connection sip authenticate as client on or off (yes or no). One of: yes, no Default no
connection-is-carrier-trunkstring One of: yes, no Default no
call-routingstring
active-calls-max-last-monthinteger
active-calls-max-this-monthinteger
active-calls-orig-currentinteger
active-calls-orig-since-startupinteger
active-calls-term-currentinteger
active-calls-term-since-startupinteger
connection-sip-registration-datetimestringConnection sip registration (date and time).
last-modified-datetimestringLast 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

DELETE/domains/~/connections/{connection-id}

Removes a connection. This can't be undone.

Write Key Admin switch: SIP trunks and connections, Write.

Parameters

NameInTypeNotes
connection-id requiredpathstringThe 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)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Other responses: 400, 401, 404. See errors.