Separating Company Voicemail Boxes
From Etel
Contents |
Title
Separating Company Voicemail Boxes
Problem
You want to separate voicemail boxes for multiple companies on a single Asterisk server.
Solution
Add the following to the /etc/asterisk/voicemail.conf file:
[company1] 6000 => 1234,Henry Brown,hbrown@fakecompany.com 6001 => 9876,Leroy Smith,lsmith@fakecompany.com 6002 => 5555,John Doe,jdoe@fakecompany.com 6003 => 1212,Marlan Gustaferson,mgustaferson@fakecompany.com [company2] 6000 => 9493,William Jenkins,wjenkins@syntheticcompany.com 6001 => 3433,Larry Birdwell,lbirdwell@syntheticompany.com 6002 => 6578,Charlie Nugget,cnugget@syntheticcompany.com 6003 => 8483,Patty LeFord,pleford@syntheticcompany.com
Add the following extensions to a context only accessible by the first company in the /etc/asterisk/extensions.conf file:
exten => 8500,1,VoicemailMain(@company1) exten => 6000,1,Voicemail(6000@company1,u) exten => 6001,1,Voicemail(6001@company1,u) exten => 6002,1,Voicemail(6002@company1,u) exten => 6003,1,Voicemail(6003@company1,u)
Add the following extensions to a context only accessible by the second company in the /etc/asterisk/extensions.conf file:
exten => 8500,1,VoicemailMain(@company2) exten => 6000,1,Voicemail(6000@company2,u) exten => 6001,1,Voicemail(6001@company2,u) exten => 6002,1,Voicemail(6002@company2,u) exten => 6003,1,Voicemail(6003@company2,u)
Execute the following on the Asterisk CLI in order for these changes to take effect:
voicemail reload dialplan reload
Discussion
Appending “@company1” or “@company2” to the voicemail box in each extension tells Asterisk which voicemail context to use from the /etc/asterisk/voicemail.conf file.
Even though the voicemail box assignments between both companies are the same, the voicemails will be stored in separate locations on the filesystem. You will find company1's voicemail boxes at /var/spool/asterisk/voicemail/company1, and company2's voicemail boxes at /var/spool/asterisk/voicemail/company2.
Dialing 8500 from a phone at company1 will only give you access to the voicemail boxes for company1. Dialing 8500 from a phone at company2 will only give you access to the voicemail boxes for company2.
See Also
Metadata
- By: ChrisHozian
