11

I need to setup a simple IVR system for a friend's company that will let the caller navigate through the menu by pressing phone keys. Its kind of like a bus schedule.

for today's schedule press '1', for tomorrow's schedule press '2' and so on.

It is solely an information system, i.e. no navigation route will end up with a real person but only audio messages will be played.

Now, I've never setup anything like this before and did a little digging on Google. Seems like I will be able to achieve this using Asterisk.

  • What else do I need hardware-wise?
  • Is a simple Linux server and a VOIP account with a provider in Germany sufficient?
  • Will a VPS handle the task?
  • How about multiple concurrent incoming calls?
  • Are those handled by Asterisk?
Enamul Hassan
  • 4,744
  • 22
  • 35
  • 52
Sebastian
  • 2,839
  • 3
  • 32
  • 35

11 Answers11

17

It's perfectly possible.

What you need to know:

  1. Asterisk has some problems with H323. If your provider supplies SIP, ask them for SIP instead.

  2. You may build a whole IVR on dial plans in your extensions.conf, but for complex tasks it's better to use AGI. These are Perl or Python or whatever language scripts that implement your IVR logic. Each AGI session spans a child process, use FastAGI and a network daemon if you expect frequent connections.

  3. Multiple concurrent calls are not a problem, my installation of Asterisk on a simple PC handles hundreds sumultaneous calls.

  4. The only things that may really affect performance are sound conversion and tone detection.

    To improve performance, you should:

    1. Stick to one codec (µLaw is that I use), force all SIP connections to use that codec, and preconvert all your sound files to it using sox -t ul. As soon as you've done it, all Asterisk operation amounts to reading the file bytes from disk and sending them over network with just basic wrapping. There are no math, nothing except simple read-wrap-send operations.

    2. Ask your provider to detect tones on his side and send them to you out of band, using RFC 2833. Tone detection is quite a CPU consuming operation, let them do it theirselves.

    I personally run Asterisk on a 2,66 MHz Celeron IV with 2048 MB RAM, under Fedora 10 X86_64. 150 connections at once work OK, there are no delays.

    Overall traffic amounts to about 9.6 KByte/sec per connection. For a modern VPS there should be no problem at all.

Quassnoi
  • 381,935
  • 83
  • 584
  • 593
  • do you think an IVR may also be realized employing a regular VPS that has Asterisk installed? Or should I rather get a dedicated server? – Sebastian Jan 30 '09 at 12:28
  • and can you suggest some hardware (board) for such a system? – sepehr Jul 29 '16 at 12:14
  • @sepehr: man, it's been seven years! I think almost anything that can run Linux and has a network port would do, the tasks Asterisk deals with are not CPU or IO intensive at all. – Quassnoi Jul 29 '16 at 13:17
  • @Quassnoi ,now I'm sure you have at least seven years of experience :) – sepehr Jul 29 '16 at 13:34
2

If you're completely fresh, I would suggest studying FreeSWITCH instead of Asterisk. It's much better structured, and also comes with some pre-built examples, including an IVR menu, and the IVR syntax is pretty simple: http://wiki.freeswitch.org/wiki/IVR_Menu

I'm running a FreeSWITCH instance on a Xen virtual server, and it runs perfectly with multiple simultaneous calls.

Stanislav Sinyagin
  • 1,927
  • 9
  • 10
2

Asterisk rocks. For a few lines a simple P3 or better will do. Don't virtualise the PBX; Asterisk relies on pretty accurate timing.

FreePBX makes it really easy to set up an IVR - got a decent web-based front end and supports some cool Asterisk tools out of the box.

EDIT: FreePBX isn't Asterisk - it is a pretty interface that generates the configs for you. Trixbox includes it by default if you want a simple point and shoot solution.

If your VoIP account supports multiple incoming lines then Asterisk will use them just fine. You also need sufficient Internet bandwidth and decent QoS. For more than one line on a business system I would insist on a dedicated connection so you don't experience dropouts when users are accessing the net.

Adam Batkin
  • 47,187
  • 7
  • 120
  • 110
Adam Hawes
  • 5,359
  • 1
  • 19
  • 29
  • do you think an IVR may also be realized employing a regular VPS that has Asterisk installed? Or should I rather get a dedicated server? – Sebastian Jan 30 '09 at 12:16
  • If you have Asterisk installed somewhere then by all means use it. An IVR for a handful of lines will hardly require many resources. If you're talking a lot of lines (20+) then think about dedicated hardware. – Adam Hawes Feb 01 '09 at 04:29
  • the hyperlink to FreePBX is pointing to Free-B-P-X. The poster might want to fix that. – Kinjal Dixit Sep 07 '09 at 14:13
