Asterisk Recording Interface

Submitted by dan.littlejohn on Thu, 07/28/2005 - 3:40am. :: PBX
ARI (Asterisk Recording Inteface) is a user centric portal to the Asterisk PBX Software. It provides a user friendly web interface to voicemail and call monitor recordings. As well, it provides access to user settings in Asterisk.

Sponsors :
  • Northwest VOIP has generously sponsored the Call Monitor Recording Settings Feature.
  • Phonoscope, Inc has generously sponsored the Recording Download Feature.
  • Connelly Management has generously sponsored the support of multiple Contexts.
  • Syn-3 has reported a security bug, which has been fixed. Thanks.
Features :
  • AJAX enable self updating pages
  • Allows access to voicemail recordings
  • Allows access to call monitor recordings
  • Allows access to database to view all calls made
  • Easy to use search of all calls and recordings
  • Easy to use user settings page
    • i18n language setting
    • call forward enable
    • voicemail password
    • voicemail email and pager enable
    • voicemail recording audio format
    • call monitor recording settings
  • Handset feature help page
  • Login authentication by Asterisk Voicemail Password
  • Login authentication by SIP Password (if used no access to voicemail)
  • PHP5 support
ARI Screen Shot 1 ARI Screen Shot 2 ARI Screen Shot 3
ARI Screen Shot 2 ARI Screen Shot 5

Install :
  • Navigate to /var/www/html/
  • Create the directory "recordings" (/var/www/html/recordings/)
  • If the directory already exists, delete any old contents of this directory
  • Copy the files to this directory
  • In /etc/asterisk/manager.conf, make sure that the permit line includes if the web server is installed on the same machine or the remote computers that you would like ARI to work with. This will allow PHP to talk to the asterisk database, otherwise you will get an error message "Asterisk Manager Connection" Error.

Configuration :
  • Navigate to /var/www/html/recordings/includes
  • Open the file main.conf.php
  • To use AMP for database authentication set the AMP files indicated to the proper settings
  • To use ARI standalone for database authentication set $standalone['use']=true and set the user name and password
  • If you wish to only use the call monitor portion set $ari_no_login=1
  • ARI's call monitor default setting is to allow only viewing of calls of the extension that logged in to the website
    • If you wish for certain extensions to view all calls in the call monitor, set $callmonitor_admin_mailboxes equal to a comma delimited list of the extensions
    • If you wish for all users to view all calls in the call monitor, set $callmonitor_admin_mailboxes to "all"

Support : If you need a custom feature added or would like to sponsor development feel free to contact me.

Download :
Submitted by Des on Wed, 05/16/2007 - 2:04pm.

I am trying to setup ARI on a vanilla Asterisk install.

I have configured Asterisk to record calls to a mysql table.

I have tried the stable and devel versions, but I cannot get ARI to connect to the mysql database on the local machine. It is connected ok to the asterisk manager as I can see it log on and then off in asterisk cli.

Any suggestions?

Here are the settings from main.conf.php

$ASTERISKCDR_DBHOST = "localhost";

$STANDALONE['use'] = true;
$STANDALONE['asterisk_mgruser'] = "des";
$STANDALONE['asterisk_mgrpass'] = "mypassword";
$STANDALONE['asteriskcdr_dbuser'] = "asterisk";
$STANDALONE['asteriskcdr_dbpass'] = "myotherpassword";

How is ARI connecting to the database, through the socket file? or through a port? Where is the connection method defined/configured?

Submitted by weswells on Sun, 03/04/2007 - 5:08pm.


Is there a way to insert a beep tone into the audio stream to notify the caller that the call is being recorded?

Thanks Wes

Submitted by juggler on Mon, 02/12/2007 - 5:11am.


I have some comments on this problem.
I run a call center, where thounsand of calls are recorded per day.
And now i started getting this error(warning?):

To many files in /var/spool/asterisk/monitor/20070202-172036-1170429636.3309.wav

But still the calls are being recorded. without any problems. So I started doing some research on this problem. In earlier post someone told that this is because of file system limitations (ext3). But I think this is nonsense. I looked thru the code of file "/ari/bootstrap.html". The function "getFiles" has hardcoded limitations to 3000 files per directory and limit to 10 directories..

