api:pbx:menurouter:get
Table of Contents
API : PBX : Menu Router Get
Introduction
A Menu Router is a dialplan object that routes calls based on the input of the caller. Also known as Interactive Voice Response (IVR).
Request
This request will return a single menu router item.
| URL | https://api.telecomx.dk/pbx/menurouter/MENU_ROUTER_ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Param | MENU_ROUTER_ID | Id of the menu router (24 hex-char string) |
| Query | expandGoto | [optional] True to expand goto id's into _id/type/number/name objects |
Query examples
https://api.telecomx.dk/pbx/menurouter/1234567890ABCDEF12345678 https://api.telecomx.dk/pbx/menurouter/1234567890ABCDEF12345678?expandGoto=true
Response
| JSON object | ||
|---|---|---|
| Property | Type | Description |
| _id | Id | Unique id of the menu router. |
| type | String | Always 'MENU_ROUTER'. |
| customer | Id | Id of customer the menu router belongs to. |
| name | String | Name/description of the menu router. |
| number | String | The phone number to dial to reach this menu router locally, null if it is not dial-able. |
| startAudio | Id | A sound item to playback when the menu router is entered, null if not used. |
| redirect | String | Number to redirect to when execution starts. Used to quickly circumvent the menu router item. |
| notes | String | Notes about the menu router item. |
| timeout | Number | Number of seconds to wait for the user to enter a selection, 1-30 seconds. |
| repeat | Number | Number of times to repeat on timeout before playing timeout audio and going to timeout goto. 0-10. |
| timeoutAudio | Id | Id of an audio item to play when timeout occurs. |
| invalidAudio | Id | id fo an audio item to play when the user makes an invalid choice. |
| timeoutGoto | Id | Id of a dialplan item to go to on timeout, and after the timeout message has been played. Null to go to the menu itself. |
| menu | Array | List of keys and the PbxDialplan item we goto when it is selected. |
| menu[].input | String | The input to press for the menu, 0123456789*# - max 20 digits. |
| menu[].goto | Id | Id of the PbxDialplans item to goto when the input is matched. |
| menu[].mode | String | Operating mode: ENABLED - Enabled DISABLED - Disabled CALL_VARIABLE - Enabled if the call variable is truthful (true, yes, y, 1) VARIABLE - Enabled if the variable is truthful (true, yes, y, 1) SWITCH - Enabled if the switch is on QUEUE_MEMBER - Enabled if extension is member of the queue |
| menu[].variableName | String | Name of call variable, variable or switch to check if menu[].mode requires it. |
| menu[].extension | Id | Id of extension that must be member of a queue if menu[].mode requires it. |
| menu[].queue | Id | Id of queue, that the extension must be member of if menu[].mode requires it. |
| menu[].audio | Id | Optional Id of PbxSounds item to playback when this menu item is enabled. |
Example
{ _id: '12345678901234567890ABCD', type: 'MENU_ROUTER', customer: '12345678901234567890BBCD', name: 'Main menu', number: '404', startAudio: null, redirect: null, notes: 'Primary menu during opening hours', timeout: 10, repeat: 2, timeoutAudio: '12345678901234567890AAAA', invalidAudio: '12345678901234567890BBBB', timeoutGoto: '12345678901234567890CCCC', menu: [ { input: '1', goto: '12345678901234567890DDDD', mode: 'ENABLED', audio: '12345678901234567890AB01', }, { input: '2', goto: '12345678901234567890EEEE', mode: 'SWITCH', variableName: 'AdamInTheOffice', audio: '12345678901234567890AB01', }, { input: '3', goto: '12345678901234567890FFFF', mode: 'SWITCH', variableName: 'AndrewInTheOffice', audio: '12345678901234567890AB01', } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in requestURI |
| 404 | not_found | Menu router not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/menurouter/get.txt · Last modified: 2021/01/30 12:46 by Per Møller