Asterisk runs but can't find config files

View: New views
3 Messages — Rating Filter:   Alert me  

Asterisk runs but can't find config files

by shermanrand :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Everyone,

I recently loaded Asterisk on my WRT-54gl with 2gig sd. (did the ipkg, jffs, optware etc...

Although it runs - when is I issue $asterisk -cvvv I can see that it can't quite find the config files.  I guess that the init file needs to be modified correctly.  Here is some of the output of the errors.
Otherwise, asterisk does come up with the >CLI command but no modules nor configs are loaded - even though they are in their respective folders.

typical - error is
Parsing '/etc/asterisk/modules.conf' : Not found no such file or directories ......

Here is the current init - which I think needs to be modified to direct the program to the correct locations - but I don't know how to modify it.  Can someone tell me where in the init to direct the program to the correct directories?

Thanks Rand




root@sherman:/jffs/etc/init.d# cat asterisk
#!/bin/sh
DEFAULT=/etc/default/asterisk
OPTIONS=""
[ -f $DEFAULT ] && . $DEFAULT
[ "$ENABLE_ASTERISK" = "yes" ] || exit 0
case $1 in
 start)
  [ -d /var/run ] || mkdir -p /var/run
  [ -d /var/log/asterisk ] || mkdir -p /var/log/asteri                             sk
  [ -d /var/spool/asterisk ] || mkdir -p /var/spool/as                             terisk
  /usr/sbin/asterisk $OPTIONS
  ;;
 stop)
  [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/                             asterisk.pid) >/dev/null 2>&1
  ;;
 *)
  echo "usage: $0 (start|stop)"
  exit 1
esac

exit $?



Re: Asterisk runs but can't find config files

by Ovidiu Sas-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Rand,

Which version of asterisk are you installing from optware?
aterisk14 and asterisk16 should come preconfigured with the right directories.
With optware, everything is installed under /opt and therefor your
config files will be under /opt/etc/asterisk.

Regards,
Ovidiu Sas

On Sun, May 3, 2009 at 11:12 AM, shermanrand <shermanrand@...> wrote:

> Everyone,
>
> I recently loaded Asterisk on my WRT-54gl with 2gig sd. (did the ipkg, jffs, optware etc...
>
> Although it runs - when is I issue $asterisk -cvvv I can see that it can't quite find the config files.  I guess that the init file needs to be modified correctly.  Here is some of the output of the errors.
> Otherwise, asterisk does come up with the >CLI command but no modules nor configs are loaded - even though they are in their respective folders.
>
> typical - error is
> Parsing '/etc/asterisk/modules.conf' : Not found no such file or directories ......
>
> Here is the current init - which I think needs to be modified to direct the program to the correct locations - but I don't know how to modify it.  Can someone tell me where in the init to direct the program to the correct directories?
>
> Thanks Rand
>
>
>
>
> root@sherman:/jffs/etc/init.d# cat asterisk
> #!/bin/sh
> DEFAULT=/etc/default/asterisk
> OPTIONS=""
> [ -f $DEFAULT ] && . $DEFAULT
> [ "$ENABLE_ASTERISK" = "yes" ] || exit 0
> case $1 in
>  start)
>  [ -d /var/run ] || mkdir -p /var/run
>  [ -d /var/log/asterisk ] || mkdir -p /var/log/asteri                             sk
>  [ -d /var/spool/asterisk ] || mkdir -p /var/spool/as                             terisk
>  /usr/sbin/asterisk $OPTIONS
>  ;;
>  stop)
>  [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/                             asterisk.pid) >/dev/null 2>&1
>  ;;
>  *)
>  echo "usage: $0 (start|stop)"
>  exit 1
> esac
>
> exit $?
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>

Re: Asterisk runs but can't find config files

by CORNELIU DOBAN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rand,

The default path to the asterisk.conf is /etc/asterisk and I believe that on Optware has been patched to be /opt/etc/asterisk.

Also, you can specify the config file to be used in the command line using the -C command line option:
http://www.voip-info.org/wiki/view/Asterisk+options

asterisk.conf will configure the directories used by asterisk (including the directory for the config files).

For Optware the paths should be like this:

[directories]
astetcdir => /opt/etc/asterisk
astmoddir => /opt/lib/asterisk/modules
astvarlibdir => /opt/var/lib/asterisk
astagidir => /opt/var/lib/asterisk/agi-bin
astspooldir => /opt/var/spool/asterisk
astrundir => /opt/var/run
astlogdir => /opt/var/log/asterisk

Usually Asterisk comes with sample configuration files. You will have to write your own configs, based on this samples.

Good luck,
Corneliu


--- In nslu2-asterisk@..., "shermanrand" <shermanrand@...> wrote:

>
> Everyone,
>
> I recently loaded Asterisk on my WRT-54gl with 2gig sd. (did the ipkg, jffs, optware etc...
>
> Although it runs - when is I issue $asterisk -cvvv I can see that it can't quite find the config files.  I guess that the init file needs to be modified correctly.  Here is some of the output of the errors.
> Otherwise, asterisk does come up with the >CLI command but no modules nor configs are loaded - even though they are in their respective folders.
>
> typical - error is
> Parsing '/etc/asterisk/modules.conf' : Not found no such file or directories ......
>
> Here is the current init - which I think needs to be modified to direct the program to the correct locations - but I don't know how to modify it.  Can someone tell me where in the init to direct the program to the correct directories?
>
> Thanks Rand
>
>
>
>
> root@sherman:/jffs/etc/init.d# cat asterisk
> #!/bin/sh
> DEFAULT=/etc/default/asterisk
> OPTIONS=""
> [ -f $DEFAULT ] && . $DEFAULT
> [ "$ENABLE_ASTERISK" = "yes" ] || exit 0
> case $1 in
>  start)
>   [ -d /var/run ] || mkdir -p /var/run
>   [ -d /var/log/asterisk ] || mkdir -p /var/log/asteri                             sk
>   [ -d /var/spool/asterisk ] || mkdir -p /var/spool/as                             terisk
>   /usr/sbin/asterisk $OPTIONS
>   ;;
>  stop)
>   [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/                             asterisk.pid) >/dev/null 2>&1
>   ;;
>  *)
>   echo "usage: $0 (start|stop)"
>   exit 1
> esac
>
> exit $?
>