filecount limitation code snipet:

if ($fileCount>3000) {
.= _("To many files in $msg_path Not all files processed") . "";

directory count limitation code snipet:

if ($dirCount>10) {
.= sprintf(_("To many directories in %s Not all files processed"),$msg_path) . "";

So my question is:
1)Why this limitation is applied here?
2)Is it safe if I remove the limit or increase it?

Thank you in advance!
Take care.


Submitted by TheShniz on Tue, 04/24/2007 - 12:08pm.

Is there any solution or info you found out that might help... am going through the same exact thing :(

- J

Submitted by crankin on Fri, 02/02/2007 - 1:35pm.

Im using trixbox/freepbx
In I have this line${VM_MAILBOX}

After reading the post "How can i pass the username and password on the URL?" by flashbac I was able to access ARI by manually typing the username & password in the url. But I want to be able to click on a link in my email that will already include the username & password. By using {VM_MAILBOX} that works for username but my idea of using {VM_PASSWORD} does not. Any ideas on how to pass the voicemail password? Thanks in advance.

Submitted by sainfeld on Sun, 02/04/2007 - 11:18pm.

Could you help me locate the default value for VM_MAILBOX and VM_PASSWORD
I am trying all the ones I know without success. Is there a conf file
or db that contains the default values
Thank you


Submitted by Apoel on Mon, 01/29/2007 - 2:16am.

Hi guys! i need your help! This is a problem i didn't know that existed until now!

All my extensions are set up to record all incoming and outgoing calls. Up to here everything is OK.

The problem is the following:

Let's say i am calling and the ARI is recording. When i transfer the call to another extension, my recording gets erased and a new recording starts on the extension i transferred the call. I don't want the recordings of my extension to be deleted when i transfer calls to another extension.

Do you guys know how to fix this........... :-?

I am using Trixbox 2.1.1

Thanx a lot!

Submitted by sevensins on Mon, 01/22/2007 - 10:57pm.

I upgraded my TB 1.2.3 to TB2.0 via
After logging in to ARI interface, what ever link is clicked, the user is logged out..
It was all working perfectly in 1.2.3
any idea????


Submitted by Rami on Sun, 12/03/2006 - 5:57am.

when i log in with a certain extension I'm suppose to see only the calls which was made from or to this extension. calls which have empty source number are always shown!! I have tested it on couple of machines, such as gentoo and trixbox, and it seems that all calls with empty source number are always shown, I'm surprised that I didn't found anyone else reporting this, am I the only one facing this problem?
thanks, Rami

Submitted by chicane on Wed, 12/13/2006 - 3:44am.

Diving through the source to invesitgate further.
Prelim findings are that ARI may be exposing the symptom namely blank source but the cause may lie elsewere within asterisk. Ie somewhere else in dialplan the source number is not being correctly recorded in all circumstances.
Obviously one permitted circumstance where a source may be blank is where an external source withheld their number.
Looking back through approx 10k call records to analyse further

Submitted by chicane on Tue, 01/09/2007 - 3:35am.

As well as displaying calls to/from logged in extension all calls with the same outbound callerid are displayed.
Comment out the lines adding criteria for calls with same outbound id.

Instruction to fix:
within the callmonitor.module file locate the line beginning as follows:

// allow entries to be viewed with users outbound CID

Ensure that the block of lines from the next line beginning 'if (isset)' through to the corresponding line beginning '}' is commented out

Submitted by ianfirla on Mon, 11/27/2006 - 2:37am.

Hi there,

Thanks for ARI. It seems to work like a charm for most tasks; however, I'm wondering if there's a possibility to configure ARI to *always* record calls to certain numbers?

Ideally, one would be able to define a list of numbers which, regardless of which extension was placing the call, would be set to record automatically.

In a truly ideal world, there would be a handset keystroke option to stop recording as well.

Thanks again for a great product!


Submitted by alexey on Mon, 11/20/2006 - 6:04pm.

I am getting the following when I try to log in to ARI as any user and select "Call Monitor" option:

Warning: Invalid argument supplied for foreach() in /var/www/html/recordings/modules/callmonitor.module on line 386

Warning: Invalid argument supplied for foreach() in /var/www/html/recordings/modules/callmonitor.module on line 205

DB Error: unknown error

This started happening after server ran out of disk space. I had to delete some backup files, and restarted the box (FreePBX 2.0 with ARI 00.10.02.

If anybody has any suggestions on how to recover, please let me know! Thanks!

Submitted by philwoody on Tue, 10/31/2006 - 7:35am.

HI - We love ARI but just a quick question...
Does anyone know how to make it play back the smaller WAV49 files (extension .WAV - upper case) rather than the large .wav (lower case) files. Whenever I tell Asterisk to just generate the smaller WAV49 files ARI doesn't seem to be able to find these at all.
Thanks in advance

Submitted by glenn on Wed, 10/18/2006 - 4:39am.

Hi everybody,

I have successfully installed ARI and can log in.
CDRs are listed but I don't see any voicemail list.
I see some posts about permissions but I don't realy know how to set up.
So, all helps are welcome to make it running.
Thank You.

Submitted by bas38 on Tue, 10/17/2006 - 11:34am.

If have updated the Trixbox and I am running now 1.2.2. When I try to enter in the mailbox I get the error: Warning: file(/var/spool/asterisk/voicemail/default/2001/INBOX/msg0009.txt): failed to open stream: Permiss?o negada in /var/www/html/recordings/modules/voicemail.module on line 525

When I change the right for the directory voicemail with chmod -R 777 /var/spool/asterisk/voicemail I can login without having errors until a new voice message is been recorded. I a just a starter with Linux and Trixbox, I hope somebody can help me.

Submitted by naftali5 on Tue, 11/28/2006 - 11:15am.

anyone getting:
failed to open stream: Permission denied in /var/www/html/recordings/modules/voicemail.module on line 525

or similar with amp/freepbx installed...

the problem seems to be when asterisk is running as root.
this happens when you start asterisk by typing asterisk at the shell prompt.
the proper way to start asterisk is to type

to fix existing voicemails either type
to restart asterisk properly or type
to just fix the files


Submitted by MediaHouse on Fri, 10/13/2006 - 4:44am.

Hi There...excellent work on this ARI. It's simply excellent.

I do however have a few problems maybe you can help me with...

1. I am getting this error:
To many files in /var/spool/asterisk/monitor/20061012-100056-1160640056.1712.wav Not all files processed
and ARI is not recording any more. What can I do to flush out the old files?

2. I also had the problem with browser plugins. Will try the fix you suggested elsewhere, when I can get the above to work.

3. Another thing is that it seems to be only playing the first file in the list. I mean every link down the page links to the same file. I can only hear other files if I flip the page, and then only the first one on the page.

Thanks in advance for any help.


Submitted by flashbac on Mon, 12/18/2006 - 10:39am.

I found the solution to this, this is more of a limitation of the kernel. Two ways we can fix this:
1) ARI will search subdirectories under /var/spool/asterisk/monitor. So you can have a subdirectory archives/ with subdirectories for earch month like such:

ifyou still have too many files, you can further create subdirectories in the months (i.e. 01-09,10-19,20-31, or week1,week2,week3,week4).

2) you can recompile the kernel (google it)


