User Tools

Site Tools


api:pbx:menurouter:list

API : PBX : Menu Router list

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 returns a list of all of the customers menu routers.

URL https://api.telecomx.dk/pbx/menurouter
Method GET
Access level VIEWER, MANAGE, OWNER if menu router items belongs to the customer, RESELLER if customer belongs to the reseller or ADMIN.
Query offset [optional] Index of the first item to return, default 0.
limit [optional] The number of items to return, default 50, min 1, max 1000.
filter [optional] Search query that will match against searchable fields.
customer [optional] Id of customer, defaults to own customer.
full [optional] True to include all settings.
expandGoto [optional] True to expand goto id's into _id/type/number/name objects. Also sets full=true.
sort [optional] Which property to sort result by: number (default), name, redirect.

Query examples

https://api.telecomx.dk/pbx/menurouter
https://api.telecomx.dk/pbx/menurouter?customer=123458789012457890ABCD
https://api.telecomx.dk/pbx/menurouter?customer=123458789012457890ABCD&limit=20&offset=100
https://api.telecomx.dk/pbx/menurouter?filter=donald
https://api.telecomx.dk/pbx/menurouter?customer=12345678901234567890ABCD&full=true
https://api.telecomx.dk/pbx/menurouter?customer=12345678901234567890ABCD&expandGoto=true

Response

JSON object
Property Type Description
offset Number Index of the first menu router item returned.
limit Number Number of menu router item to return. Note that the actual number of returned items may be lower.
total Number Number of menu router items that can be returned when offset and limit is not considered. This is to be used for paging through the data.
menuRouters Array List of menu router items, see definition below.
Menu router object (normal)
Property Type Description
_id Id Unique id of the menu router.
name String Name/description of the menu router.
number String The phone number to dial to reach this menu router, null if it is not dial-able.
redirect String Number to redirect to when execution starts. Used to quickly circumvent the menu router.
notes String Notes about the menu router.
menu Number Number of options in the menu router.
Menu router object (full=true)
Property Type Description
_id Id Unique id of the menu router.
type String Always 'MENU_ROUTER'.
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 - normal

{
  offset: 0,
  limit: 50,
  total: 25,
  menuRouters: [
    {
      _id: '12345678901234567890ABCD',
      name: 'Main menu',
      number: '404',
      redirect: null,
      notes: 'Primary menu during opening hours',
      menu: 3
    },
    {
      ...
    }
  ]

Example - full=true

{
  offset: 0,
  limit: 50,
  total: 25,
  menuRouters: [
    {
      _id: '12345678901234567890ABCD',
      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
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/menurouter/list.txt · Last modified: 2021/01/30 12:45 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki