Asterisk : Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)


#1

hi ,
please i need help who can help me please.i configure asterisk on centos 6 all my configuration are done when i start the dahdi service is give me the unknow service in my search i find this step :cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.6.0+2.6.0.tar.gz303
tar zxvf dahdi-linux-complete-2.6.0+2.6.0.tar.gz
cd dahdi-linux-complete-2.6.0+2.6.0
make all
make install
make config
/etc/init.d/dahdi restart
chkconfig dahdi on
then a reboot to make sure all was well and starting correctly.
Into Astersik and issue CLI> dahdi show status
when i finish dahdi is ok.But asterisk give me this message when i try to start << asterisk : Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)>>>>


#2

That message happens when you try to start an Asterisk CLI console, not when starting Asterisk proper.

Either Asterisk didn’t start (look at the logs for clues), or you have a file protection problem preventing access to the named pipe.


#3

yes when i start Asterisk CLI console,how i can find the file protection


#4

Did you try with asterisk -& and then rasterisk?


#5

Asterisk detaches itself from the console (which is more complete than just going into background) when you run it with no options.


#6

Sometimes it’s useful to capture the ouput of CLI on a text file (e.g. for debugging purposes), you could use this:

asterisk -r | tee asterisk-output.tx


#7

script is usually a better way of capturing interactions to a file, as it looks like a terminal to the program, not like a pipe.


#8

Normally, it happens because Asterisk service is not active, use this linux command to active asterisk service:
service asterisk start
then try again:
asterisk -vvvr
If something wrong went there, try to use “sudo” at the beginning.
hope that’s help.