Submitted by flashbac on Wed, 11/15/2006 - 7:03am.

i also been having the same problem. i think items 2 and 3 are caused by item 1. This also happens with the devel version of ARI. Any suggestions anybody?

Thanks in advance,


Submitted by jeemeekay on Fri, 09/15/2006 - 1:16am.


When i tried accessing the voicemails from ARI, it gave me this errors

Warning: file(/var/spool/asterisk/voicemail/default/2000/INBOX/msg0000.txt) [function.file]: failed to open stream: Permission denied in /var/www/html/recordings/modules/voicemail.module on line 525

Warning: Invalid argument supplied for foreach() in /var/www/html/recordings/modules/voicemail.module on line 526

Warning: file(/var/spool/asterisk/voicemail/default/2000/INBOX/msg0000.txt) [function.file]: failed to open stream: Permission denied in /var/www/html/recordings/modules/voicemail.module on line 525

Warning: Invalid argument supplied for foreach() in /var/www/html/recordings/modules/voicemail.module on line 526

Warning: file(/var/spool/asterisk/voicemail/default/2000/INBOX/msg0000.txt) [function.file]: failed to open stream: Permission denied in /var/www/html/recordings/modules/voicemail.module on line 770

Warning: Invalid argument supplied for foreach() in /var/www/html/recordings/modules/voicemail.module on line 771

