You have to make a change in the asterisk.conf file located at /etc/asterisk
astrundir => /var/run/asterisk
Reboot your system and check
First check if the file /var/run/asterisk/asterisk.ctl exists if it doesn't, then the asterisk server is not running. So start it like
and then asterisk -r to drop to the command line prompt worked for me.