Tuesday, May 24, 2011

How to play mp3 files on asterisk for IVR?

If you are using the Background() application on your dial plan you can do this by converting your mp3 files to gsm.

1. You need to install lame and sox
apt-get install lame
apt-get install sox

2. Convert MP3 to wav and wav to gsm.
$ lame --decode example.mp3 example.wav
$ sox -V example.wav -r 8000 -c 1 example.gsm resample -ql

Example IVR Dialplan:
exten => s,1,Answer(500)
same => n(loop),Background(example&press-1&or&press-2)
same => n,WaitExten()

exten => 1,1,Playback(you-entered)
same => n,SayNumber(1)
same => n,Goto(s,loop)

exten => 2,1,Playback(you-entered)
same => n,SayNumber(2)
same => n,Goto(s,loop)

Thursday, May 5, 2011

Elastix: Email (Imap login Error)

When you install Elastix version 2.0.3 and setup the Email Server, you will encounter an error when creating an account. The error is: "IMAP Login Error".


1. Open the file "email.conf.php" from this directory /var/www/html/configs/
- nano /var/www/html/configs/email.conf.php
2. Search for the line "'HOST' => $host," and replace it with "'HOST' => 'localhost',".