Can you please recommend a solution as it appears as if when the voicemails are created, it does not create them with the right permissions for the ARI to access the voicemails.


Submitted by shamid on Tue, 09/05/2006 - 8:16am.


I am trying to change password it gives me no error but add ",,,=no" under the extension entry in voicemail.conf.tmp (don't know why it make changes in it, not in voicemail.conf). If anyone having this issue and have solution for that please help.


Submitted by glenn on Wed, 10/18/2006 - 4:42am.

I also encounter the same problem.
Changes are made in voicemail.conf.tmp but not directly in voicemail.conf.
Dan,please give us a hand.

Thank U

Submitted by Byrd on Fri, 09/01/2006 - 1:46am.

I'm getting DB Error: unknown option portability. Cannot connect to the asterisk database.Check AMP installation, asterisk, and ARI main.conf

I understand aah 1.5 is not supported but do u have a workaround for it or at least suggest me an older version that i can use?


Submitted by zheka on Thu, 08/31/2006 - 5:34pm.

Sorry for bad terminology, but I am newby with Asterisk/trixbox. I have been searching and searching all forums about my problem but no solution. I have a problem with recording incoming calls. They seem to start recording but the *.wav file is short (about 4 KB) and you can't hear anything. I am trying to play files that are in /var/spool/asterisk/monitor/ directory. Is it connected with ARI somehow or there is something wrong with my setup?

Sincerely and hopefully

Submitted by alexey on Wed, 08/23/2006 - 8:57am.

Great product! Do you plan to have any sort of "notes" capability through the ARI that would allow attaching notes or comments to voicemails and call monitor recordings. It may prove very useful, especially if those can be searched. Basically, to have an extra column with "Notes" that would show a link "View/Edit" to a notes file (could be stored as a text file just like call details .txt file for the voicemails). Clicking on the link would show the editing window where changes can be made and saved.

Please let me know if that's something you would consider to include in the future releases, or as a "develpment for donation".

Submitted by norskman on Mon, 08/07/2006 - 10:33am.

Can you help please?

I am running the latest Trixbox. I made the changes as noted on this page to make the reocrding feature work. Voicemails show up in ARI but when I go to the Call Recording line on any extension I get an error showing on the ARI page of DB error and nothing shows up. I have made no changes anywhere bar the fixes shown to make recoding work. I know the files are in the directory so its an issue of reading those files.

many thanks

Submitted by flashbac on Mon, 12/18/2006 - 9:43am.

For those of you interested, add these lines to login.php at about line 71:

if (isset($_GET['login']) &&
isset($_GET['password'])) {
$username = $_GET['login'];
$password = $_GET['password'];

Now you can have a link pointing to ARI like such:



Submitted by flashbac on Wed, 08/02/2006 - 9:13am.

On the readme file there's a section on how to pass username to the URL for creating links, etc. However it doesnt say how to pass the password. Is this possible? like such:


Submitted by samhsma on Sun, 07/23/2006 - 8:29pm.

Can i create the different account for retrieve different extension numbers?

Sam Ma

Submitted by shamid on Tue, 07/11/2006 - 1:03am.

i have configured ARI as mentioned on the website, but getting this message

"ARI does not appear to have access to the Asterisk Manager. ()
Check the ARI '/ari/main.conf.html' configuration file to set the Asterisk Manager Account.
Check /etc/asterisk/manager.conf for a proper Asterisk Manager Account
make sure [general] enabled = yes and a 'permit=' line for localhost or the webserver. "

Although i can connect to asterisk using the same Manager user name and password but getting above messae while connecting through ARI. Below is the configuration for my main.conf.php and manager.conf

enabled = yes
port = 5038
bindaddr =
displayconnects = yes

secret = ari123
permit =
permit =
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user

$ASTERISKCDR_DBHOST = "localhost";

# Standalone, for use without AMP
# set use = true;
# set asterisk_mgruser to Asterisk Call Manager username
# set asterisk_mgrpass to Asterisk Call Manager password
$STANDALONE['use'] = true;
$STANDALONE['asterisk_mgruser'] = "/blog/1/ari/index.html";
$STANDALONE['asterisk_mgrpass'] = "ari123";
$STANDALONE['asteriskcdr_dbuser'] = "asterisk";
$STANDALONE['asteriskcdr_dbpass'] = "cdradmin";

# authentication settings
# For using the Call Monitor only
# option: 0 - use Authentication, Voicemail, and Call Monitor
# 1 - use only the Call Monitor

I am not using AMP and using MySql 5 with latest PHP binaries. Please let me know where i am making mistake.


Submitted by shamid on Wed, 07/12/2006 - 2:14am.

Its working fine now after disabling SeLinux (Linux Enhanced Security) feature by editing the file /etc/selinux/config and chaning the following values as



Submitted by netoguy on Tue, 07/04/2006 - 12:46am.

Forgive me if this is already mentioned. I tried searching through the 3 pages, but I didn't see it anywhere. ...
I'm wanting to use the feature in Asterisk Voicemail that is if you put the '-' in front of the password it prevents them from changing it. However with ARI they are then required to type the '-' in front of their password to log in. Can the ARI be made so that they don't have to type the '-' in front of their password?

Submitted by raymckay on Thu, 06/29/2006 - 2:47pm.

I have set the following directive in main.conf.php


My understanding is that only ext 208 should be able to log in and listen to all recorded calls. The reality is though that ALL users are able to log in and listen to all recorded calls. Is this a bug? Have I done something wrong.

System is FreePBX 2.1.1 packaged with ARI 00.10.02

Submitted by turbodiesel on Thu, 04/26/2007 - 12:19am.


// allow entries to be viewed with users outbound CID
if (isset($_SESSION['ari_user']['outboundCID'])) {
if ($_SESSION['ari_user']['outboundCID'] != '') {
$searchText .= "OR (src = '" . $_SESSION['ari_user']['outboundCID'] . "'
OR dst = '" . $_SESSION['ari_user']['outboundCID'] . "')";

Submitted by dan.littlejohn on Mon, 07/03/2006 - 7:53am.

I will need more information to determine if this is a bug. If you would like to take a screen shot of the 208 extension and another one and send me the relevent parts of your config file I would be willing to take a look at it.

Submitted by wperris on Tue, 06/20/2006 - 6:38am.

$ASTERISKMGR_DBHOST = "localhost";

$LEGACY_AMP_DBHOST = "localhost";
$LEGACY_AMP_DBNAME = "asterisk";

$ASTERISKCDR_DBHOST = "localhost";

$STANDALONE['use'] = true;
$STANDALONE['asterisk_mgruser'] = "admin";
$STANDALONE['asterisk_mgrpass'] = "mio@dm1n";
$STANDALONE['asteriskcdr_dbuser'] = "asterisk";
$STANDALONE['asteriskcdr_dbpass'] = "@st3r1sk";

This is my config I still get:

DB Error: unknown error. I can access the voicemail and login.


Submitted by dan.littlejohn on Thu, 06/22/2006 - 4:13am.

Hard to say why this would be occuring. It may be related to a problem with PHP PEAR, or if you are not using MySQL there may be a problem with an SQL query. There could be lots of potential problems, and I would need more information to help diagnose the problem.

Submitted by Hedieh on Tue, 06/20/2006 - 2:31am.

i want to change ARI language to persian, but i dont know what shoud i do.
Does anyone have solution for this problem?

Submitted by dan.littlejohn on Thu, 06/22/2006 - 4:10am.

In your webserver root, under /recordings/local, you will find a file ari.utf-8.po. If you update this file with a persian translation and return it to me I will be happy to include the translation in the next version of ARI.

Submitted by Hedieh on Sun, 06/25/2006 - 2:17am.

thanks for your attention. how i can send you ari.utf-8.po??? i cant find any option for attachements.
and i have an another problem. is more important for me. i added an changed an expression in file and added an translation for it in ari.po . I followed the instructions mentioned in the readme.txt in /locale/ exactly. i created ari.po, wrote my translation. then i copied in it_IT folder then i convert it to ari.utf-8.po and ... according to instrucsions. but this expression isn't trnslated. i review ari.po with vi command and i found asterisk comments my new expression. i coudn't underestand why it does it. can you help me for this problem please?

Submitted by dan.littlejohn on Tue, 06/27/2006 - 8:34pm.

You can sent the persion translation (ari.po) file to You have to change some of the code to have the Persian Translation be one of the menu items that can be selected. When you send me the file, I will add it to the menu. The code is all available, if you would rather add it yourself. It is one of the files in the ./includes directory.

Submitted by drasko on Fri, 10/27/2006 - 5:42am.

Hi, I tried to add Serbian translation myself. In lang.php I added new option that points to sr_SR dir with LC_MESSAGES with ari.po.
To be sure that everything is ok I tried with german translation also (I copied ari.po and from german dir to my dir).
And nothing happened. Language was changed to serbian but all translations was in english.
Even when I tried with german translations nothing was happend.
Can you help me where did I get wrong, or link some tutorial how to make translations files?

Submitted by raxsv on Mon, 05/21/2007 - 3:10am.

I tried to add translation and I ended up with exactly same problem.
I'm able to change existing translation, but unable to add new.

Only thing that occurred to me is to add option in lang.php just like Drasko probably did.
<option value='cz_CE' " . ($_COOKIE['ari_lang']=='cz_CE' ? 'selected' : '') . ">Czech</option>
when I do this and change to czech it still display menu in english language.

Submitted by gmsmith on Mon, 06/19/2006 - 10:38am.

First of all, great product.

Had a few ideas...

1) Anyway, to make the call forwarding time of day dependant? For example from noon - 2p call this number, then after that call that number?

2) Anyway to route a all based on CID information? For all calls go to vm, except calls from my boss' cell phone (send those to some random number) :)

Submitted by dan.littlejohn on Thu, 06/22/2006 - 4:07am.

These are good ideas, but they are outside of the scope of this project. This project is mainly to enable a user portal to listen to recordings and make some limited changes to their user account settings. The features you have requested require changes to the Asterisk that are not already in place and are beyond the current scope ARI and capability of Asterisk. This may change if asterisk enables these out of the box, but I know that FreePBX does some if both of these.

Submitted by rquick on Mon, 06/05/2006 - 1:17pm.


When using A@H i go to the ARI login screen and receive the following error:
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/recordings/includes/asi.php on line 34

Warning: fsockopen(): unable to connect to localhost:5038 in /var/www/html/recordings/includes/asi.php on line 34

ARI does not appear to have access to the Asterisk Manager. ()
Check the ARI 'main.conf' configuration file to set the Asterisk Manager Account.
Check /etc/asterisk/manager.conf for a proper Asterisk Manager Account
make sure [general] enabled = yes and a 'permit=' line for localhost or the webserver.


I checked all the settings as listed and found no problems. Any help would be greatly appreciated..

Thank you,
Randy Quick

Submitted by dan.littlejohn on Wed, 06/07/2006 - 12:51pm.

From looking on the web, it looks like you may have this problem.

Looks like it can't resolve "server" to an address, or
it can't connect to that address. Possible reasons:

* Typo in the hostname/setup/configuration
* firewall, tcp wrappers, etc. blocking connections
* DNS problem

Submitted by marcin on Sun, 05/28/2006 - 11:37pm.

I'm using aah 2.8 and ari 00.10.02.
How can I configure ARI to display only answered calls in Call Monitor ?



Submitted by dan.littlejohn on Tue, 05/30/2006 - 12:13pm.

This would be a new feature, I will add it to my To Do List