This document is for an older version of Kazoo (version 4.3) that is no longer supported. You should upgrade and read the current documentation.

Menus

Menus, IVRs, what ever you call them, allow you to create branches in the callflow based on the caller’s input.

About Menus

The DTMF entered is matched against the “children” keys and that branch is taken.

Additionally, you can branch based on a timeout (no DTMF entered) by using “timeout” in the “children” keys”:

{
    "module":"menu",
    "data": {...},
    "children": {
        "1": {"module":"...",...},
        "2": {"module":"...",...},
        "timeout": {"module":"...",...}
    }
}

If no timeout child is specified, the menu is retried (until retries are exceeded).

Schema

Schema for a menus

KeyDescriptionTypeDefaultRequiredSupport Level
allow_record_from_offnetDetermines if the record pin can be used by external callsboolean()falsefalsesupported
flags.[]string()falsesupported
flagsFlags set by external applicationsarray(string())falsesupported
huntDetermines if the callers can dial internal extensions directlyboolean()truefalsesupported
hunt_allowA regular expression that an extension the caller dialed must match to be allowed to continuestring(1..256)falsesupported
hunt_denyA regular expression that if matched does not allow the caller to dial directlystring(1..256)falsesupported
interdigit_timeoutThe amount of time (in milliseconds) to wait for the caller to press the next digit after pressing a digitinteger()falsesupported
max_extension_lengthThe maximum number of digits that can be collectedinteger()4falsesupported
media.exit_mediaWhen a call is transferred from the menu after all retries exhausted this media can be played (prior to transfer if enabled)`boolean()string(3..2048)`false
media.greetingThe ID of a media object that should be used as the menu greetingstring(3..2048)falsesupported
media.invalid_mediaWhen the collected digits don’t result in a match or hunt this media can be played`boolean()string(3..2048)`false
media.transfer_mediaWhen a call is transferred from the menu, either after all retries exhausted or a successful hunt, this media can be played`boolean()string(3..2048)`false
mediaThe media (prompt) parametersobject(){}falsesupported
nameA friendly name for the menustring(1..128)truesupported
record_pinThe pin number used to record the menu promptstring(3..6)falsesupported
retriesThe number of times a menu should be played until a valid entry is collectedinteger()3falsesupported
suppress_mediaDetermines if the playing of ‘Invalid Entry’ is suppressed.boolean()falsefalsesupported
timeoutThe amount of time (in milliseconds) to wait for the caller to begin entering digitsinteger()falsesupported

Fetch

GET /v2/accounts/{ACCOUNT_ID}/menus

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/menus

Create

PUT /v2/accounts/{ACCOUNT_ID}/menus

curl -v -X PUT \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/menus

Fetch

GET /v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

Change

POST /v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

curl -v -X POST \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

Patch

PATCH /v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

curl -v -X PATCH \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

Remove

DELETE /v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

curl -v -X DELETE \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/menus/{MENU_ID}

On this Page