assets subdirectory "menus"
<context_name> (top sub directory)
menu.json (file containing json)
intro_statements (array of statements)
menu_entries (map)
key: statements, destination (as in lua dialplan)
statements (<context> subdirectory)
en
es
general (top subdirectory)
statements (general subdirectory)
en
es
function menuDriver
argument: context name
returns twiml
look up context
metric context name
play menu for context
sounds come from statements subdirectory for context or from general
repeat until notify and give up
gather keypress
on keypress:
#: up one menu
*: switch language to es
is menu destination a context name? recurse on context
is menu destination a function? call function which returns twiml
otherwise, replay menu
Notes:
There are IVR examples in twilio, look at those.
We need a dialtone destination also.
Changing menus (selection or up) requires that we add more twiml to an existing call, can we do that? Yes, with the call API (the monitor does that to hang up), but is there a less complicated way? The one thing we want to do is "forget current twiml and replace it with this one".
Notes:
There are IVR examples in twilio, look at those.
We need a dialtone destination also.
Changing menus (selection or up) requires that we add more twiml to an existing call, can we do that? Yes, with the call API (the monitor does that to hang up), but is there a less complicated way? The one thing we want to do is "forget current twiml and replace it with this one".