Calls disconnect on telnet not connecting (Vicibox 9.0.1)

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Calls disconnect on telnet not connecting (Vicibox 9.0.1)

Postby n00b_ast » Fri Jul 17, 2020 11:35 am

Hello there.

I'm new to vicidial and asterisk technology and i'm facing some problems. I hope that i'll be as clear as possible with the explanation so you'll have it easier to help me.

First things first.
We have two servers installed on a VMware in the cloud that works as loadbalancers. One is fully installed vicibox-9.0.1 DB/Asterisk/Web
and the second has the same vicibox version 9.0.1 but it has only asterisk on it.

Server specs:
Srv 1 (with fully vicidial installed):
---------------------------------------------
CPU: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz (4 cores)
RAM: 8GB
VERSION: 2.14-744a
BUILD: 200401-1448
ViciBox_v9.x86_64-9.0.1.iso
Install mode express

Srv 2 (asterisk only installed):
CPU: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz (2 cores)
RAM: 4GB
VERSION: 2.14-744a
BUILD: 200401-1448
ViciBox_v9.x86_64-9.0.1.iso
Install mode express

The number of agents logged in at peak time is around 25 agents.
The number of simultaneous calls is around 120 calls.
During the day in both servers (but not at the same time ofc) is shown this error log from time to time in the mailbox:

problem connecting to "localhost", port 5038: Connection refused at /usr/share/astguiclient/AST_conf_update.pl line 271

sometimes it shows this other error too:
problem connecting to "localhost", port 5038: Connection refused at /usr/share/astguiclient/AST_vm_update.pl line 222

The problem is that when these warning error occurs all the calls hangs up and at the agent screen appears a message telling,
There is a time synchronization problem.

I scheduled servers to reboot nightly with the hope that the error will disappear but without success.

I read that this maybe has to do with the /etc/asterisk/manager.conf so here is the content of the file in server1:
Code: Select all
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
timestampevents = yes

[cron]
secret = 1234
read = system,call,log,verbose,command,agent,user,originate
write = system,call,log,verbose,command,agent,user,originate

[updatecron]
secret = 1234
read = command,reporting
write = command,reporting

eventfilter=Event: CoreShowChannel


[listencron]
secret = 1234
read = system,call,log,verbose,command,agent,user,dtmf
write = command

eventfilter=Event: Shutdown
eventfilter=Event: DTMFBegin
eventfilter=Event: DTMFEnd
eventfilter=Event: NewCallerid
eventfilter=Event: Newstate
eventfilter=Event: Hangup
eventfilter=!Event: HangupRequest


[sendcron]
secret = 1234
read = command
write = system,call,log,verbose,command,agent,user,originate

[sipcron]
secret = 1234
read = call
write = command

eventfilter=Event: SIPInvite
eventfilter=Event: SIPResponse


Here is for the server2:
Code: Select all
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
timestampevents = yes

[cron]
secret = 1234
read = system,call,log,verbose,command,agent,user,originate
write = system,call,log,verbose,command,agent,user,originate

[updatecron]
secret = 1234
read = command,reporting
write = command,reporting

eventfilter=Event: CoreShowChannel


[listencron]
secret = 1234
read = system,call,log,verbose,command,agent,user,dtmf
write = command

eventfilter=Event: Shutdown
eventfilter=Event: DTMFBegin
eventfilter=Event: DTMFEnd
eventfilter=Event: NewCallerid
eventfilter=Event: Newstate
eventfilter=Event: Hangup
eventfilter=!Event: HangupRequest


[sendcron]
secret = 1234
read = command
write = system,call,log,verbose,command,agent,user,originate

[sipcron]
secret = 1234
read = call
write = command

eventfilter=Event: SIPInvite
eventfilter=Event: SIPResponse


Meanwhile this is the content of /etc/astguiclient.conf in server1:
Code: Select all
# /etc/astguiclient.conf - configuration elements for the astguiclient/vicidial package
# this is the astguiclient configuration file
# all comments will be lost if you run install.pl again

# Paths used by astGUIclient
PATHhome => /usr/share/astguiclient
PATHlogs => /var/log/astguiclient
PATHagi => /var/lib/asterisk/agi-bin
PATHweb => /srv/www/htdocs
PATHsounds => /var/lib/asterisk/sounds
PATHmonitor => /var/spool/asterisk/monitor
PATHDONEmonitor => /var/spool/asterisk/monitorDONE

# The IP address of this machine
VARserver_ip => X.X.X.X (main server address)

# Database connection information
VARDB_server => localhost
VARDB_database => asterisk
VARDB_user => cron
VARDB_pass => 1234
VARDB_custom_user => custom
VARDB_custom_pass => custom1234
VARDB_port => 3306

# Alpha-Numeric list of the astGUIclient processes to be kept running
# (value should be listing of characters with no spaces: 1234568)
#  X - NO KEEPALIVE PROCESSES (use only if you want none to be keepalive)
#  1 - AST_update
#  2 - AST_send_listen
#  3 - AST_VDauto_dial
#  4 - AST_VDremote_agents
#  5 - AST_VDadapt (If multi-server system, this must only be on one server)
#  6 - FastAGI_log
#  7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)
#  8 - ip_relay (used for blind agent monitoring)
#  9 - Timeclock auto logout, (If multi-server system, this must only be on one server)
#  E - Email processor, (If multi-server system, this must only be on one server)
#  S - SIP Logger (Patched Asterisk 13 required)
VARactive_keepalives => 123456789E

# Asterisk version VICIDIAL is installed for
VARasterisk_version => 13

# FTP recording archive connection information
VARFTP_host => 10.0.0.4
VARFTP_user => cron
VARFTP_pass => test
VARFTP_port => 21
VARFTP_dir => RECORDINGS
VARHTTP_path => http://10.0.0.4

# REPORT server connection information
VARREPORT_host => 10.0.0.4
VARREPORT_user => cron
VARREPORT_pass => test
VARREPORT_port => 21
VARREPORT_dir => REPORTS

# Settings for FastAGI logging server
VARfastagi_log_min_servers => 3
VARfastagi_log_max_servers => 16
VARfastagi_log_min_spare_servers => 2
VARfastagi_log_max_spare_servers => 8
VARfastagi_log_max_requests => 1000
VARfastagi_log_checkfordead => 30
VARfastagi_log_checkforwait => 60

# Expected DB Schema version for this install
ExpectedDBSchema => 1589



and here is the content of /etc/astguiclient.conf in server2 (dialer):
Code: Select all
# /etc/astguiclient.conf - configuration elements for the astguiclient/vicidial package
# this is the astguiclient configuration file
# all comments will be lost if you run install.pl again

# Paths used by astGUIclient
PATHhome => /usr/share/astguiclient
PATHlogs => /var/log/astguiclient
PATHagi => /var/lib/asterisk/agi-bin
PATHweb => /srv/www/htdocs
PATHsounds => /var/lib/asterisk/sounds
PATHmonitor => /var/spool/asterisk/monitor
PATHDONEmonitor => /var/spool/asterisk/monitorDONE

# The IP address of this machine
VARserver_ip => X.X.X.X (Dialer server Ip address)

# Database connection information
VARDB_server => X.X.X.X (main server ip address)
VARDB_database => asterisk
VARDB_user => cron
VARDB_pass => 1234
VARDB_custom_user => custom
VARDB_custom_pass => custom1234
VARDB_port => 3306

# Alpha-Numeric list of the astGUIclient processes to be kept running
# (value should be listing of characters with no spaces: 1234568)
#  X - NO KEEPALIVE PROCESSES (use only if you want none to be keepalive)
#  1 - AST_update
#  2 - AST_send_listen
#  3 - AST_VDauto_dial
#  4 - AST_VDremote_agents
#  5 - AST_VDadapt (If multi-server system, this must only be on one server)
#  6 - FastAGI_log
#  7 - AST_VDauto_dial_FILL (only for multi-server, this must only be on one server)
#  8 - ip_relay (used for blind agent monitoring)
#  9 - Timeclock auto logout, (If multi-server system, this must only be on one server)
#  E - Email processor, (If multi-server system, this must only be on one server)
#  S - SIP Logger (Patched Asterisk 13 required)
VARactive_keepalives => 123468

# Asterisk version VICIDIAL is installed for
VARasterisk_version => 13

# FTP recording archive connection information
VARFTP_host => 10.0.0.4
VARFTP_user => cron
VARFTP_pass => test
VARFTP_port => 21
VARFTP_dir => RECORDINGS
VARHTTP_path => http://10.0.0.4

# REPORT server connection information
VARREPORT_host => 10.0.0.4
VARREPORT_user => cron
VARREPORT_pass => test
VARREPORT_port => 21
VARREPORT_dir => REPORTS

# Settings for FastAGI logging server
VARfastagi_log_min_servers => 3
VARfastagi_log_max_servers => 16
VARfastagi_log_min_spare_servers => 2
VARfastagi_log_max_spare_servers => 8
VARfastagi_log_max_requests => 1000
VARfastagi_log_checkfordead => 30
VARfastagi_log_checkforwait => 60

# Expected DB Schema version for this install
ExpectedDBSchema => 1589



Hope that you'll respond as soon as possible because the problem is very frustrating and cause us lots of lose
Thanks in advance!
Last edited by n00b_ast on Fri Jul 24, 2020 4:06 am, edited 1 time in total.
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Fri Jul 17, 2020 1:03 pm

do you have localhost set in /etc/hosts ? try to run /usr/share/astguiclient/AST_conf_update.pl --debugX
and report back what u get for me
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Sat Jul 18, 2020 3:16 am

Thanks for the reply
Here is how it looks like the output of the debug when the connection is refused:

Code: Select all
problem connecting to "localhost", port 5038: Connection refused at /usr/share/astguiclient/AST_conf_update.pl line 271

-- DEBUGGING ENABLED --

|SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context,vicidial_recording_limit,asterisk_version FROM servers where server_ip = 'X.X.X.X';|
|SELECT conf_exten,extension from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1' and leave_3way_datetime < "2020-07-18 09:02:01";|
|SELECT extension,conf_exten from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1';|


And here is the debug output when the connection is made correctly
Code: Select all
|SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vic
idial_trunks,answer_transfer_agent,local_gmt,ext_context,vicidial_recording_limit,asterisk_version FROM servers where server_ip
= 'X.X.X.X';|
|SELECT conf_exten,extension from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1' and leave_3way_datetime <
"2020-07-18 09:01:01";|
|SELECT extension,conf_exten from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1';|
----- AMI Version 2.10.5 -----
|SELECT extension,conf_exten from conferences where server_ip='X.X.X.X' and extension is NOT NULL and extension != '';|
----- AMI Version 2.10.5 -----
DONE... Exiting... Goodbye... See you later...


And yes the localhost is set in /etc/hosts

Does this issue has to do with some kind of server overloading.. (but still, there are only 20 agents logged in right now with 110 calls simultaneously)
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Sat Jul 18, 2020 3:40 am

can u telnet to localhost 5038 using credentials cron and 1234 ? try it. on both servers....
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Sat Jul 18, 2020 5:08 am

when i run the command

telnet -l cron localhost 5038 it shows this output:
Code: Select all
Trying ::1...                                                                                                         
telnet: connect to address ::1: Connection refused       
Trying 127.0.0.1...           
Connected to localhost.                                                                                               
Escape character is '^]'.                                                                                               
Asterisk Call Manager/2.10.5


But i repeat that the connection works mostly but its in a rate of 10 minutes it can fail once or in a rate of 30 minutes it can fail once.
As i mention above its problematic cause it may happen in the middle of the call with a customer and it immediately hangs up all the calls.
For what i know this wasn't the comportment of asterisk at vicibox 8.x or maybe im wrong.
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Sat Jul 18, 2020 5:14 am

virtual servers can cause buggy issues like that, especially with 25 agents.
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Sat Jul 18, 2020 5:25 am

Funny thing is that we run different servers for different campaigns and these two are the only ones causing this issue, and is the only one that we installed vicibox-9.0.1 on them.
The strange thing is that other servers that we have run on vmware too with vicibox-8.0.0 installed on them and don't have these problems, plus they do heavier work than these two.
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Sat Jul 18, 2020 5:27 am

try upgrading to 9.0.3 ? run a svn upgrade if u dont want to reinstall with 9.0.3, that may fix it
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Sat Jul 18, 2020 5:46 am

is it difficult, i mean never done it before.
So the command that i should execute is just svn upgrade?
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Sat Jul 18, 2020 5:56 am

Code: Select all
cd /usr/src/asterisk
svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk
mysql -p -f --database=asterisk < /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql
cd /usr/src/asterisk/trunk
perl install.pl


then follow the prompts, nothing should change during those since u have em set already.....
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Sat Jul 18, 2020 6:15 am

carpenox
You are the man, thanks a lot. I'll try it and I'll tell you about the result, maybe someone else needs the same solution.
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Sat Jul 18, 2020 6:26 am

np but don't get excited yet, because i dont think thats the issue, usually it has to do with manager.conf but yours looks correct so i dunno, hopefully the upgrade fixes it
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Sun Jul 19, 2020 12:18 pm

carpenox wrote:np but don't get excited yet, because i dont think thats the issue, usually it has to do with manager.conf but yours looks correct so i dunno, hopefully the upgrade fixes it


Now that im thinking, because i was not so concentrated at the first time when i saw your reply about how the svn upgrade is done.. It says that i should flush all the asterisk DB right and implement the new asterisk db structure of version 9.0.3. So first i should do a backup of some important tables like agents data, the campaigns, the vicidial_list, vicidial_lists and the vicidial_log, recording_log and all other stuff and with any luck i will export them if the new tables structure of the asterisk db match with the previews one.

Its strange why in some cases perl scripts can't connect with localhost through telnet, are there any kind of steps to find what really cause this issue. Wouldn't be nice if in the future the vicidial folks puts some kind of fail/try loop and if it fails try it again, since it seems that mostly the telnet connection is made but on some cases, sometimes it isn't made.
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Sun Jul 19, 2020 1:11 pm

You are getting that error because it is being run through crontab, depending which script it may run every minute up to whatever length of time. Are you experiencing any problems from it? If you are making calls without issue it could just be your getting those messages when it CANT send but then it eventually goes through. Those particular two are for conferences which if your making calls, which connects the agent to the live call through a conference of meetme, then that one isnt causing problems. You would NOT be able to make calls if that didnt work. As far as the Voicemail one, is checking to see if your extensions have voicemails in them. You can check if they work with the below


Run them this way from the cli of your server. not asterisk cli:

/usr/share/astguiclient/AST_conf_update.pl --debugX

/usr/share/astguiclient/AST_vm_update.pl --debugX
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Mon Jul 20, 2020 3:19 am

Yeah i know that it runs every minute triggered by the cronjob and yes when the problem occurs it disconnects all calls immediately showing on the agent side a message There is a time synchronization problem and on server side shows in the mail messages that it couldn't connect to port 5038.
But now that I'm thinking.. what about maybe that error of port 5038 that complains that can't connect through it.. is just a side effect of the problem and not the real issue???
The asterisk doesn't show any sign of going down or something to blame asterisk.

P.S i run /usr/share/astguiclient/AST_conf_update.pl --debugX and i wrote above the output and for what i saw it doesn't show any helpful message that can address me to the solution
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Mon Jul 20, 2020 8:59 am

run a sockets check: screen -ls
and show me the output. You ran debugX or just debug? That isnt the correct output it should of given with debugX.
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Mon Jul 20, 2020 11:30 am

The screens looks okay i think:

Server1 (DB/Asterisk/WEB)
---------------------------------------------
Code: Select all
There are screens on:
   27238.ASTVDremote   (Detached)
   27235.ASTVDauto   (Detached)
   27232.ASTlisten   (Detached)
   27229.ASTsend   (Detached)
   27226.ASTupdate   (Detached)
   2491.ASTemail   (Detached)
   2484.ASTVDadFILL   (Detached)
   2481.ASTfastlog   (Detached)
   2477.ASTVDadapt   (Detached)
   2300.asterisk   (Detached)
   2295.astshell20200720063132   (Detached)
11 Sockets in /run/screens/S-root.


Server2 (Dialer)
---------------------------------------------
Code: Select all
There are screens on:
   2347.ASTfastlog   (Detached)
   2339.ASTVDremote   (Detached)
   2336.ASTVDauto   (Detached)
   2333.ASTlisten   (Detached)
   2330.ASTsend   (Detached)
   2327.ASTupdate   (Detached)
   2171.asterisk   (Detached)
   2166.astshell20200720064220   (Detached)
8 Sockets in /run/screens/S-root.


As for the debug output, both version of flags shows the same output..

./AST_conf_update.pl -debug
Code: Select all
-- DEBUGGING ENABLED --

|SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context,vicidial_recording_limit,asterisk_version FROM servers where server_ip = 'X.X.X.X';|
|SELECT conf_exten,extension from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1' and leave_3way_datetime < "2020-07-20 17:18:53";|
|SELECT extension,conf_exten from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1';|
----- AMI Version 2.10.5 -----
|SELECT extension,conf_exten from conferences where server_ip='X.X.X.X' and extension is NOT NULL and extension != '';|
----- AMI Version 2.10.5 -----
DONE... Exiting... Goodbye... See you later...


./AST_conf_update.pl --debugX
Code: Select all
-- DEBUGGING ENABLED --

|SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context,vicidial_recording_limit,asterisk_version FROM servers where server_ip = 'X.X.X.X';|
|SELECT conf_exten,extension from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1' and leave_3way_datetime < "2020-07-20 17:18:41";|
|SELECT extension,conf_exten from vicidial_conferences where server_ip='X.X.X.X' and leave_3way='1';|
----- AMI Version 2.10.5 -----
|SELECT extension,conf_exten from conferences where server_ip='X.X.X.X' and extension is NOT NULL and extension != '';|
----- AMI Version 2.10.5 -----
DONE... Exiting... Goodbye... See you later...




when I run nano AST_conf_update.pl it doesn't shows in any part that has two kind of output set up flag for -debug or --debugX
Code: Select all
### begin parsing run-time options ###
if (length($ARGV[0])>1)
        {
        $i=0;
        while ($#ARGV >= $i)
                {
                $args = "$args $ARGV[$i]";
                $i++;
                }

        if ($args =~ /--help/i)
                {
                print "allowed run time options:\n";
                print "  [-t] = test\n";
                print "  [-debug] = verbose debug messages\n";
                print "  [--no-vc-3way-check] = separate 3way script is running\n";
                print "\n";
                exit;
                }
        else
                {
                if ($args =~ /-debug/i)
                        {
                        $DB=1; # Debug flag
                        print "-- DEBUGGING ENABLED --\n\n";
                        }
                if ($args =~ /-no-vc-3way-check/i)
                        {
                        $no_vc_3way_check=1; # no 3way check flag
                        if ($DB > 0) {print "-- NO VC 3way check flag ENABLED --\n\n";}
                        }
                if ($args =~ /-t/i)
                        {
                        $TEST=1;
                        $T=1;
                        }
                }
        }
else
        {
        #       print "no command line options set\n";
        }
### end parsing run-time options ###


anyway i did something else with the hope that it will give me any clue. Reading through the code i found this part
Code: Select all
$LItelnetlog = "$PATHlogs/listen_telnet_log.txt";  # uncomment for telnet log
$fh = $t->dump_log("$LItelnetlog");  # uncomment for telnet log


I uncommented them and I'm waiting for the problem to occur again so it will create this listen_telnet_log.txt file.
Thanks again for your patience man!

Update:
Its the AST_vm_update.pl that has that extra verbose debug messages.
I was so concern about AST_conf_update.pl that i forgot completely about the other perl file
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Wed Jul 22, 2020 6:38 am

When the problem occurs i noticed that these two lines of code:
Code: Select all
$LItelnetlog = "$PATHlogs/listen_telnet_log.txt";  # uncomment for telnet log
$fh = $t->dump_log("$LItelnetlog");  # uncomment for telnet log

create just an empty file without any debugging text.

Any other suggestion???
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Wed Jul 22, 2020 10:02 pm

is the file writable? did u set correct permission files for that text file? chmod +x ?
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: "localhost", port 5038: Connection refused

Postby n00b_ast » Thu Jul 23, 2020 5:17 am

If you are talking about listen_telnet_log.txt it writes logs in it when the script works properly and the output is like this
Code: Select all
< 0x00000: 41 73 74 65  72 69 73 6b  20 43 61 6c  6c 20 4d 61  Asterisk Call Ma
< 0x00010: 6e 61 67 65  72 2f 32 2e  31 30 2e 35  0d 0a        nager/2.10.5..

> 0x00000: 41 63 74 69  6f 6e 3a 20  4c 6f 67 69  6e 0d 0a 55  Action: Login..U
> 0x00010: 73 65 72 6e  61 6d 65 3a  20 73 65 6e  64 63 72 6f  sername: sendcro
> 0x00020: 6e 0d 0a 53  65 63 72 65  74 3a 20 31  32 33 34 0d  n..Secret: 1234.
> 0x00030: 0a 0d 0a                                            ...

< 0x00000: 52 65 73 70  6f 6e 73 65  3a 20 53 75  63 63 65 73  Response: Succes
< 0x00010: 73 0d 0a 4d  65 73 73 61  67 65 3a 20  41 75 74 68  s..Message: Auth
< 0x00020: 65 6e 74 69  63 61 74 69  6f 6e 20 61  63 63 65 70  entication accep
< 0x00030: 74 65 64 0d  0a 0d 0a                               ted....

> 0x00000: 41 63 74 69  6f 6e 3a 20  4c 6f 67 6f  66 66 0d 0a  Action: Logoff..
> 0x00010: 0d 0a 0d 0a  0d 0a                                  ......

< 0x00000: 52 65 73 70  6f 6e 73 65  3a 20 47 6f  6f 64 62 79  Response: Goodby
< 0x00010: 65 0d 0a 4d  65 73 73 61  67 65 3a 20  54 68 61 6e  e..Message: Than
< 0x00020: 6b 73 20 66  6f 72 20 61  6c 6c 20 74  68 65 20 66  ks for all the f
< 0x00030: 69 73 68 2e  0d 0a 0d 0a                            ish.....


so it means that is writable but it fails to write a dump_log when the connection is refused because it has nothing to write maybe.
I'm so fed up with this problem, i don't get why mflorell or williamconley aren't noticing this problem that i brought up in the forum, maybe it seems like something unimportant for them when they see this kind of title "localhost, port 5038: Connection refused" that i used for the post.

P.s no offense, thanks for the support!!
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: "localhost", port 5038: Connection refused

Postby carpenox » Thu Jul 23, 2020 8:28 am

edit the topic to "calls disconnect on telnet not connecting" or something like that
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Calls disconnect on telnet not connecting (Vicibox 9.0.1

Postby n00b_ast » Sat Jul 25, 2020 3:51 am

Look i noticed something right now..
In fact you were right, its not about the telnet or script problem.
When the calls disconnected and the message There is a time synchronization problem appeared in the agents interface, i checked it immediately and saw that the screens at that specific moment where:
Code: Select all
There are screens on:
   2511.ASTemail
   2504.ASTVDadFILL
   2500.ASTfastlog
   2497.ASTVDadapt
   2309.asterisk
   2994.astshell
6 Sockets in /run/screens/S-root


So according to you, what would be the reason that at some point some screens break?
Thanks in advance.
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: Calls disconnect on telnet not connecting (Vicibox 9.0.1

Postby carpenox » Sat Jul 25, 2020 8:58 am

your listen and send sockets rent running which is based off manager.conf settings

here is an example of working manager.conf file - just change your passwords accordingly:

Code: Select all
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0
timestampevents = yes

[cron]
secret = 1234
read = system,call,log,verbose,command,agent,user,originate
write = system,call,log,verbose,command,agent,user,originate

[updatecron]
secret = 1234
read = command,reporting
write = command,reporting

eventfilter=Event: CoreShowChannel


[listencron]
secret = 1234
read = system,call,log,verbose,command,agent,user,dtmf
write = command

eventfilter=Event: Shutdown
eventfilter=Event: DTMFBegin
eventfilter=Event: DTMFEnd
eventfilter=Event: NewCallerid
eventfilter=Event: Newstate
eventfilter=Event: Hangup
eventfilter=!Event: HangupRequest


[sendcron]
secret = 1234
read = command
write = system,call,log,verbose,command,agent,user,originate

[sipcron]
secret = 1234
read = call
write = command

eventfilter=Event: SIPInvite
eventfilter=Event: SIPResponse
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Calls disconnect on telnet not connecting (Vicibox 9.0.1

Postby n00b_ast » Mon Jul 27, 2020 4:41 pm

I dont know if i understand you correctly but if the password is incorrect it wouldn't load all the screens right?
Most of the time screens are loaded correctly all 11 of them, but during the work at some point some of them breaks and they goes from 11 to 5 or 6.
After a minute or two the cronjob loads them again correctly.

What would be the reason why they break at some point cuz I dont think that it has something to do with the misconfiguration of manager.conf
n00b_ast
 
Posts: 13
Joined: Thu Jul 16, 2020 12:23 pm

Re: Calls disconnect on telnet not connecting (Vicibox 9.0.1

Postby Saurav » Mon Feb 15, 2021 7:39 am

When trying to make CURL request on non_agent_api , it works fine on localhost . But it doesnt work on server . Please help , i dont understand what is the exact issue, it says Connection Refused
Saurav
 
Posts: 4
Joined: Fri Jan 29, 2021 6:21 am


Return to Support

Who is online

Users browsing this forum: No registered users and 109 guests