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

rekha_sri picture rekha_sri · May 10, 2010 · Viewed 155.6k times · Source

I am learning asterisk.

After I installed asterisk, I tried to connect with it using

asterisk -rvvvvc.

But it gave me the following error message:

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

How can I solve this issue?

Answer

Duc picture Duc · May 10, 2010

It's probably because asterisk is not running on your server.

Try to run it with this command :

asterisk -vvvvvvc

You'll enter into the Asterisk CLI and if something goes wrong you'll see it. After that you can quit the CLI by entering the exit command. Then you can reconnect to the CLI by typing asterisk -r. All this commands assumed you're the root user. If you are not root prefix them by sudo, by example sudo asterisk -vvvvvvc.

Hope it helps, regards, Duc.