Esta é uma API para cadastro de dispositivos VoIP.
Esta API é autenticada usando OAuth2, ver documentação de autenticação
Somente usuários com a permissão de VoIPs habilitada podem ter acesso aos dispositivos VoIP. Os usuários sem essa permissão, possuem acesso normal às unidades e aos seus roteadores, porém não possuem acesso ao cadastro de dispositivos VoIP das unidades
site_id
/voips
API para listagem de dispositivos VoIP
GET /api/v1/cdm/sites/Az2fDNvAta9pSrr5en8Su/voips HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"total": 2,
"voips": [
{
"id": "AzHpFa2Zn6UtLS8kAtNPM",
"name": "VoIP01",
"description": "voip01",
"exten_prefix": "1",
"mac": "99:11:33:55:77:13",
"group_id": "AxUBdRob2tRLq9sPCfQFG",
"model_id": "Ave2GxpMDWx9JQ2hxvyS7",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"site_id": "Az2fDNvAta9pSrr5en8Su",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"accounts": [
{
"id": 1,
"exten_id": "AzHpFafAgjjzA5EREeyJc"
},
{
"id": 2,
"exten_id": "AzHpFaqzTXHnzhny631ER"
},
{
"id": 3,
"exten_id": "AzHpFb8VYTQT9gxRnLCXf"
},
{
"id": 4,
"exten_id": "AzHpFbTs6wxGHvARpsynp"
}
],
},
{
"id": "La9pFa2Zn6UtLS8kAtNPM",
"name": "VoIP03",
"description": "voip03",
"exten_prefix": "1",
"mac": "99:11:39:59:77:99",
"group_id": "AxUBdRob2tRLq9sPCfQFG",
"model_id": "Ave2GxpMDWx9JQ2hxvyS7",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"site_id": "Az2fDNvAta9pSrr5en8Su",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"accounts": [
{
"id": 1,
"exten_id": "PLapFafAgjjzA5EREeyJa"
},
{
"id": 2,
"exten_id": "PLapFaqzTXHnzhny631EA"
},
{
"id": 3,
"exten_id": "PLapFb8VYTQT9gxRnLCBf"
},
{
"id": 4,
"exten_id": "PLapFbTs6wxGHvARpsyep"
}
],
}
]
}
site_id
/voips/id
API para buscar um dispositivo VoIP
GET /api/v1/cdm/sites/Az2fDNvAta9pSrr5en8Su/voips/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "VoIP01",
"description": "voip01",
"exten_prefix": "1",
"mac": "99:11:33:55:77:13",
"group_id": "AxUBdRob2tRLq9sPCfQFG",
"model_id": "Ave2GxpMDWx9JQ2hxvyS7",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"site_id": "Az2fDNvAta9pSrr5en8Su",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"accounts": [
{
"id": 1,
"exten_id": "PLapFafAgjjzA5EREeyJa"
},
{
"id": 2,
"exten_id": "PLapFaqzTXHnzhny631EA"
},
{
"id": 3,
"exten_id": "PLapFb8VYTQT9gxRnLCBf"
},
{
"id": 4,
"exten_id": "PLapFbTs6wxGHvARpsyep"
}
]
}
site_id
/voips
API para criação de um dispositivo VoIP
POST /api/v1/cdm/sites/Az2fDNvAta9pSrr5en8Su/voips HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"name": "VoIP09",
"description": "voip09",
"mac": "01:02:03:04:05:09",
"exten_prefix": "123",
"group_id": "Az2wVuhoLr4zuuS7DQfjf",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"model_id": "AxBDK1CiaJoN6NzDidnGn",
"site_id": "Az2fDNvAta9pSrr5en8Su",
"server_id": "AxUBbTFhJA6cPZH56YQMG"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "VoIP09",
"description": "voip09",
"mac": "01:02:03:04:05:09",
"exten_prefix": "123",
"group_id": "Az2wVuhoLr4zuuS7DQfjf",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"model_id": "AxBDK1CiaJoN6NzDidnGn",
"site_id": "Az2fDNvAta9pSrr5en8Su",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"accounts": [
{
"id": 1,
"exten_id": "AzHpFafAgjjzA5EREeyJc"
},
{
"id": 2,
"exten_id": "AzHpFaqzTXHnzhny631ER"
},
{
"id": 3,
"exten_id": "AzHpFb8VYTQT9gxRnLCXf"
},
{
"id": 4,
"exten_id": "AzHpFbTs6wxGHvARpsynp"
}
]
}
site_id
/voips/id
API para atualização de um dispositivo VoIP
PUT /api/v1/cdm/sites/Az2fDNvAta9pSrr5en8Su/voips/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"name": "UpdateVoIP"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "UpdateVoIP",
"description": "voip09",
"mac": "01:02:03:04:05:09",
"exten_prefix": "123",
"group_id": "Az2wVuhoLr4zuuS7DQfjf",
"billing_group_id": "Az2yHHgVNpCYaEoFMSvxu",
"model_id": "AxBDK1CiaJoN6NzDidnGn",
"site_id": "Az2fDNvAta9pSrr5en8Su",
"server_id": "AxUBbTFhJA6cPZH56YQMG",
"accounts": [
{
"id": 1,
"exten_id": "AzHpFafAgjjzA5EREeyJc"
},
{
"id": 2,
"exten_id": "AzHpFaqzTXHnzhny631ER"
},
{
"id": 3,
"exten_id": "AzHpFb8VYTQT9gxRnLCXf"
},
{
"id": 4,
"exten_id": "AzHpFbTs6wxGHvARpsynp"
}
]
}
site_id
/voips/id
API para remoção de um dispositivo VoIP
DELETE /api/v1/cdm/sites/Az2fDNvAta9pSrr5en8Su/voips/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
As contas são criadas automaticamente quando o disposivito VoIP é criado. O número de contas criadas depende do modelo utilizado pelo dispositivo. A documentação das contas pode ser visualizada em Contas de Dispositivos VoIP