Ticket #2386 (new Patches)

Opened 6 years ago

Last modified 2 years ago

unified phone directory for a multi system directory setup

Reported by: fskrotzki Assigned to:
Priority: minor Milestone: Undetermined
Component: Voicemail Version: 2.3.0
Keywords: multi system employee directory Cc:
Confirmation: Unreviewed Distro:
Backend Engine: Asterisk 1.2.x Distro Ver:
Backend Ver: 1.2.22 SVN Revision (if applicable):

Description

ok I'm attaching a diff of the changes I made to the agi-bin/directory file. Here was my thought process for the changes.

You have one central system and one or more distributed satellite systems each running in a smaller office with maybe a hard line line or two for emergency services and local incoming calls. because the calls to any office should be handled in a similar way and of they are using the phone system any number they dial should be reachable. (This part is done via dial plan and IAX or DUNDi, etc). The issue is each office has only some of the recorded names for employees and how do you gather them all up on any other system so that changes to one don't destroy the other.

So in the /etc/asterisk directory we create directories for each other server using the FQDN for it. In the /var/spool/asterisk/voicemail/ directory we do the same thing.

Then we do a rsync from one system /etc/asterisk/voicemail.conf to remote:/etc/asterisk/FQDN/ and then rsync the same systems greet.* files and directory structure So /var/spool/asterisk/voicemail/greet.* to remote:/var/spool/asterisk/voicemail/FQDN/

greet.wav and greet.WAV are the files that only contain a persons name NOT the greeting. it's the file that is played when you press # and have it say a name instead of spelling it.

I was looking to create a entry in amportal.conf called ASTSERVERLIST and that will be a comma separated list of all other servers in the group that we can read in. (This part have not finished as I'm not sure where to start).

The idea being that by using the FQDN it ties each system together in the existing directory structure (and those names would not be normally used as contexts).

Attachments

directory-diff.txt (3.4 kB) - added by fskrotzki on 09/18/07 17:20:08.
done against a 2.3.0.3 install

Change History

09/18/07 17:20:08 changed by fskrotzki

  • attachment directory-diff.txt added.

done against a 2.3.0.3 install

10/02/07 11:51:58 changed by fskrotzki

setup documentation for this patch.

I’m explaining a two system setup but wrote the code to support any number of systems.

I recommend using fully qualified domain names (FQDN) for each system in the setup as it will be highly unlikely that you’d have a voicemail context of that name.

For this documentation I’m using the name local.example.com and remote.example.com for my FQDN in this documentation.

Ok first off you need to setup a process to replicate the following local files to other system(s):
/etc/asterisk/voicemail.conf
/var/spool/asterisk/voicemail/*/greet.wav, greet.WAV, greet.gsm, , greet.GSM

Now on each system you’ll need to create directories in the /etc/asterisk/remote.example.com and /var/spool/asterisk/voicemail/remote.example.com for each remote server. Next you create a rsync greet_only include file and it contains the following lines:
+ greet.wav
+ greet.WAV
+ greet.gsm
+ greet.GSM
- remote.example.com
- Old
- INBOX
- tmp
- temp
- Cust3
- Family
- Work
- device
- greet
- temp.*
- busy*
- unavail*

Now I’ve currently created a scripte called replicate_voip_greet.sh and scheduled a cronjob that runs this script every 10 minutes:
#!/bin/sh

rsync -avx --include-from greet_only /var/spool/asterisk/voicemail/ remote.example.com:/var/spool/asterisk/voicemail/local.example.com /.

rsync -avx /etc/asterisk/voicemail.conf remote.example.com:/etc/asterisk/local.example.com/.

If you have more then two systems make an additional line in greet_only for remote2.example.com, etc… Also you’ll then need to duplicate the two rsync lines in the cronjob script to replicate to the “remote2.example.com” server.

Test your rsync scripts carefully to be sure that it only replicates what we need (you might need to add a more exclude directories over time if users create custom folder to store voice mails In them. Replicating them is a waste of bandwidth, time an CPU.

Next apply the changes I provided to the directory agi script and it will know where to look and how to integrate your boxes directories into one seamless shared directory listing.

11/28/07 02:07:54 changed by p_lindheimer

  • milestone deleted.

04/06/11 17:11:58 changed by mickecarlsson

  • milestone set to Cut Line.