A fix for new Asterisk MOH file not found issue

The new Asterisk PBX system for some odd reason have an issue with MOH not working by default. Digging deeper I found out that there’s a mismatch in directory names where asterisk looks for these files.

It looks like the GUI portion of asterisk uploads files to /var/lib/asterisk/mohmp3 but config files set to look in /var/lib/asterisk/moh. the easiest fix is as below.

mv /var/lib/asterisk/mohmp3/*.* /var/lib/asterisk/moh/
rm -f /var/lib/asterisk/mohmp3
ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3

This will move all content on mohmp3 directory to moh, delete mohmp3 folder and then create a symlink named mohmp3 targeting moh. Now you don’t have to mess about with editing any config files.

Setting up a Cisco router for auto-provisioning of Cisco handsets

Here is a sample config to setup auto-provisioning for Cisco handsets. This only covers the part of distributing the config files to the handsets and not the config file creation part.

This assumes that VLAN100 is the VOICE VLAN and PCs are connecting via the PC port at the back of the phones.

!
ip dhcp pool VOICE
network 192.168.100.0 255.255.255.0
default-router 192.168.100.1
dns-server 192.168.100.1
option 66 ascii "http://auto.provisioning.url/"
lease infinite
!
interface Vlan100
description VoiceVLAN
ip address 192.168.100.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
!
interface FastEthernet3
description ToVoiceSwitch
switchport mode trunk
switchport voice vlan 100
!