OpenWrt Forum Archive

Topic: Asterisk: Unable to connect to remote asterisk

The content of this topic has been archived on 4 Feb 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have just upgraded my wgt634u to kamikaze 7.07 and I have installed asterisk.
I have modified /etc/default/asterisk:
ENABLE_ASTERISK="yes"

But now this is the situation:

root@OpenWrt:~# asterisk -r
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
root@OpenWrt:~#

Please, help me!

ps. excuse me for grammar mistake, I don't speak english very well.

I know this is a rather old post and don't know if you already found a solution. However, I, too, would like to re-visit this issue. I have just flashed one of my LaFonera units with an OpenWRT compiled off the SVN trunk with asterisk14 and asterisk-1.2.x. Regardless which version of asterisk I installed, when I try to run rasterisk, I always got the same error message indicating /var/run/asterisk.ctl doesn't exist even though my asterisk has been configured and run through the original init scripts (/etc/init.d/asterisk) during a reboot. However, if I modified the /etc/default/asterisk file to include this OPTIONS="-vC /etc/asterisk/asterisk.conf" (notice the verbose v switch) and add an & at the end of the line to launch asterisk on the /etc/init.d/asterisk file, i.e. $DEST/usr/sbin/asterisk $OPTIONS &, then rasterisk will run without a problem as shown below:

root@192.168.1.2's password: 


BusyBox v1.8.2 (2008-02-12 15:28:32 EST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r10141) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@Fonerisk:~# rasterisk
Asterisk 1.4.17, Copyright (C) 1999 - 2007 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.17 currently running on Fonerisk (pid = 461)
Verbosity is at least 1
Fonerisk*CLI>

Honetly, I just don't like this quick and simple hack. I am hoping someone who knows how to fix this can help me.

I have exactly the same problem and no solution yet - I do not even know, where the problem lies / comes from...
It is definitely not possible for me to run Asterisk in background, if I use one of the options, that it does some output, it works (e.g. : -v, -f, -d). But the "normal" mode (./asterisk start) is not working, a pid file is created, asterisk processes appear in list of processes, but I am not able to connect locally (command: asterisk -r), or by using x-lite.

Hardware: WL-500 GP
OpenWRT Kamikaze 2.6 trunk r11370
asterisk 1.4.11-1

(Last edited by fireandy on 25 Jun 2008, 01:24)

fireandy wrote:

I have exactly the same problem and no solution yet - I do not even know, where the problem lies / comes from...
It is definitely not possible for me to run Asterisk in background, if I use one of the options, that it does some output, it works (e.g. : -v, -f, -d). But the "normal" mode (./asterisk start) is not working, a pid file is created, asterisk processes appear in list of processes, but I am not able to connect locally (command: asterisk -r), or by using x-lite.

Hardware: WL-500 GP
OpenWRT Kamikaze 2.6 trunk r11370
asterisk 1.4.11-1

Me too have same issue..
Looks like some issue in SVN trunk for Asterisk.

Thanks

Please read my last response on this thread where I confirmed the problem was caused by uClibc-0.9.29 library. Ever since I recompiled my OpenWRT SVN source with uClibc-0.9.28 library, my asterisk runs normally without any additional switches.

The discussion might have continued from here.