I'm trying to setup an IVR or to be more specific an automated attendant using Asterisk. I don't want anything fancy besides the simple automated menu system, and instead of dialing an extension (for now) just ring the same phone line (POTS) if pressed 1 or play a recording if pressed 2. The server running Asterisk & IVR will be in a remote location from the actual land-line.

Goal: Customer calls the land-line. Remote server answers the call and handle automated menu system. Based on selection, respond: (pressed 1) ring the same land-line, (pressed 2) play recording.

Here are my questions:

  • Is this setup doable?
  • Do I need to sign up with a IAX VOIP provider? (no VOIP calls will be made/received) only normal POTS calls will be made. (possibly the land-line will be outside the US)
  • What hardware do I need? Remote server side and client-wise (POTS land-line)

Any comments will be appreciate it.



Your explanation of the requirements is a bit confusing, but if I understand correctly, yes it can be done quite easily. The one issue is that if you only have one POTS line attached to the asterisk server, you'll only be able to make/receive one call at a time. In this case, you'd need to accept input from the user (either 1 or 2) and then if they pressed "1", then hang up with them before dialing back out that same line. Obviously that problem goes away if you attach additional POTS lines to the server or if you use IAX/SIP for calls.

No, if you're not going to be using VoIP call transport, then there's no need to sign up with an IAX provider.

As far as hardware goes, you'll need a server machine (the quality of which will depend on your redundancy/uptime requirements). In this use case (taking one call at a time), performance certainly is not a factor. Any old box will do. You'll also need a FXO adapter - this can either take the form of a PCI card from Digium/Sangoma/etc. or alternatively it could be an external ATA that does the conversion from POTS to SIP. I guess another option would be to use a Xorcom channel bank - these connect to your server via USB.

  • you were saying that if I attach an additional POTS line then I don't need to hang up on them, and just transfer the call to the other POTS line. would I need a provider to transfer the call? or the FXO adapter will be in charge of doing the transfer? – Mike Oct 6 '09 at 2:00
  • I guess I'm still not clear on what you're trying to accomplish. Is this close? 1. Caller picks up phone, dials phone number, which gets routed to the POTS line connected to the asterisk server. 2. Asterisk server answers, provides voice menu. 3. If caller presses 2, play a recording. 4. If caller presses 1, then call their number back? Step 4 is where your explanation gets fuzzy - what exactly do you want to happen there? – EEAA Oct 6 '09 at 2:11
  • Step 4: if caller presses 1, then ring same POTS land-line so (secretary) can pick up OR ring a second POTS land-line (manager). Both lines are supposed to be attached to the ATA adapter. Goal: transferring calls without using a VoiP provider. Hope that clears it up. Thanks again! – Mike Oct 6 '09 at 4:07
  • Got it. Yes, in that case, you will need two POTS interfaces in the server. One FXO (which will be connected to the telco) and one FXS (which will be connected to the secretary's phone). When the caller presses 2, you'll need to have asterisk ring the secretary and when he/she answers, bridge the two calls. – EEAA Oct 6 '09 at 12:58
  • So one more question. Which adapter would you recommend to connect the POTS land-line?, I was thinking the Cisco ATA-186-I2-A voipsupply.com/ata-186-i2-a Do I need a POTS interface in the server or just the ATA on the land-line? (remote asterisk server) – Mike Oct 6 '09 at 13:51

Here's a very simple example of how you could implement it in the dialplan...

exten => s,1,Wait,1
exten => s,n,Answer
exten => s,n,Set(COUNT=0)
exten => s,n,Wait,1                                             ; Give Caller ID some time
exten => s,n(greet),Playback(thank-you-for-calling)             ; "Thank you for calling"
exten => s,n,Read(RESPONSE|mainline-ivr-recording|1|||3)        ; Custom IVR Recording "Press 1 for X, Press 2 for Y..."
exten => s,n,Goto(s-${RESPONSE}|1)                              ; Read the callers response
exten => s,n,Goto(s,greet)

exten => s-,1,Set(COUNT=$[ ${COUNT} + 1 ])                      ; If caller fails to enter a response, then COUNT + 1
exten => s-,n,GotoIf($[ ${COUNT} = 2 ]?s-,bye:s,greet)
exten => s-,n(bye),Playback(goodbye)
exten => s-,n,Hangup()  

; If they press 1
exten => s-1,1,Wait(0.5)
exten => s-1,n,Dial(DAHDI/G1/5551212)
exten => s-1,n,Hangup()

; If they press 2
exten => s-2,1,Wait(0.5)
exten => s-2,n,Playback(lots-o-monkeys)
exten => s-2,n,Playback(goodbye)
exten => s-2,n,Hangup()

This doesn't account for invalid inputs (what if the caller presses 5?) but should get you started. To dial out to the POTS, you'll either need a TDM or Analog card and a T1 or landline (respectively), or an IAX or SIP provider that allows you to route calls outbound.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy