Once again ... can not connect asterisk, tried a lot, nope ... :-(

Hello @all,

i have been reading a lot of helps/hints in this forum, all other places in the www.
But none of a solution fits for my problem.

I compiled a on

$lsb_release

Distributor ID: Debian
Description: Debian GNU/Linux 8.10 (jessie)
Release: 8.10
Codename: jessie

$uname -a
Linux XXXX 3.16.0-4-amd64 #1 SMP Debian 3.16.51-3 (2017-12-13) x86_64 GNU/Linux

$asterisk -rvvvv

Asterisk certified/13.21-cert2, Copyright © 1999 - 2014, Digium, Inc. and others.
---- no links allowed for new users
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.

Running as user ‘asterisk’
Running under group ‘asterisk’
Connected to Asterisk certified/13.21-cert2 currently running on XXXX (pid = 6468)

As you see, not running as root.

###########################
/etc/asterisk/manager.conf

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
displayconnects=no ;only effects 1.6+

[admin]
secret =xxxxxxxxxxxxxxxxxxxxxxxxxxx
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
permit=192.168.XXX.0/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate,message
writetimeout = 5000

;include manager_additional.conf
;include manager_custom.conf
###########################

/etc/amportal.conf

Asterisk Manager Password

Default Value: amp111

AMPMGRPASS=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Asterisk Manager User

Default Value: admin

AMPMGRUSER=admin

Asterisk Manager Host

Default Value: localhost

ASTMANAGERHOST=localhost

Asterisk Manager Port

Default Value: 5038

ASTMANAGERPORT=5038
###########################

/etc/freepbx.conf

<?php $amp_conf['AMPDBUSER'] = 'freepbxuser'; $amp_conf['AMPDBPASS'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxx'; $amp_conf['AMPDBHOST'] = 'localhost'; $amp_conf['AMPDBNAME'] = 'asterisk'; $amp_conf['AMPDBENGINE'] = 'mysql'; $amp_conf['datasource'] = ''; //for sqlite3 require_once('/var/www/html/admin/bootstrap.php'); ?>

Starting with
$fwconsole -vvv start

delivers
=>


Setting /bin/mydir to permissions of: 755
Setting /var/www/html/admin/modules/core/agi-bin/list-item-remove.php user owner to: asterisk
Setting /var/www/html/admin/modules/core/agi-bin user owner to: asterisk
Setting /var/www/html/admin/modules/recordings/agi-bin to permissions of: 755
Setting /var/www/html/admin/modules/recordings/agi-bin/recordings.agi to permissions of: 755
Setting /var/www/html/admin/modules/recordings/agi-bin/recordings.agi user owner to: asterisk
Setting /var/www/html/admin/modules/recordings/agi-bin user owner to: asterisk
Setting /etc/foo.bar to permissions of: 644
Setting /etc/mydir to permissions of: 755
Setting /tmp/foo/ to permissions of: 644
Setting /bin/mydir to permissions of: 755

Finished setting permissions
Starting Asterisk…
[------------->--------------] 41 mins
[-------------------->-------] 48 mins

I also did:

$mysql> select * from admin where variable = ‘version’;
±---------±--------+
| variable | value |
±---------±--------+
| version | 13.0.60 |
±---------±--------+
1 row in set (0.00 sec)

and

$fwconsole ma list | grep framework

| framework | 13.0.195.4 | Aktiviert | GPLv2+

and
netstat -tulpen | grep asterisk
=>
tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 130 32447 6468/asterisk
udp 0 0 0.0.0.0:5060 0.0.0.0:* 130 32457 6468/asterisk
udp 0 0 0.0.0.0:52865 0.0.0.0:* 130 33002 6468/asterisk
udp6 0 0 :::57590 :::* 130 33003 6468/asterisk

lsoflisten
=>

apache2/:443/TCP
apache2/
:8080/TCP
apache2/:80/TCP
apache2/
:8443/TCP
asterisk/:5038/TCP
cupsd/127.0.0.1:631/TCP
cupsd/[::1]:631/TCP
master/[::1]:25/TCP
master/127.0.0.1:25/TCP
mysqld/127.0.0.1:3306/TCP
postgres/127.0.0.1:5432/TCP
postgres/[::1]:5432/TCP
rpcbind/
:111/TCP
rpc.statd/:33027/TCP
rpc.statd/
:41669/TCP
sshd/:22/TCP
xrdp/
:3390/TCP
xrdp-sesm/127.0.0.1:3350/TCP
(---- no links allowed for new users =>, therefor no ., only _)
nslookup dns_quad9_net
=>
Server: 192.168.XXX.4
Address: 192.168.XXX.4#53

Non-authoritative answer:
(---- no links allowed for new users =>, therefor no ., only )
Name: dns_quad9_net
Address: 149.112.112.112
Name: dn
.quad9_net
Address: 9.9.9.9

also working.

Freepbx-Webgui ist very slow, one click triggers a long time nothing, then after this long time the gui delivers something, but (cause of no connect), it stands for it self.

/var/log/asterisk/freepbx.log
=>

[2018-Aug-22 03:03:42] [CRITICAL] (admin/bootstrap.php:258) - Connection attmempt to AMI failed
[2018-Aug-22 03:05:19] [CRITICAL] (admin/bootstrap.php:258) - Connection attmempt to AMI failed

I do not have any other logs; was looking for them with
$locate asterisk| grep .log
also for freepbx.

This machine is a kvm-machine on (also) debian without any hw-cards needed, only Lan/VOIP, no analog stuff, no (german) ISDN, pure voip, nothing complicated. :wink:

Do not know, what to do. Nope. :frowning: Appreciate any help.

What else could i deliver for any appreciated help to solve this problem, that FreepbxGUI can not connect to Asterisk, although asterisk is running.

Thanks in advance
ELindemann

Remove this. Why did you add it

Hi Andrew,

thanks for your reply.

It was a desperate try to allow all traffic from the LAN segment. XXX stands for 123.
i will delete this line and will report.

cu
ELindemann

… did it. no connect at all.
Also it takes a lot of time, that a page will be deliverd in my browser on the localsystem. After this long time i see the freepbx Webgui, but (after deleting the line you mentioned) no connect. :frowning:
Logging out of freepbx-gui takes also a lot of time. :frowning:
The i see Freepbx Administration/UCP/Get support, but after minutes.

What else should i check, deliver?

ELindemann

No help @all ?

ELindemann

OK, you posted a lot of configuration information, but most of it is completely unrelated to the problem you are having.

First, have you tried installing using the Distro - it will pre-solve a lot of problems you are going to have. This is especially true if you are new to Asterisk and FreePBX.

Second, start the system with “fwconsole start” instead of just starting Asterisk. This will make sure your execution environment is correct and make sure you are running everything as the right user.

Third, make sure your DNS setting are correct and that the firewall you are using allows you to access the outside world. Long wait times for responses from the system are often indications of a DNS issue.

Hi cynjut,

i also have new messages, the webgui (still not connected to asterisk) is right now fast. It was not a dns-problem.

I recompiled asterisk with

make clean (also cleanig up /usr/lib/asterisk/modules manually)
./configure --with-pjproject-bundled --with-crypto --with-ssl=ssl --with-srtp
–no errors–
make menuconfig
make menuselect (i did only run it, no selection at all)
make install
–no errors–

last step was:
make basic-pbx

this time, i checked in
/etc/asterisk/logger.conf
the log-level and switched
full = warning,error
on.

Whiles starting asterisk, it was yelling after some other config files, i put these one from a backup of

make samples - installation of these release on this machine before.

A lot of conf-files. Starting asterisk moretimes and after some min.s i had only few errors. But still the webgui will not connect to asterisk. :frowning:

I installed
Linux freepbx.domain.zz 3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9 18:05:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

maybe it is working ;-), but the webgui isolates me from the conf-files. And, the distri is not debian too. :frowning: I also have on this debain-system a fast davical-installation, CardDAV/CAL. Therefore i try to install asterisk on this machine.

Will try to start the system with fwconsole start, as you told.

Right know the problems are:
Still not connected webgui to asterisk

and
these

res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified

WARNING[22257] cdr_adaptive_odbc.c: No such connection ‘asteriskcdrdb’ in the ‘adaptive_connection’ section of cdr_adaptive_odbc.conf. Check res_odbc.conf

I think this is another problem, therefore i will open a new thread.

thx.
ELindemann

Don’t. This is all related to the same problem. You have not set the system up properly. That error tells you everything you need to know.

Clearly this is a manual install in which you have to go through and setup and configure all those wonderful things like ODBC, Postfix, MySQL, etc, etc because the Distro isn’t there to do it for you.

Hi BlazeStudios,

i am thinking too, that the system ist not setuped properly. realitas bites :wink:

You are right, the distri should do it for me too, but on the other hand, no learning @all, because maximum isolation. Then in the future, years later, i have to do an update, what will than happen, if the update brings the show to stop?
Then, this time it _is_a_real_productive_system, no time slots, cause 100/100 working, OK, i should have a backup for this moment. :wink:
As i told, no time-slots, to try the faulty update; the machine will working all the time. Therefore i need to know what asterisk doing, somehow.

You are absolutly right, it is a hard way, but being on the road, i hope i will learn. Also a lot of configuration templates in the Web are in ASCII/conf-files, better this way.

How do i get them in a customized form to/for my asterisk, if i only have the webgui?
Doing someting on the webgui will propably deletes all the add-on config i made manually?

Therefore, i want to learn to solve the problems in asterisk on the level of conf-flies. But it is a bloody, hard way. :wink:

thx
ELindemann

Therefore, i want to learn to solve the problems in asterisk on the level of conf-flies. But it is a bloody, hard way.

The other way to do this is to set up with a Distro the first time and explore the working system. I applaud your desire to understand, but you are trying to learn things about over 200 different pieces of software that make up a FreePBX install all at the same time. There are so many moving parts that getting them all to work at once is a lot of work.

My suggestion, then, is to set up a working system from the Distro and then try to build one by hand on your own with the Distro system as a benchmark. This way, you get the satisfaction of setting up everything so that it works, and then learning what needs to happen one lesson at a time.

Hi cynjut,

as you told me, i began months ago at the first shot with

Linux version 3.10.0-862.2.3.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Wed May 9 18:05:47 UTC 2018

This is the distri. Then getting in with ssh, i saw a lot of conf-files in /etc/asterisk.

But all this was in contrast what i was reading till now about asterisk in old/older versions. Right now, there is a change to pjsip.conf. Right? OK for me, but this is a new-land for me too.

Getting a production system on old (not this stable?) asterisk version on sip.conf etc or doing it right with pjsip for the future?
It is clear, that nobody wants a dead horse. :wink: I had to do that job in one/two year?
On the other side, new learning with pjsip.conf and the new structure behind it (aor etc, but i could use the wizard), it is hardcore. :wink:

Therefore i installed deb8.x with manually compiled certified/13.21-cert2.
As you advised -my idea was the same- i have a 100/100 full packaged distri, it should do all the config right (and also working too?). The only irritation i had, was the isolation by the webgui freepbx from /etc/asterisk/*.

I try to get deb8.x+certified/13.21-cert2 working, as a reference i have the distri above.
I know and see there is a lot of parts of asterisk working together.

@problems, i had.

After
re-editing odbc-files
and doing
fwconsole ma upgrade framework
(later this too:
fwconsole ma install sipsettings)

my status on deb8.x + certified/13.21-cert2 now is:

  • freepbxgui will contact asterisk (SOLVED)

  • freepbxgui reacts fast, (SOLVED)

    • can do some config, save, no errors in behaviour,
      (it modifies files, also odbc-files with old parameters, like
      pooling => no
      limit => 1
      asterisk himself tells better to use :wink: :wink: :wink:
      max_connections => 20
      ) etc
  • no errors except this one: (99/100 SOLVED)
    Error loading module 'res_pjsip_registrar_expire.so

res_pjsip_registrar_expire.c is in /usr/src/… but was not complied. The module is not there. How do i could get it compiled by a regular make run?

Although i am using latest/greatest (s. above, upgrade framework)

FW Console - FreePBX Utility version 13.0.195.13

freepbxgui greets me with a security warning about a tempered file, sure, i had to modify it, cause asterisk himself was telling me to use _X. no more _. in extension.conf.

Therefore i edited the /var/www/html/admin/modules/core/etc/extension.conf.
I tempered :slight_smile: this file, i think it is better wo work with _X. than _. ( cause all thing is possible with ., as i laerned, but why freepbx edits it back to. :-/).
Somehow it does NOT fit, what latest/greatest freepbx will do against asterisk advice. Crazy?

Thx.
ELindemann

Which will totally be overwritten the moment you update the Core module. You shouldn’t be modifying these things randomly. You are not an expert at this. You don’t understand the full implications of making random changes.

… once again, i am not an expert. I know that.
I think, you formely were not an expert?
And you did go on?

But what about this?
//
pbx_config.c: The use of ‘_.’ for an extension is strongly discouraged and can have unexpected behavior. Please use ‘_X.’ instead at line 128 of extensions.conf
//

I think, i should not ignore this warning, cause it is called WARNING. :wink:

ELindemann

‘X’ only matches digits, ‘.’ matches everything, there are many reasons in the real world that SIP conversations do not originate from purely “^[0-9]*” sources a prime example is the metadatic “^+.”, Asterisk was originally only designed for PSTN connections, that is no longer the case.

Correct, I wasn’t. So I didn’t start out with the “Only For Experts” part of it. I followed the official way of installing FreePBX. Back in the early days there wasn’t a distro but after the Distro you had to learn what the Distro did so you could setup all of the needed dependencies and libraries because you were doing it by hand.

As people have said before, if you are new to FreePBX install the Distro and learn how FreePBX works before trying to setup something by hand that is designed to “mimic” what the Distro does.

Hi dicko,

… matches everything,

this i was reading, reading etc., and it will allows a lot (forbidden, unwanted) things.

But the questions is, why the latest Freepbx(gui) (after an fwconsole upgrade) thinks, it is OK with _. ?

Thx.
ELindemann

Because there are plenty of other filters further on,

Because some of the contexts use names instead of numbers for things and the sections that have _. are more for when other parts of the dialplan that have non-numbers in the pattern need to match.

OK, you do know that, i think also dicko. It is a complex sw, only for experts(?), may be.
But, why asterisk complaints about this -all about the files- why does it not fit.

I think, cause it is dangerous, does not matter which file includes this _., it is just a placeholder; otherwise should be this not a warning, rather an info.

Freepbx configures with _., vs. asterisk complaints against _.

ELindemann

You get a warning, not an error, if you look through your logs there are likely many warnings, fixing every one would actually make you an expert :wink:

1 Like