Page 1 of 1

Call Times - not working

PostPosted: Wed Nov 25, 2009 2:07 pm
by roundqube
I just tried to change my Wednesday (todays) setting from 900 (9am) to 1400 (2pm). All calls up to and after 2pm are still being made.

I created a new call time named TEST and left the defaults 900 - 2100. Then for Wednesday I set 900 - 1400. For Thursday (Thanksgiving) I set 2400 - 2400 (disabled calling) and left the other days default 0 - 0.

Am I doing something wrong?

VERSION: 2.0.5-173
BUILD: 90320-0424

PostPosted: Wed Nov 25, 2009 3:59 pm
by mflorell
This is a LOCAL call time, not a server call time, do you have Pacific leads perhaps?

PostPosted: Wed Nov 25, 2009 4:06 pm
by roundqube
Ahh ok, I read the usage of it wrong. How do we stop Vicidial from allowing outbound calls during say 730pm tonight to 9am Friday morning?

Is this best handled through cron by stopping Asterisk and starting again at 9am?

PostPosted: Wed Nov 25, 2009 4:39 pm
by mflorell
You could just make sure your agents are logged out, or set all of your campaigns to active = N. There really shouldn't be any need to kill Asterisk

PostPosted: Wed Nov 25, 2009 4:50 pm
by roundqube
Problem is that I will not be around at 730pm to do this. I think I'm going to write a Perl script as follows:

#!/usr/bin/perl
use Mysql;

$host = "localhost";
$database = "vici_db";
$tablename = "vicidial_campaigns";
$user = "user";
$pw = "pass";

# PERL MYSQL CONNECT()
$connect = Mysql->connect($host, $database, $user, $pw);

# SELECT DB
$connect->selectdb($database);

# DEFINE A MySQL QUERY
$myquery = "INSERT INTO $tablename (active) VALUES ('N') WHERE campaign_id='WY'";

# EXECUTE THE QUERY FUNCTION
$execute = $connect->query($myquery);

Then run it from Cron. What do you think?

PostPosted: Wed Nov 25, 2009 4:55 pm
by mflorell
I haven't quite seen anything programmed like that, I would say just this would work for the query:

UPDATE vicidial_campaigns SET active='N';

PostPosted: Wed Nov 25, 2009 5:02 pm
by roundqube
I need it for one specific Campaign (just got an update from the manager). How about..

$myquery = "UPDATE vicidial_campaigns SET active'N' WHERE campaign_id='WY'";