Timezone dialing by AREA CODE not WORKING
Posted: Mon Sep 03, 2018 7:42 am
Hi Guys,
Asterisk 11.22.0-vici
VERSION: 2.12-552a
BUILD: 160429-0835
I have a INBOUND_MAN blended campaign Local Time with 24hrs calling.
Uploaded leads with
Lead Time Zone Lookup: COUNTRY CODE and AREA CODE ONLY, since leads dont have State uploaded.
Lead filtering is OFF as well.
Agents starts at 8am EST, and when they try Dialing they are still able to dial numbers in PST or Mountain time at 8am EST.
I also ran the updateGMT script --debug and the results are below:
and put it to CRON to no avail.
Debug says dialcode found: 1, in which is my dialcode for US numbers. I'm expecting, and I read about this that vicidial will check the 1st 3 digits of the phone number as the area code and not the country code alone. But how is it not working?
Just to note, campaign timezone and servers/mysql is set to -5 (EDT)
Also, i've tried querying the GMTs in the vicidial_list table and here's the result: (i just limited to 200 rows the rest of the results have 0 gmt_offset)
Also, the OWNER column is blank. In which I think is relevant to this timezoning thing as I checked the script sqlstatement:
It seems that, these statements will not be able to pass since owner and phone_code will != tz_codes since they are all blank (owner) or '1' (country code).
Tried loading the leads before getting the 1st 3 digits of the phone number and set it to the PHONE CODE. However, the DIAL CODE of the lead changes from 1 to 3digits and it won't be able to dial anymore.
Am I missing anything?
Asterisk 11.22.0-vici
VERSION: 2.12-552a
BUILD: 160429-0835
I have a INBOUND_MAN blended campaign Local Time with 24hrs calling.
Uploaded leads with
Lead Time Zone Lookup: COUNTRY CODE and AREA CODE ONLY, since leads dont have State uploaded.
Lead filtering is OFF as well.
Agents starts at 8am EST, and when they try Dialing they are still able to dial numbers in PST or Mountain time at 8am EST.
I also ran the updateGMT script --debug and the results are below:
- Code: Select all
USSCGVWPVICIP01:~ # /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl --debug
-----DEBUGGING -----
STARTING TIME ZONE DAYLIGHT SAVING TIME CALCULATION SCRIPT
SEED TIME 1535978277 : 2018-09-03 08:37:57 LOCAL GMT OFFSET NOW: -4
- Unique Country dial codes found: 1
RUNNING LOOP FOR COUNTRY CODE: 1
Area Code Updates: 0
Postal Updates: 0
NANPA Updates: 0
Time Zone Code Updates: 0
DBI::db=HASH(0x2745880)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl line 1220.
GRAND TOTALS:
Postal Updates: 0
Area Code Updates: 0
NANPA Updates: 0
TIME ZONE Updates: 0
DONE
- process runtime (0 sec) (0 minutes)
and put it to CRON to no avail.
- Code: Select all
### adjust the GMT offset for the leads in the vicidial_list table
1 1,7 * * * /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl --debug
Debug says dialcode found: 1, in which is my dialcode for US numbers. I'm expecting, and I read about this that vicidial will check the 1st 3 digits of the phone number as the area code and not the country code alone. But how is it not working?
Just to note, campaign timezone and servers/mysql is set to -5 (EDT)
- Code: Select all
USSCGVWPVICIP01:~ # timedatectl
Local time: Mon 2018-09-03 08:40:07 EDT
Universal time: Mon 2018-09-03 12:40:07 UTC
RTC time: Mon 2018-09-03 12:40:07
Timezone: America/New_York (EDT, -0400)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2018-03-11 01:59:59 EST
Sun 2018-03-11 03:00:00 EDT
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2018-11-04 01:59:59 EDT
Sun 2018-11-04 01:00:00 EST
Also, i've tried querying the GMTs in the vicidial_list table and here's the result: (i just limited to 200 rows the rest of the results have 0 gmt_offset)
- Code: Select all
MariaDB [asterisk]> select lead_id,list_id,gmt_offset_now,phone_number,state,owner from vicidial_list where list_id=10030 limit 200;
+---------+---------+----------------+--------------+-------+-------+
| lead_id | list_id | gmt_offset_now | phone_number | state | owner |
+---------+---------+----------------+--------------+-------+-------+
| 14048 | 10030 | -5.00 | 2158018791 | NULL | |
| 14047 | 10030 | -5.00 | 6106450514 | NULL | |
| 14045 | 10030 | -5.00 | 8649869145 | NULL | |
| 14042 | 10030 | 0.00 | 3616683066 | | |
| 14044 | 10030 | -5.00 | 8649869145 | NULL | |
| 14041 | 10030 | 0.00 | 6193185029 | | |
| 14040 | 10030 | 0.00 | 9013156905 | | |
| 14039 | 10030 | 0.00 | 7042003915 | | |
| 14038 | 10030 | 0.00 | 3193556800 | | |
| 14037 | 10030 | 0.00 | 9706830677 | | |
| 14036 | 10030 | 0.00 | 4233051997 | | |
| 14035 | 10030 | 0.00 | 9204618126 | | |
| 14033 | 10030 | 0.00 | 6148177197 | | |
| 14034 | 10030 | 0.00 | 7575701925 | | |
| 14032 | 10030 | 0.00 | 2626922942 | | |
| 14031 | 10030 | 0.00 | 5416837012 | | |
| 14030 | 10030 | 0.00 | 6514933985 | | |
| 14029 | 10030 | 0.00 | 9162250533 | | |
| 14028 | 10030 | 0.00 | 8134046808 | | |
| 14027 | 10030 | 0.00 | 3059710067 | WA | |
| 14025 | 10030 | 0.00 | 4084608623 | | |
| 14026 | 10030 | 0.00 | 2095264402 | | |
| 14024 | 10030 | 0.00 | 3304188438 | | |
| 14023 | 10030 | 0.00 | 2144038582 | | |
| 14022 | 10030 | 0.00 | 9515447074 | | |
| 14020 | 10030 | 0.00 | 4025407961 | | |
| 14021 | 10030 | 0.00 | 7329786192 | | |
| 14019 | 10030 | 0.00 | 6235659370 | | |
| 14018 | 10030 | 0.00 | 8138161944 | | |
| 14017 | 10030 | 0.00 | 4236472127 | | |
| 14016 | 10030 | 0.00 | 7246848822 | | |
Also, the OWNER column is blank. In which I think is relevant to this timezoning thing as I checked the script sqlstatement:
- Code: Select all
if ($AC_processed)
{
$stmtA = "select count(*) from vicidial_list where [b][u]owner='$tz_codes[$e]'[/u][/b] and phone_code='$tz_country[$e]' and (gmt_offset_now != '$area_GMT' or gmt_offset_now IS NULL) $XlistSQL $XomitlistidSQL $OWTZ_codes_list;";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_countW=0;
@aryA = $sthA->fetchrow_array;
$rec_countW = $aryA[0];
$sthA->finish();
if (!$rec_countW)
{
if ($DBX) {print " ALL GMT ALREADY CORRECT FOR : $tz_codes[$e] $tz_country[$e] $area_GMT\n";}
$ei++;
}
else
{
$stmtA = "UPDATE vicidial_list set gmt_offset_now='$area_GMT',modify_date=modify_date where owner='$tz_codes[$e]' and phone_code='$tz_country[$e]' and (gmt_offset_now != '$area_GMT' or gmt_offset_now IS NULL) $XlistSQL $XomitlistidSQL $OWTZ_codes_list;";
It seems that, these statements will not be able to pass since owner and phone_code will != tz_codes since they are all blank (owner) or '1' (country code).
Tried loading the leads before getting the 1st 3 digits of the phone number and set it to the PHONE CODE. However, the DIAL CODE of the lead changes from 1 to 3digits and it won't be able to dial anymore.
Am I missing anything?