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.

Callflows

About Callflows

Callflows are the instructions Kazoo uses to process a call. A callflow includes a list of numbers or regex patterns used by Kazoo to determine what callflow is used when a call comes in for an account. The flow parameter defines the tree of actions, allowing branching (such as in the menu action) and chaining actions together. You can also branch to other callflows and execute its flow (useful to avoid recreating the same sub-flow structure).

Schema

Call flows describe steps to take in order to process a phone call. They are trees of information related to a phone call such as “answer, play file, record file” etc. that are logically grouped together and ordered.

KeyDescriptionTypeDefaultRequiredSupport Level
featurecode.namestring(1..128)false
featurecode.numberstring(1..30)false
featurecodeWhen the callflow is used as a featurecode this object tracks the intended match of the pattern and name of the featureobject()false
flags.[]string()falsesupported
flagsFlags set by external applicationsarray(string())falsesupported
flowA callflow node defines a module to execute, data to provide to that module, and zero or more children to branch to#/definitions/callflows.actionfalse
metaflowActions applied to a call outside of the normal callflow, initiated by the caller(s)#/definitions/metaflowsfalse
nameFriendly name of the callflowstring()false
numbers.[]string(1..36)false
numbersA list of static numbers that the callflow should execute forarray(string(1..36))[]false
patterns.[]string(1..)false
patternsA list of regular expressions that the callflow should execute for, with optional capture groupsarray(string(1..))[]false
ringback.earlyMedia ID for the early ringback mediastring()false
ringback.transferMedia ID for transfer ringback mediastring()false
ringbackRingback settings for early media and transfersobject()false

callflows.action

Call flows describe steps to take in order to process a phone call. They are trees of information related to a phone call such as “answer, play file, record file” etc. that are logically grouped together and ordered.

KeyDescriptionTypeDefaultRequiredSupport Level
children./.+/Call flows describe steps to take in order to process a phone call. They are trees of information related to a phone call such as “answer, play file, record file” etc. that are logically grouped together and ordered.#/definitions/callflows.actionfalse
childrenChildren callflowsobject()false
dataThe data/arguments of the callflow moduleobject(){}true
moduleThe name of the callflow module to execute at this nodestring(1..64)true

metaflow

A metaflow node defines a module to execute, data to provide to that module, and one or more children to branch to

KeyDescriptionTypeDefaultRequiredSupport Level
children./.+/A metaflow node defines a module to execute, data to provide to that module, and one or more children to branch to#/definitions/metaflowfalse
childrenChildren metaflowsobject()false
dataThe data/arguments of the metaflow moduleobject(){}false
moduleThe name of the metaflow module to execute at this nodestring(1..64)true

metaflows

Actions applied to a call outside of the normal callflow, initiated by the caller(s)

KeyDescriptionTypeDefaultRequiredSupport Level
binding_digitWhat DTMF will trigger the collection and analysis of the subsequent DTMF sequence`string(‘1’‘2’‘3’‘4’
digit_timeoutHow long to wait between DTMF presses before processing the collected sequence (milliseconds)integer()false
listen_onWhich leg(s) of the call to listen for DTMF`string(‘both’‘self’‘peer’)`
numbers./^[0-9]+$/A metaflow node defines a module to execute, data to provide to that module, and one or more children to branch to#/definitions/metaflowfalse
numbersA list of static numbers with their flowsobject()false
patterns./.+/A metaflow node defines a module to execute, data to provide to that module, and one or more children to branch to#/definitions/metaflowfalse
patternsA list of patterns with their flowsobject()false

Fetch

GET /v2/accounts/{ACCOUNT_ID}/callflows

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

Create a new callflow

PUT /v2/accounts/{ACCOUNT_ID}/callflows

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

Remove a callflow

DELETE /v2/accounts/{ACCOUNT_ID}/callflows/{CALLFLOW_ID}

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

Fetch a callflow’s details

GET /v2/accounts/{ACCOUNT_ID}/callflows/{CALLFLOW_ID}

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

Patch a callflow object

PATCH /v2/accounts/{ACCOUNT_ID}/callflows/{CALLFLOW_ID}

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

Change a callflow object

POST /v2/accounts/{ACCOUNT_ID}/callflows/{CALLFLOW_ID}

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

On this Page