Asterisk for dummies

Hi,

Does any body know of a guide for dummies on how to install/config/use
asterisk in openSUSE?

I’m finding the documentation they provide difficult to understand or
incomplete.

And bugs:
Service asterisk status fails, they forgot to implement the status function.

The web GUI is not running, or it is not at 8088.

I’m reading the startup section here:


https://wiki.asterisk.org/wiki/display/AST/The+Most+Basic+PBX

There are instructions to “Creating SIP Accounts”, for creating a sample
config, it then says to run the command line interface to the server
(asterisk cli) and run there a command, but it does not say what is the
linux program to run that CLI interface.

I found on google that it is “asterisk -r”. I run it and I get a
non-stop stream of errors:


> linux:~ # asterisk -r
> Asterisk 1.8.9.0, Copyright (C) 1999 - 2011 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.8.9.0 currently running on linux (pid = 8866)
> Verbosity is at least 3
> [Feb 24 19:43:53] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:43:53] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:43:58] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:43:58] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:03] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:03] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:08] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:08] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:08] WARNING[8906]: db.c:115 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': Permission denied
> [Feb 24 19:44:08] WARNING[8906]: db.c:596 ast_db_gettree: Database unavailable
> [Feb 24 19:44:13] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:13] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:18] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:18] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:23] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:23] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:28] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:28] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:33] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:33] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:38] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:38] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:43] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:43] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:44:48] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:44:48] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> linux*CLI>
> Disconnected from Asterisk server

So, I ignore that and input the command they say, and get more errors:


> Connected to Asterisk 1.8.9.0 currently running on linux (pid = 8866)
> Verbosity is at least 3
> [Feb 24 19:50:08] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:50:08] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> [Feb 24 19:50:08] WARNING[8906]: db.c:115 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': Permission denied
> [Feb 24 19:50:08] WARNING[8906]: db.c:596 ast_db_gettree: Database unavailable
> linux*CLI> sip reload
>  Reloading SIP
>   == Parsing '/etc/asterisk/sip.conf':   == Found
>   == Parsing '/etc/asterisk/users.conf':   == Found
> [Feb 24 19:50:11] WARNING[8880]: chan_sip.c:28490 reload_config: No valid transports available, falling back to 'udp'.
> [Feb 24 19:50:11] ERROR[8880]: netsock2.c:263 ast_sockaddr_resolve: getaddrinfo("linux", "(null)", ...): Name or service not known
> [Feb 24 19:50:11] WARNING[8880]: acl.c:582 resolve_first: Unable to lookup 'linux'
>   == Using SIP CoS mark 4
> [Feb 24 19:50:11] WARNING[8880]: db.c:115 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': Permission denied
> [Feb 24 19:50:11] WARNING[8880]: db.c:115 dbinit: Unable to open Asterisk database '/var/lib/asterisk/astdb': Permission denied
>   == Parsing '/etc/asterisk/sip_notify.conf':   == Found
> [Feb 24 19:50:13] ERROR[8898]: chan_woomera.c:3925 connect_woomera: cannot connect to {default} localhost/42420
> [Feb 24 19:50:13] NOTICE[8898]: chan_woomera.c:3197 woomera_locate_socket: Woomera {default} Cannot Reconnect! retry in 5 seconds...
> linux*CLI>
> Disconnected from Asterisk server
> linux:~ #


It is possible that I have to provision those databases somehow.
And do who knows what, those basic instructions to get started are
incomplete.


Cheers / Saludos
Carlos E. R.

On 02/24/2012 07:59 PM, Carlos E. R. wrote:

> It is possible that I have to provision those databases somehow.
> And do who knows what, those basic instructions to get started are
> incomplete.

I found a post here:


> http://forums.opensuse.org/english/get-technical-help-here/network-internet/470528-asterisk-10-opensuse-12-1-a.html

which says that the directories of the databases have permissions for
root, whereas asterisk runs as asterisk user. So I change the ownership.

I’m still getting this remaining error:


> [Feb 24 20:16:31] ERROR[9543] chan_woomera.c: cannot connect to {default} localhost/42420
> [Feb 24 20:16:31] NOTICE[9543] chan_woomera.c: Woomera {default} Cannot Reconnect! retry in 5 seconds...

Apparently, the hack is to add this line to "/etc/asterisk/modules.conf:


noload => chan_woomera.so

(http://fonality.com/trixbox/node/40653)


Cheers / Saludos
Carlos E. R.

On 2012-02-24 19:59, Carlos E. R. wrote:
> Hi,
>
> Does any body know of a guide for dummies on how to install/config/use
> asterisk in openSUSE?

I found a very good book, from O’Reilly, also available online at

<http://www.asteriskdocs.org/>

. It would print in more than
500 pages, so it covers a lot of stuff. Nice layout.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)