Skip to main content

Multiple PBX commands in IVR menu

Posted by gb_delti on Tue, 01/13/2009

Hello,

is there a way to execute multiple PBX commands in an IVR menu? For example, setting a variable and then jumping to another context. I tried comma and semicolon as separators for individual commands but that didn't work.


Submitted by gb_delti on Tue, 01/13/2009 Permalink

I want to set different values for the variable depending on the number that was pressed. With your solution, I would have to create many contexts (feature extensions). If I use the menu more than once, this would lead to a massive number of feature extensions.

Submitted by justdave on Tue, 01/13/2009 Permalink

You could also use the script editor to create a script that does all the variable setting that you want done, and then select that script as the choice from the IVR menu.

Submitted by eeman on Tue, 01/13/2009 Permalink

not at all, its 6 one way and half-dozen another

ivr

1, goto some-context,1,1

2, goto some-context,2,1

3, goto some-context,3,1

in user_extensions.conf

[some-context]

exten => s,1,multi-function code

exten => s,n,continued

exten => 1,1,Set(Variable=value)

exten => 1,n,Goto(s,1)

exten => 2,1,Set(Variable=othervalue)

exten => 2,n,Goto(s,1)

its at most 1 extra line of code per option this way than 2 lines in the ivr