SIP Accounts

Get SIP accounts

Result example:

{
    "sip_accounts": [
        {
            "id": "AAA111222333444",
            "name": "NAME",
            "auth_method": "password",
            "username": "USERNAME",
            "password": "PASSWORD",
            "channel_limit": 1,
            "caller_id_type": "set_by_caller",
            "active": true
        },
        {
            "id": "BBB111222333444",
            "name": "NAME",
            "auth_method": "ip",
            "ips": ["8.8.8.8/32"],
            "channel_limit": 1,
            "caller_id_type": "set_by_caller",
            "active": true
        }
    ]
}

Create SIP account

Example:

curl \
  -H 'Accept: application/vnd.commpeak.com; version=1,application/json' \
  -H 'Authorization: Token token="API_TOKEN"' \
  -X POST \
  -d "sip_account[name]=SIP_NAME" \
  -d "sip_account[auth_type]=password" \
  -d "sip_account[username]=USERNAME" \
  -d "sip_account[password]=PASSWORD" \
  -d "sip_account[channel_limit]=1" \
  -d "sip_account[caller_id_type]=fixed" \
  -d "sip_account[caller_id_value]=1122334455667788" \
  -d "sip_account[caller_id_name_value]=CallerIdString" \
  https://api.commpeak.com/sip_accounts

This will return 201 Created with the location of the new SIP account in the Location header along with the current JSON representation of the SIP account if the creation was a success.

Update SIP account

This will return 200 OK if the update was a success along with the current JSON representation of the sip account. Parameters are the same as with create SIP account end point.

Delete SIP account