====== Asterisk PBX Migration ====== - Get to a Linux console on the old Asterisk box - Log in as root - Archive the Asterisk configuration files * ''tar -zcvf etcasterisk.tgz /etc/asterisk'' - Archive the Asterisk sound files * ''tar -zcvf sounds.tgz /var/lib/asterisk/sounds'' - Archive the Asterisk voicemail files * ''tar -zcvf voicemails.tgz /var/spool/asterisk/voicemail'' - Archive the provisioning files if they exist * ''tar -zcvf tftpboot.tgz /tftpboot'' * These files are in '/home/PlcmSpIp' on Thirdlane - Archive the DAHDI configuration files if you have a TDM card * ''tar -zcvf etcdahdi.tgz /etc/dahdi'' This will create files that can be transferred to the new PBX. scp {etcasterisk.tgz,sounds.tgz,voicemails.tgz,tftpboot.tgz,etcdahdi.tgz} root@new.pbx.server:/ This leaves the archives in the root of the new PBX. Log into the new PBX as root and extract the archives. Think hard about extracting ''/etc/asterisk'' in its entirety to its original location. It will probably break things. At a minimum, create a backup of the existing files before extracting: ''cp -avr /etc/asterisk /etc/asterisk.bak'' cd / tar -xzvf sounds.tgz rm sounds.tgz tar -xzvf voicemails.tgz rm voicemails.tgz If you want to extract the files to a temporary location: mkdir /root/asterisk_backup mv etcasterisk.tgz /root/asterisk_backup cd /root/asterisk_backup tar -xzvf etcasterisk.tgz Finally, a word about permissions. You will want to check that the newly extracted files have appropriate permissions. They may need to be adjusted to something similar to this: chown -R asterisk.asterisk /var/lib/asterisk/sounds chown -R asterisk.asterisk /var/spool/asterisk/voicemail find /var/lib/asterisk/sounds -type d -exec chmod 775 {} \; find /var/lib/asterisk/sounds -type f -exec chmod 664 {} \; find /var/spool/asterisk/voicemail -type d -exec chmod 775 {} \; find /var/spool/asterisk/voicemail -type f -exec chmod 664 {} \; ===== Sound Files ===== There are two sound file directory layouts in existence. The new way has alternate languages in their own subdirectory of ''/var/lib/asterisk/sounds''. If you see errors such as: [2011-11-21 10:25:33] WARNING[9730]: file.c:665 ast_openstream_full: File digits/1 does not exist in any format [2011-11-21 10:25:33] WARNING[9730]: file.c:992 ast_streamfile: Unable to open digits/1 (format 0x4 (ulaw)): No such file or directory first check for the existence of the sound files and the permissions. Then check this setting in ''/etc/asterisk/asterisk.conf'': languageprefix=yes