I'm using Zimbra 5.0.18 adn Asterisk 1.6.1.6. It's working fine. I simply followed the instructions and changed the Regex as mentioned earlier in this thread.
Let's see if I can dig out something from our internal documentation and properly expunge it:
There are several Zimlets for use with Asterisk. There is a Voicemail zimlet which will do MWI but, since we are storing voice mails in Zimbra, this is unnecessary. There is another for dialing from within contacts and emails included in experimental but this seems to be superseded by the zimlet at
Asterisk PBX Integration Zimlet - BNC Business Network Communications AG. This zimlet uses the Asterisk Manager interface.
We will need a cert directory owned by astuser for the next several steps:
mkdir /var/lib/asterisk/certs
To secure communications with the Asterisk Manager, we will need a key and cert for TLS encryption. Issue a PKCS#12 package as per the PKCS#12 procedures for a WebServer PKCS#12 package with DN=cn=pbx.mycompany.biz,ou=MediaServers,dc=mycompa ny,dc=biz using the medium security password and
operators@mycompany.biz for the email address. Add a SubjAltName of pbx and IP addresses of 172.x.y.8 and 208.a.b.14. We will need to edit the request to add the second IP address.
Download the PKCS#12 file to the configurating computer, extract and test the key and cert:
openssl pkcs12 -in <serial number>_pbx.p12 -out pbxk.pem -nocerts -nodes
openssl pkcs12 -in <serial number>_pbx.p12 -out pbxc.pem -clcerts -nokeys
openssl rsa -in pbxk.pem
openssl x509 -in pbx0c.pem
Copy the files to PBX:
scp -P 822 pbx?.pem root@pbx:/var/lib/asterisk/certs
Strangely, Asterisk requires the key and cert together in a concatenated file. So SSH as root to PBX and do:
cd /var/lib/asterisk/certs
cat pbx?.pem >> astcert.pem
chmod 600 *
cd ..
chmod 700 certs
chown -R astuser:astuser certs
To set up the manager interface, edit /etc/asterisk/manager.conf to have the following settings:
[general]
enabled = yes
;port = 5038
;bindaddr = 172.x.y.8
sslenable=yes ; set to YES to enable it
sslbindport=5038 ; the port to bind to
sslbindaddr=172.x.y.8 ; address to bind to, default to bindaddr
sslcert=/var/lib/asterisk/certs/astcert.pem ; path to the certificate.
[zimbraman]
secret = <Medium Security Password>
deny=0.0.0.0/0.0.0.0
permit=172.x.y.72/255.255.255.255
write = call,command,originate
Open an asterisk console (asterisk -rc) and reload the manager (manager reload).
We next install and configure the Zimlet. SSH as root to Zimbra and do the following:
mkdir /download/zimlets
cd /download/zimlets
wget
Download Asterisk PBX Integration Zimlet from SourceForge.net
The regular expression match to find phone numbers is faulty in the zimlet. We need to unpack it and change it as follows:
mkdir asterisk
cp ch_bnc_asterisk_0.65.zip asterisk/
cd asterisk
unzip *.zip
edit ch_bnc_asterisk.xml by changing the matchON parameter regular expression to (single line):
(?:\s|^)(?:\+\d{1,3}(?:\s|\.|\-|\,)?)?(?:\(\d{1,4}\))?\s?\d{1,11}(?:(?:\-|\.|\,|\s)\d{1,10}){0,3}\s?$
rm *.zip
rm *~
zip ch_bnc_asterisk_0.65mod.zip *
mv ch_bnc_asterisk_0.65mod.zip ../
cd ..
rm -Rf asterisk
su - zimbra
cd zimlets
cp /download/zimlets/ch_bnc_asterisk_0.65mod.zip ch_bnc_asterisk.zip
zmzimletctl deploy ch_bnc_asterisk.zip
zmzimletctl getConfigTemplate ch_bnc_asterisk.zip > ch_bnc_asterisk_config.xml
Edit ch_bnc_asterisk_config.xml to set the following parameters:
<host name="zimbra.mycompany.biz">
<property name="astManagerIp">pbx.mycompany.biz</property>
<property name="astManagerPort">5038</property>
<property name="astManagerUser">zastmanager</property>
<property name="astManagerSecret">Medium Security Passphrase</property>
<property name="astDialContext"></property> <!-- Must be blank to allow user specific contexts -->
<property name="srcPhonePrefix"></property>
<property name="iddPrefix">011</property>
<global>
<property name="enableSMS">false</property>
<property name="phonebookBaseUrl"></property>
zmzimletctl configure ch_bnc_asterisk_config.xml
zmmailboxdctl restart
From the Zimbra management console, disable the com_zimbra_phone zimlet.
Obviously, this is very specific to our environment and has been fudged to remove any sensitive information. Hopefully it gives you enough to get going. Good luck - John