What is the simplest way to have a conditional branch based on a global variable in a dialplan? Actually using a global variable and xml is giving me mixed results. Do I need to use Lua or another scripting language? This is what I have, which doesn't give the results desired. The "speak" actions are merely debug placeholders. I know there are better ways to do conditional voice to text. <condition regex="any" field="${cond(${mode} == 'open' ? YES : NO)}" expression="^YES$"> <action application="speak" data="open"/> </condition> <condition regex="any" field="${cond(${mode} == 'tech only' ? YES : NO)}" expression="^YES$"> <action application="speak" data="teck only"/> </condition> <condition regex="any" field="${cond(${mode} == 'event' ? YES : NO)}" expression="^YES$"> <action application="speak" data="event"/> </condition>