getFollowmeAccountSettings - данный метод возвращает информацию о настройках переадресаций account'а.
Точка подключения: https://gapi.mtt.ru:6443/v1/api
Авторизация: Basic Auth
Метод: POST
Входные параметры
Name | Type | Description |
---|---|---|
sip_id* | string | Идентификатор account'а. |
* - обязательные поля
Выходные параметры
Name | Type | Description |
---|---|---|
sip_id | string | Идентификатор account'а. |
sequence | stringstring:range(Order,Random,Simultaneous) | Тип сортировки при обзвоне списка правил. |
caller_id | string | Отображаемый А-номер при переадресации |
followmeStructure | array | Mассив настроек follow_me |
Формат элементов followmeStructure
Name | Type | Description |
---|---|---|
timeout | integer | Величина таймаута |
redirect_number | string | Номер для переадресации |
name | string | Наименование follow_me записи |
follow_order | integer | Номер в очереди переадресации |
active | string:range(Y,N) | Флаг активно/неактивно |
Пример
JSON
{ "id": "1", "jsonrpc": "2.0", "method": "getFollowmeAccountSettings", "params": { "sip_id" : "74951348579" } }
Успешный ответ
JSON
{ "jsonrpc":"2.0", "id":"1", "result": { "sip_id":"74951348579", "sequence":"Order", "caller_id":"74951348579", "followmeStructure": [ { "redirect_number":"79163777604", "name":"79163777604", "active":"Y", "follow_order":"1", "timeout":"25" }, { "redirect_number":"79636793312", "name":"79636793312", "active":"Y", "follow_order":"2", "timeout":"15" } ] } }
Не успешный ответ
JSON
{ "jsonrpc":"2.0", "id":"1", "error": { "code":-32002, "message":"Permission denied", "data": [ { "code":"C_PERMISSION_DENIED", "attribute":"common\\models\\premedia\\api\\Account", "message":"You don't have access to this common\\models\\premedia\\api\\Account «».", "tpl":"You don't have access to this {attribute} «{value}».", "tplParams": { "value":"", "attribute":"common\\models\\premedia\\api\\Account" } } ] } } { "jsonrpc":"2.0", "id":45630, "error": { "code":-32602, "message":"Invalid params", "data": [ { "code":"V_VALUE_NOT_FOUND", "attribute":"sip_id", "message":"sip_id « 74951346313» not found.", "tpl":"{attribute} «{value}» not found.", "tplParams": { "attribute":"sip_id", "value":" 74951346313" } } ] } }