autodial not working split server scenario

All installation and configuration problems and questions

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

autodial not working split server scenario

Postby hotdog0627 » Sat Mar 10, 2007 6:29 pm

I have one box w/ Apache and MySQL. Another box has asterisk.

on a manual campaign, all is fine. but when I change it to autodial, it just wont dial out.

what do I have to check to troubleshoot?
what needs to be installed in both boxes? cron entries? perl scripts?
do I have to change the 127.0.0.1 FastAgi entry on the dialplan to the IP of the MySQL server?

Also, when I look at the Realtime screen, the Extension I used for the autodial is listed twice...

any help is appreciated.

Thanks
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby mflorell » Sun Mar 11, 2007 10:29 pm

Install everything on the Asterisk server, and only the web pages and database on the other box. Use 127.0.0.1 for FastAGI and make sure it is selected when you run the install script.

Can you post the output of "screen -r " on your Asterisk server?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby hotdog0627 » Mon Mar 12, 2007 2:06 pm

when I type screen -r

its telling me no screen to resume...
I've added the necessary tasks in cron, but Im dumbfounded why those scripts are running in the background. (I even tried verifying if cron is executing... and it is)
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 2:13 pm

is crond running in startup?
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 2:40 pm

hmmm
sorry Im a linux newbie...

I did verify that cron was executing. I added a small task to write a file on a certain directory.

but, just to make sure.. how do I verify crond is running? (will google for it also)

thanks.
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 2:43 pm

what Distro are you running try typing

/etc/init.d/crond status
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 2:50 pm

CentOS4

yep its running

[root@server40 ~]# /etc/init.d/crond status
crond (pid 25355 2123) is running...
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 3:03 pm

whats in your "crontab -e"
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 3:06 pm

### recording mixing for Asterisk run every 5 minutes
1,6,11,16,21,26,31,36,41,46,51,56 * * * 1,2,3,4,5,6 /usr/share/astguiclient/AST_CRON_mix_recordings_BASIC.pl

### keepalive script for astguiclient processes
* * * * * /usr/share/astguiclient/ADMIN_keepalive_ALL.pl

### kill Hangup script for Asterisk updaters
* * * * * /usr/share/astguiclient/AST_manager_kill_hung_congested.pl

### updater for voicemail
* * * * * /usr/share/astguiclient/AST_vm_update.pl

### updater for conference validator
* * * * * /usr/share/astguiclient/AST_conf_update.pl

### flush queue DB table every hour for entries older than 1 hour
11 * * * * /usr/share/astguiclient/AST_flush_DBqueue.pl -q

### fix the vicidial_agent_log once every hour
33 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl

### updater for VICIDIAL hopper
* * * * * /usr/share/astguiclient/AST_VDhopper.pl -q

### adjust the GMT offset for the leads in the vicidial_list table
1 1 * * * /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl --debug

### reset several temporary-info tables in the database
2 1 * * * /usr/share/astguiclient/AST_reset_mysql_vars.pl

### optimize the database tables within the asterisk database
3 1 * * * /usr/share/astguiclient/AST_DB_optimize.pl

## adjust time on the server with ntp
30 * * * * /usr/local/bin/ntpdate -u 18.145.0.30 2>/dev/null 1>&2

### VICIDIAL agent time log weekly summary report generation
2 0 * * 0 /usr/share/astguiclient/AST_agent_week.pl

