Timezone dialing by AREA CODE not WORKING

All installation and configuration problems and questions

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

Timezone dialing by AREA CODE not WORKING

Postby donX » 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:
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?
donX
 
Posts: 50
Joined: Tue May 17, 2016 8:38 am

Re: Timezone dialing by AREA CODE not WORKING

Postby donX » Mon Sep 03, 2018 9:57 am

Just an update:

So I made changes to my campaign to Omit phone_code and just add the 1 in the dial prefix. That solved my phone_code dialing issue when I upload test leads, and put a phone code column.

Dial code shows, the area code ive put in ( i have to edit the xls to take out the 1st 3 digits of the string for the area code, is there a way for the dialer to detect that automatically without altering the file?)

Tried dialing and no issues with the Outbound dial.

However, when I checked the vicidial_list table.

Code: Select all
MariaDB [asterisk]> select lead_id,list_id,gmt_offset_now,phone_number,state,phone_code,owner from vicidial_list where list_id=10020 and status="NEW";
+---------+---------+----------------+--------------+-------+------------+-------+
| lead_id | list_id | gmt_offset_now | phone_number | state | phone_code | owner |
+---------+---------+----------------+--------------+-------+------------+-------+
|   14207 |   10020 |           0.00 | 9198289706   |       | 919        | 919   |
|   14208 |   10020 |           0.00 | 8179092639   |       | 817        | 817   |
|   14209 |   10020 |           0.00 | 8772224678   |       | 877        | 877   |
|   14210 |   10020 |           0.00 | 8155456266   |       | 815        | 815   |
+---------+---------+----------------+--------------+-------+------------+-------+


The GMT_OFFSET_NOW column is 0. Why?

Also, ran the gmtupdate script and showed this.

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  1535986394      :   2018-09-03 10:53:14  LOCAL GMT OFFSET NOW: -4
 - Unique Country dial codes found: 5

RUNNING LOOP FOR COUNTRY CODE: 1
Area Code Updates: 0
Postal Updates:    0
NANPA Updates:     0
Time Zone Code Updates:     0

RUNNING LOOP FOR COUNTRY CODE: 919
Area Code Updates: 0
Postal Updates:    0
NANPA Updates:     0
Time Zone Code Updates:     0

RUNNING LOOP FOR COUNTRY CODE: 817
Area Code Updates: 0
Postal Updates:    0
NANPA Updates:     0
Time Zone Code Updates:     0

RUNNING LOOP FOR COUNTRY CODE: 877
Area Code Updates: 0
Postal Updates:    0
NANPA Updates:     0
Time Zone Code Updates:     0

RUNNING LOOP FOR COUNTRY CODE: 815
Area Code Updates: 0
Postal Updates:    0
NANPA Updates:     0
Time Zone Code Updates:     0
DBI::db=HASH(0x20577e0)->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)
You have new mail in /var/mail/root


Why?

Tried uploading new leads setting to USA-Canada Check: Check for valid Area code, but gives me this error:

[list=]record 1 BAD- PHONE: 9198289706 ROW: |0| INV: 9198289706
record 2 BAD- PHONE: 8179092639 ROW: |0| INV: 8179092639
record 3 BAD- PHONE: 8772224678 ROW: |0| INV: 8772224678
record 4 BAD- PHONE: 8155456266 ROW: |0| INV: 8155456266 [/list]

Here's my data:

    MAGTNO PARTYTC G2FNAM G2LNAM AREACODE G2BPHE
    SLIC24696 1 DEWEY HUFFINES 919 919828-9706
    SLIC28220 1 JOSEPH BOWLES 817 817909-2639
    SLIC27402 1 MICHAEL RILEY 877 877222-4678
    SLIC27046 1 JEAN FLECK 815 815545-6266

MAGTNO - Vendor Lead Code
PartyTC - Country Code
You get the rest.
donX
 
Posts: 50
Joined: Tue May 17, 2016 8:38 am

Re: Timezone dialing by AREA CODE not WORKING

Postby nani » Mon Sep 17, 2018 2:45 am

check the GMT value given in serevers in Admin section and also remove offset_gmt_value passing in API,paste API here you are using to upload leads
nani
 
Posts: 20
Joined: Thu Jun 28, 2018 1:26 am


Return to Support

Who is online

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