connection_events channel, and each server writes it when the event arrives, so 202 means published, not applied.connection-orig-match-pattern is required. The domain comes from the path, and a domain in the body is ignored. connection-orig-match-pattern is the connection's key and must be unique across the platform, not only the domain: a value any connection already uses returns 409. connection-term-match-pattern defaults to it, and connection-translation-request-host and connection-translation-destination-host default to connection-address, as the API formats it for the connectivity type. connection-source-ip-checking-enabled and connection-include-server-header-enabled default to no. connection-connectivity-type defaults to header_ip_match and sets connection-sip-authenticate-as-client-enabled: yes for outbound_registration, no for every other type. A value you send that contradicts the type is overridden, and the response carries a Warning header and a warnings list. connection-sip-registration-password defaults to a random 8-character value.POST /domains/{domain}/routeprofiles. Sending call-routing here returns 404.synchronous=yes, in the body or the query string, to wait up to 2 seconds for the connection to be written. You then get 200 with the connection. If it is not written in time, you get the usual 202.connection-orig-match-pattern was deleted in the last 15 minutes, and the platform is set to block re-created connections, some servers can refuse the new one after the 202. Read it back, and repeat the create if it is missing.404.Authorization: Bearer ********************synchronous=yes once the connection is written: the connection.curl --location 'https://awqacore01.crexendocloud.com/ns-api/v2/domains//connections' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"connection-orig-match-pattern": "sip:*@192.0.2.10",
"description": "Carrier trunk 1",
"connection-address": "192.0.2.10",
"connection-connectivity-type": "header_ip_match",
"connection-usage-role": "vendor",
"dial-plan": "example.com",
"dial-policy": "Permit All",
"connection-source-ip-checking-enabled": "yes",
"connection-include-server-header-enabled": "yes"
}'{
"connection-id": "c2lwOipAMTkyLjAuMi4xMA",
"connection-orig-match-pattern": "sip:*@192.0.2.10",
"connection-term-match-pattern": "sip:*@192.0.2.10",
"domain": "example.com",
"description": "Carrier trunk 1",
"connection-usage-role": "vendor",
"connection-connectivity-type": "header_ip_match",
"connection-address": "192.0.2.10",
"connection-orig-enabled": "yes",
"connection-term-enabled": "yes",
"connection-audio-relay-enabled": "yes",
"connection-require-sip-authentication-enabled": "no",
"connection-sip-authenticate-as-client-enabled": "no",
"connection-linked-billing-user": "1001",
"dial-plan": "example.com",
"dial-policy": "Permit All",
"limits-max-active-calls-orig": 0,
"limits-max-active-calls-term": 0,
"limits-max-active-calls-total": 0,
"minimum-call-duration-seconds": 0,
"connection-translation-request-user": "[*]",
"connection-translation-request-host": "192.0.2.10",
"connection-translation-destination-user": "[*]",
"connection-translation-destination-host": "192.0.2.10",
"connection-translation-source-user": "[*]",
"connection-translation-source-host": "<AppIP>",
"time-zone": "America/Phoenix",
"connection-source-ip-checking-enabled": "yes",
"connection-include-server-header-enabled": "yes",
"connection-relay-comfort-noise-enabled": "system-default",
"connection-pcmu-only-enabled": "no",
"connection-enforce-minimum-duration-enabled": "no",
"connection-bind-to-alternate-interface-enabled": "no",
"connection-block-video-in-sdp-enabled": "no",
"connection-sip-get-new-dialog-destination-from": "default-ip",
"connection-sip-get-response-destination-from": "default-ip",
"connection-require-encrypted-audio-enabled": "no",
"connection-sip-transport-protocol": "UDP",
"connection-check-orig-matching-sip-header": "from",
"connection-sip-session-timer-enabled": "system-default",
"connection-prevent-rtp-port-change-enabled": "no",
"connection-hide-post-dial-delay-with-ringback-enabled": "no",
"connection-remote-ringback-handling": "allowed",
"connection-block-media-in-sip-180-ringing": "no",
"connection-allow-mid-call-uri-updates-enabled": "no",
"connection-record-all-calls-enabled": "no",
"active-calls-orig-current": 0,
"active-calls-term-current": 0,
"active-calls-orig-since-startup": 0,
"active-calls-term-since-startup": 0,
"active-calls-max-this-month": 0,
"active-calls-max-last-month": 0
}