### test to see if cron is running for root
* * * * * rm /home/mbagley/tmp/* > /home/mbagley/cronlogs/clean_tmp_dir.log
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 3:25 pm

as root type mail see if you are receiving mail with any errors etc..
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 3:59 pm

i see some errors that DBI cant connect to the MySQL server.

How do I manualy check if the perl scripts can actually connect to the db?

thanks enjay... you're a big help... :)
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 4:03 pm

confirm that your mysql service is running on the database server

you should be able to do /etc/init.d/mysqld status (on the database server)

additionally using the username and password for the database server in your /etc/astguiclient.conf file you can type

mysql -u username_from_file -p -h ip_address_of_db_server

it will then prompt you for a password and use the password from the file..
if it cannot connect that is your problem.

i.e. either the database server is not running or the username/password is not accepted. You can find the solution to that in the scratch install where you are supposed to GRANT PRIVILEGE for that user..

-Art
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 4:17 pm

/etc/init.d/mysqld status
-bash: /etc/init.d/mysqld: No such file or directory

I know its running. coz I connect to it w/ an XP box, using MySQLfront and I can read the dbs.

I can also ping the mysql server from the asterisk server too. and I can login to the MySQL server from the Asterisk machine.

I gotta test the perl installation. how do i do that?
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 4:27 pm

paste the exact error from the mail you may be missing perl mods..
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 4:29 pm

DBI connect('asterisk:xxx.xxx.xxx.xxx:3306','cron',...) failed: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111) at /usr/share/astguiclient/AST_conf_update.pl line 121
Couldn't connect to database: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111) at /usr/share/astguiclient/AST_conf_update.pl line 121.
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 4:38 pm

make sure the configuration of /etc/astguiclient.conf is correct. Make sure it has the right IP address of the server etc.. You tested the mysql -u username -p -h hostname and it worked fine?
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 4:57 pm

yes. the ipservers are correct on the astguiclient.conf.
yes I tried from a mysql client to connect specifying IP, port, username, and pass.. and the connection was successful.
I need to test the perl scripts.
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 5:09 pm

just manually run it then type

perl /usr/share/astguiclient/scriptname.pl
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 5:16 pm

how do i check output?

i ran
[root@server40 ~]# perl /usr/share/astguiclient/AST_conf_update.pl
[root@server40 ~]#


and that's it...
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 5:20 pm

well first off identify WHAT script is failing that should be shown in the mail subject line then try to execute THAT script.
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 5:35 pm

this one:

Couldn't connect to database: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111) at /usr/share/astguiclient/AST_conf_update.pl line 121.

as well as the other scripts that should be present when you do a screen -r.
I get a "there are no scripts to be resumed". Crond is running.
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 5:39 pm

that is not a script, that is the output FROM a script, identify what script is spitting that out. It should be in the subject line of the mail..

The reason why no screens are there to be resumed is because they cannot start because they cannot connect to the mysql server.
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 5:43 pm

Here's a copy of one of the emails.

Message 60:
From root@server40.firstrate.com Fri Mar 9 22:00:13 2007
Date: Fri, 9 Mar 2007 22:00:10 -0600
From: root@server40.com (Cron Daemon)
To: root@server40.com
Subject: Cron <root@server40> /usr/share/astguiclient/AST_conf_update.pl
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

DBI connect('asterisk:xxx.xxx.xxx.xxx:3306','cron',...) failed: Can't connect to MySQL server on 'x.x.x.x' (110) at /usr/share/astguiclient/AST_conf_update.pl line 121
Couldn't connect to database: Can't connect to MySQL server on 'x.x.x.x' (110) at /usr/share/astguiclient/AST_conf_update.pl line 121.
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 6:48 pm

so try running /usr/share/astguiclient/AST_conf_update.pl -debug
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 6:51 pm

[root@server40 ~]# /usr/share/astguiclient/AST_conf_update.pl -debug
-- DEBUGGING ENABLED --

|SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context FROM servers where server_ip = '72.51.39.209';|
|SELECT extension,conf_exten from conferences where server_ip='72.51.39.209' and extension is NOT NULL and extension != '';|
||Action: Command
Command: Meetme list

Action: Ping

|
|Response: Follows
|
|Privilege: Command
|
|Usage: meetme (un)lock|(un)mute|kick|list <confno> <usernumber>
|
| Executes a command for the conference or on a conferee
|
|--END COMMAND--
|
|
|
Meetme list - Exten:|| Empty:|0| CONFERENCE STILL HAS PARTICIPANTS, DOING NOTHING FOR THIS CONFERENCE
DONE... Exiting... Goodbye... See you later...

seems like its running...
will try the others
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby hotdog0627 » Mon Mar 12, 2007 7:03 pm

[root@server40 ~]# /usr/share/astguiclient/ADMIN_keepalive_ALL.pl -DEBUG
X in active_keepalives, exiting...

[root@server40 ~]# /usr/share/astguiclient/AST_manager_kill_hung_congested.pl -DEBUG
DONE... Exiting... Goodbye... See you later...

/usr/share/astguiclient/AST_vm_update.pl -DEBUG
|SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context FROM servers where server_ip = '72.51.39.209';|
|SELECT extension,voicemail_id,messages,old_messages from phones where server_ip='72.51.39.209'|
MailboxCount- 2001 NEW:|0| OLD:|0| MESSAGE COUNT UNCHANGED, DOING NOTHING FOR THIS MAILBOX
MailboxCount- 2111 NEW:|0| OLD:|0| MESSAGE COUNT UNCHANGED, DOING NOTHING FOR THIS MAILBOX
MailboxCount- 2112 NEW:|0| OLD:|0| MESSAGE COUNT UNCHANGED, DOING NOTHING FOR THIS MAILBOX

.. goes on up to 2193


/usr/share/astguiclient/AST_flush_DBqueue.pl -DEBUG
TEST

NOW DATETIME: 2007-03-12 18:55:41
1 HOUR AGO DATETIME: 2007-03-12 17:55:41

- vicidial_manager flush
|asterisk.vicidial_manager|optimize|status|Table is already up to date|
- optimize vicidial_manager
|asterisk.vicidial_live_agents|optimize|status|Table is already up to date|
- optimize vicidial_live_agents
|asterisk.vicidial_auto_calls|optimize|status|Table is already up to date|
- optimize vicidial_auto_calls
|asterisk.vicidial_hopper|optimize|status|Table is already up to date|
- optimize vicidial_hopper



/usr/share/astguiclient/AST_cleanup_agent_log.pl -DEBUG

----- DEBUGGING -----

- cleaning up pause time
Pause times fixed: 0
- cleaning up wait time
Wait times fixed: 0
- cleaning up talk time
Talk times fixed: 0
- cleaning up dispo time
Bad Dispo times zeroed out: 0E0

DONE


/usr/share/astguiclient/AST_reset_mysql_vars.pl -DEBUG
- conferences reset
- vicidial_conferences reset
- vicidial_manager delete
- vicidial_auto_calls delete
- vicidial_live_agents delete
- vicidial__users delete
- vicidial_campaign_server_stats delete
- vicidial_hopper delete



====================
All seems to be fine... and seem to connect...
I really appreciate hanging on w/ me enjay...
I hope I am not keeping you from something.
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 7:07 pm

are the mails still coming in saying could not connect? can I get access to this system remotely?
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah

Postby hotdog0627 » Mon Mar 12, 2007 7:17 pm

hmmm...
now I dont think so... but my screen -r is still empty.
hotdog0627
 
Posts: 58
Joined: Tue Feb 20, 2007 2:10 pm

Postby enjay » Mon Mar 12, 2007 7:50 pm

This problem was resolved so for future reference:

The issue was the /etc/astguiclient.conf file

The mistake was
VARactive_keepalives => 1234X6X

The X's are not to be used in this string, only if NO keepalive scripts should be running there should be a solitary X

i.e. : VARactive_keepalives => X

The resolution was to replace that with

VARactive_keepalives => 12346

-Art
enjay
 
Posts: 806
Joined: Mon Jun 19, 2006 12:40 pm
Location: Utah


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 86 guests