2

The best way to build an IVR applications is to use VoiceXML designed by W3C.org (http://www.w3.org/TR/voicexml21/) . Asterisk does not come with VoiceXML browser but there are companies that provide that for Asterisk such as SoftSyl Technologies (http://www.softsyl.com).

Companies like Cisco and Avaya also provide VoiceXML browser but they are not for Asterisk.

Mike
  • 21
  • 1
1

For more complex IVR's you can try Astive Toolkit, especially if you need databases or webservices iteration.

1

IVR design in Asterisk is not difficult, but there is a bit of a "learning cliff" associated with getting your first Asterisk server up and running.

As stated by someone else, call quality is everything. Pay to have professional grade recordings done for your IVR prompts and your announcements. Ensure that you're using 64k codes such as uLaw and aLaw; GSM (cellphone) might be cheap on bandwith, but it breaks your customer expectations about quality.

I strongly suggest that you put the IVR into it's own dial plan context and then direct calls into it. That makes managing things like menu choices much easier. For each sub-set of options, use a different dial plan context.

Try and keep your menu "shallow". If it takes more than three menu options to get the information your customer is looking for, they are very likely to hang up, or just press "0" to talk to a human. That defeats the point of your IVR.

If you are going to do something fairly cool with database look-ups, or account authentication or the like, I'd recommend using an "AGI" - Asterisk Gateway Interface - application. My personal favorite is "Adhearsion", which blends well with Ruby/Rails on the DB/Web side.

If you need help or more info, let me know.

MichelV69
  • 1,271
  • 6
  • 18
0

If you want to setup an Asterisk IVR, you can also use some Drag and Drop web based tool in order to make simple auto-attendant (like in your example) or complex IVR (managing scripting or data base driven IVR). One option is Cally Square. Have a look here: http://www.callysquare.com/

0

I've worked with IVR in the past but mainly with large systems and have never used Asterisk. I took a quick look at their website (http://www.asterisk.org/) though and it seems very informative, have you checked there?

Ian Devlin
  • 17,608
  • 4
  • 53
  • 69
  • yepp. Already did that. But I'd like to hear from somebody that has already done what I want to do and who can tell me about possible complications or recommend on the setup. – Sebastian Jan 30 '09 at 12:03
0

Its not programing related but...

Take a look at trixbox.org, It supports configuration from cisco to... snom phones Its Asterisk/Freepbx mod and everything under a nice ui!

i have a provider in australia added them as a gsm trunk, took 3hrs to setup 4phones. IVR is supported

The only problems would possibly being... voice quality of recording

Elijah Glover
  • 1,968
  • 2
  • 14
  • 20
0

Its quite simple. I'm using sipgate.de as provider for my asterisk. you need to setup a dialplan.

this is also quite simple. take a look here. you sould also take a look into the extensions.conf. there a some samples inside. the is also a sample which fits on your problem. to connect to sipgate, take a look into their knowlogebase. there are some samples for asterisk configuration.

sipgate is free, except you are doing outgoing calls.

Bernd Ott
  • 4,075
  • 1
  • 23
  • 42
0

You can do this in the dial plan...

[menu-main]
exten => s,1,Noop()
exten => s,n(msg),Background(ForTodayPress1TomorrPress2)
exten => s,1,Goto(menu-today)
exten => s,2,Goto(menu-tomorrow)
exten => i,1,Playback(invalid)
exten => i,n,Goto(msg)
exten => t,1,Goto(msg)

[menu-today]
etc...

[menu-tomorrow]
etc...

Or as someone else has suggested you can do it in any language that can write to stdin and read from stdout. The phpagi implementation is my particular favorite flavor. It might fit in to this example like so where the PHP is being run on a separate box so it does not effect the PBX under any kind of load.

[menu-main]
exten => s,1,Noop()
exten => s,n(msg),Background(ForTodayPress1TomorrPress2)
exten => s,1,Goto(menu-today,s,1)
exten => s,2,Goto(menu-tomorrow,s,1)
exten => i,1,Playback(invalid)
exten => i,n,Goto(msg)
exten => t,1,Goto(msg)

[menu-today]
exten => s,1,Noop()
exten => s,n,agi(http://myapache/agi/readschedule.php)
exten => s,n,Hangup()
vbcrlfuser
  • 181
  • 7