Modifying the directory listing in aastra.cfg

I’m replacing an old trixbox system with a new FreePBX system (2.11.0.37). I copied the directoryList.csv file out of the old system and have loaded it into the new system, however, the phones aren’t seeing it. When I hit the directory button, it just shows me a list of extensions. Looking around the web, it looks like I need to add directory 1: directoryList.csv to the aastra.cfg file and reboot the phones. Do I need to do anything else after making the changes, such as running any setup commands, etc? I’ve heard conflicting things about the procedures for modifying aastra.cfg, so I thought I would try to get a confirmation from the community before I moved forward.

I still haven’t found a way to do this. I tried modifying the .csv and rebooting the phones, but that didn’t work. I didn’t run any setup commands, etc. Any ideas?

Sorry to dig up this old thread but this is a easy fix. With in the phones MAC.cfg file you need to add the option for the directory and the name of the csv file you are going to use like so:

directory 1: mydirectory.csv

The directory csv file needs to be within the same directory as your phone configuration file and needs to look like this for each line:

John Smith,100,1,John Smith,private

The directory options are documented in the aastra administration guide.

Just a note that if you make changes to the directory.csv, the phones may not load the new directory items unless you also make some kind of change to the aastra.cfg file as well. I typically put the following at the beginning of aastra.cfg and then change it as needed.

#  Update Code:  1

When I want to change something in the directory, just change the 1 to a 2, or whatever. The phones will see the change and then reboot and update overnight.

I worked with a Mitel tech on this issue. After he looked at my mac.cfg file, he noticed that I had another reference to the directory in the .cfg (part of the scripts). Once I removed that, it saw directoryList.csv and everything started working as intended. I think this ended up being user error on my part.

Sorry to dredge up this old thread but I’m curious what the mac.cfg actually should look like. They all quit working at the same time and I cant figure out what caused it. Aside from the soft key definition the only reference to the directory that I see in the cfg is

directory script: “http://xxx.xxx.xxx.xxx:88/applications.php/contactmanager/main?user=4705

but something isn’t right. The button is on the phone but when pressed it just times out. When the phones pull a config I can see them pulling the directory.csv file. Are they storing and reading it locally (implying that the format of the csv has changed with the newer firmware) or are they reaching out to the pbx every time someone pushes that button?

When I log into the phone via the PC and click on the Directory menu the file that opens is just a blank spreadsheet.

This is FreePBX 12.0.74 with the paid endpoint module.

I’m not sure if this is an apples to apples comparison, since we’re not using the paid EPM on that server.

I added:
directory disabled: 0
directory 1: DirectoryList.csv <-this was the name of the Directory file that I created

I had to comment/delete out the line right before the softkey configs that said “directory script: http://x.x.x.x:80/aastra/asterisk/directory.php?user=$$SIPUSERNAME$$”, because that was loading up the bad directory info beforehand. Once that was gone, my custom directory command loaded the correct info. I didn’t see this line when I was initially working on the problem.

Since you’re using the EPM, you may need to make sure that your buttons in the phone model configurations are pointing at the right file. I’m using EPM on a different system (not the one that I had the directory issue with), and I had a lot of problems working with the phone layouts initially. If the Directory button doesn’t work, try playing with the REST-Apps. Maybe something like XML-API and REST-Contacts.

Hope that helps.

I appreciate that. I commented out that line (you can more easily change the base file in the paid epm but it works the same way) and that seems to have fixed it. The other thing I did was change the csv to not have any quotes around the names. Guessing it was the former that did it but I’m not 100% sure.

Forgot to mention that I changed the name of the file to callersList.csv to match what the phone spits out when you download from the phone GUI. Also changed it in the base file. Don’t think that affected anything.

1 Like

Directory scripts for aastra phones I believe were used with the aastra-scripts.rpm which is afaik no longer maintained due to legal reasons. It is however still possible to get the aastra-scripts.rpm, but install will vary depending on the os. Igaetz has a repo with the scripts at: https://github.com/lgaetz/Aastra_Scripts

edit: sorry just realized i was replying to a really old thread, havnt checked my notifications for a while.