Atlas Knowledge Base
Dashboard
SCAIP Test Receiver

SCAIP Test Receiver


The SCAIP test receiver answers SCAIP alarms with responses you choose, so an alarm unit or a sending system can be tested end to end against a real receiver. It listens for SCAIP over SIP, replies to each incoming alarm request with the response held for that alarm's status code, and records both sides of the exchange.

The receiver runs on the eval environment. Innovative supplies its address and your access credential.

Response templates

A template is one canned response, stored under the SCAIP status code it answers. When an alarm arrives, the receiver looks up the alarm's status code and replies with the values held for it.

Each status code resolves in one of three ways, reported as source in the reply:

  • override - a template created over this API. It takes precedence.
  • config - a template from the receiver's own configuration.
  • default - neither layer holds the code, so the receiver answers the alarm with zeros. Reading such a code returns 404; default appears as a source when a delete leaves the code with no template behind it.

A change takes effect on the next alarm, with no restart. Templates are shared by every running instance of the receiver, so one update reaches all of them.

Template fields

FieldTypeMeaning
statusNumberintegerThe status the receiver reports back for the alarm.
mediaReplyintegerHow the voice channel opens. 0 none, 1 two-way, 2 listen only, 3 speak only.
callHandlingReplyintegerHow the call back is placed. 61 calls the unit's programmed number, 62 calls the addresses in transferredNumbers.
transferredNumberslist of textThe addresses to call back when callHandlingReply is 62. Optional.

The three numbers must be zero or higher, and every entry in transferredNumbers must hold a value.

A status code may contain letters, digits and the marks -, _, = and dot.

Access

Every request carries a machine credential in an Authorization: Bearer header:

Authorization: Bearer <prefix>.<id>.<secret>

The credential must hold action 30001:0 to read (GET) or 30002:0 to change (PUT, DELETE). Call the routes from a script or tool on a trusted machine; never place the credential in a browser page. The routes are enabled per environment. Where the admin API is switched off, the paths do not exist.

Endpoints

MethodPathPurpose
GET/scaiptest/templatesEvery status code the receiver answers, with the source of each
GET/scaiptest/templates/{statusCode}The response held for one status code
PUT/scaiptest/templates/{statusCode}Create or replace the response for one status code
DELETE/scaiptest/templates/{statusCode}Drop your response for one status code

The same routes are described in the receiver's own API documentation, served at /api/docs.

Listing every response

curl -H "Authorization: Bearer <prefix>.<id>.<secret>" https://<receiver-address>/scaiptest/templates
{
  "templates": {
    "0009": {
      "statusNumber": 1,
      "mediaReply": 1,
      "callHandlingReply": 62,
      "transferredNumbers": ["sip:+4500000000@example.com"]
    },
    "0010": {
      "statusNumber": 1,
      "mediaReply": 0,
      "callHandlingReply": 61
    }
  },
  "sources": {
    "0009": "override",
    "0010": "config"
  }
}

templates is the effective set: the configured baseline with your own responses laid over it. When nothing is held at all, the reply is a 200 with an empty body object.

Reading one response

curl -H "Authorization: Bearer <prefix>.<id>.<secret>" https://<receiver-address>/scaiptest/templates/0009
{
  "statusCode": "0009",
  "template": {
    "statusNumber": 1,
    "mediaReply": 1,
    "callHandlingReply": 62,
    "transferredNumbers": ["sip:+4500000000@example.com"]
  },
  "source": "override"
}

Setting a response

curl -X PUT -H "Authorization: Bearer <prefix>.<id>.<secret>" -H "Content-Type: application/json" \
  -d '{"statusNumber":1,"mediaReply":2,"callHandlingReply":61}' \
  https://<receiver-address>/scaiptest/templates/0009

The reply carries the stored template with source set to override. The next alarm with status code 0009 is answered with it.

Removing a response

curl -X DELETE -H "Authorization: Bearer <prefix>.<id>.<secret>" https://<receiver-address>/scaiptest/templates/0009

Deleting removes your own response for that status code. The reply shows what the receiver answers with from then on - the configured baseline, or zeros where the configuration has no entry either. Only your own responses can be deleted, so a status code served from the configuration answers 404, as does a second delete of the same code.

Response codes

CodeMeaning
200The request succeeded. The body carries the template and its source.
400The request was refused. The status code contains characters outside the allowed set, the body is not a template, or a value failed validation. The body states the reason, and nothing is stored.
401The Authorization header is missing or the credential is wrong.
404No response is held for that status code.
500The receiver did not answer within 10 seconds.

Error bodies are plain text.

Seeing the traffic

Every alarm the receiver takes in and every response it sends back is recorded as SIP traffic and served through the partner log search, alongside the rest of the SIP traffic for your account. That surface uses its own credential, issued separately from the token above.



Was this helpful?