SIP-Accounts

Create a SIP account

Creates a SIP account, the same way as the SIP account form in the portal. Authentication is either password (username and password, optionally restricted by ip_acl and optionally with JWT signature authentication) or ip (the list of authorized auth_ips). Caller ID is managed only through Dynamic Caller ID rules: dynamic_caller_ids is a list of rules, each either an existing rule referenced by id, or a rule definition — an equal existing rule is reused, otherwise a new rule is created. At least one rule for all destinations (condition any) is required, and only rules with a verified Caller ID can be used. default_tech_prefix must be one of the account's tech prefixes and defaults to the first one. Returns 422 with errors when the account cannot be created, including when the account's SIP account limit is reached.

post/sip_accounts

Request

  • Base URL
    https://api.commpeak.com/portal
  • URL
    https://api.commpeak.com/portal/sip_accounts
  • Auth
    API key in header Authorization

Request body

Example request

{
  "sip_account": {
    "auth_ips": [
      "192.0.2.10"
    ],
    "auth_type": "ip",
    "channel_limit": 10,
    "dynamic_caller_ids": [
      {
        "id": 12
      },
      {
        "action": "fixed",
        "caller_id_number": "12125551234",
        "condition": "country",
        "prefix": "1"
      }
    ],
    "name": "demo"
  }
}

Response

Successful Response

Example response

{
  "sip_account": {
    "active": true,
    "auth_method": "password",
    "auto_nat_fix": true,
    "caller_id_fixing": false,
    "channel_limit": 3,
    "default_tech_prefix": "021001",
    "dynamic_caller_ids": [
      12
    ],
    "editable": true,
    "id": "2BZgTQS4X0qaUEHt4YF-oQ",
    "ip_acl": [
      "192.0.2.10"
    ],
    "jwt_enabled": false,
    "name": "demo",
    "out_of_balance_message": true,
    "username": "demo"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.