Interactive Announcement (Press 1 for Sales, 2 for Support)

Hi everyone

I currently have a functional Asterisk setup.

I now would like to add an option for the caller to press a number (1 for sales, 2 for support, 3 for general enquiries etc …) and be automatically transferred to the relevant department. This is when the caller first calls in and before he is bridged to reception.

If I were programming this, I would hold the input number in a variable and filter it through a switch/ifelse to determine which queue to dial. But since I’m using FreePBX, I’m not quite sure how to do this.

Any help is much appreciated.

Actually, you can do it like any other context, just have a Wait(x) (where x = how long you want to wait) in there

exten => s,1,Background(greeting)
exten => s,n,Wait(10)

exten => 1,1,Goto(sales_context)

exten => 2,1,Goto(support_context)

exten => 3,1,Goto(information_context)

exten => 0,1,Goto(reception)

[quote=“rushowr”]Actually, you can do it like any other context, just have a Wait(x) (where x = how long you want to wait) in there

exten => s,1,Background(greeting)
exten => s,n,Wait(10)

exten => 1,1,Goto(sales_context)

exten => 2,1,Goto(support_context)

exten => 3,1,Goto(information_context)

exten => 0,1,Goto(reception)[/quote]

Thanks rushowr. I’ll give that a go now …

Hi rushowr

FreePBX has so main contexts, how do I know which one to add you code into? I’m currently adding them at the top of [ext-queues] and the wait command works, but when I enter an extension, it does not get transferred …

You would check your sip.conf, iax.conf, zapata.conf or whatever to see where the calls are getting directed to when they come in.

Also, you need to be sure you have the goto setup properly…What does your Asterisk console show when you’re doing the test call? Is it telling you that it “heard” the request, but the context doesn’t exist?

Hi rushowr

Once again, thanks for the reply.

Because I’m using using FreePBX, I managed to install the IVR module which did the trick … I was however making changes to some of the configuration files which freePBX allowed me to (and did not overwrite) but these changes were somehow not being used/read.