Vicidial times by area code

All installation and configuration problems and questions

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

Vicidial times by area code

Postby mav2287 » Mon Aug 11, 2014 5:27 pm

I am setting call time rules in vicidial but it would seem that it goes off the six digit zip code of the lead not the area code of the lead. Is there a way to make it go off the area code instead of the zip?
ViciBox5.x86_64-5.0.3.preload from .iso upgraded to 13.1 | VERSION: 2.10-444c BUILD: 150129-0828 | 1.8.32.2-vici | Dual Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel twin quad core 3Ghz Xeon chips | 32gb of RAM
mav2287
 
Posts: 256
Joined: Thu Oct 03, 2013 6:47 pm

Re: Vicidial times by area code

Postby mflorell » Mon Aug 11, 2014 11:08 pm

Yes, that is an option you set either in the list screen or in the crontab of the server that is running the GMT offset script in it's crontab.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Vicidial times by area code

Postby mav2287 » Wed Aug 13, 2014 2:06 pm

Matt,

I tried this and can't seem to have any luck with it. What I am trying to do is have Vicidial not call certain states by area code rather than by the state field. For example we may have a lead that has a KS address with a 217(texas) area code. We have set the call times for TX to 2400-2400 but since the state field shows KS it allows to the call. Is there anyway to have it do state rules off the area code rather than the state field in the lead? What we want to do is make is so our agents can't call certain states.
ViciBox5.x86_64-5.0.3.preload from .iso upgraded to 13.1 | VERSION: 2.10-444c BUILD: 150129-0828 | 1.8.32.2-vici | Dual Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel twin quad core 3Ghz Xeon chips | 32gb of RAM
mav2287
 
Posts: 256
Joined: Thu Oct 03, 2013 6:47 pm

Re: Vicidial times by area code

Postby covarrubiasgg » Wed Aug 13, 2014 2:21 pm

Not sure what why you are trying to accomplish this by using Call Times.

You can do it using Filters, that way you can Filter your dials using very specific SQL Queries.

Anyway if you want to be completely sure that the calls times will work based on the area code you MUST set the dial code in the list, because there is a table in vicidial which has the Dial Codes + areas and it has the GMT for everyone of them, but without the Dial Code it wont work.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Re: Vicidial times by area code

Postby mav2287 » Wed Aug 13, 2014 3:39 pm

The reason is I am wanting to be able to add or remove these really easily. For example if we decided tomorrow we wanted to allow agents to call Texas to have the ability to just remove the call time rule. I'm not sure what you mean by set the dial code in the list. I have the Time Zone Settings set to "COUNTRY_AND_AREA_CODE". For some reason though vicidial seems to be looking at the state in the lead field rather than matching it up with the area code.
ViciBox5.x86_64-5.0.3.preload from .iso upgraded to 13.1 | VERSION: 2.10-444c BUILD: 150129-0828 | 1.8.32.2-vici | Dual Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel twin quad core 3Ghz Xeon chips | 32gb of RAM
mav2287
 
Posts: 256
Joined: Thu Oct 03, 2013 6:47 pm

Re: Vicidial times by area code

Postby covarrubiasgg » Thu Aug 14, 2014 1:28 pm

Code: Select all
MariaDB [asterisk]> select * from vicidial_phone_codes WHERE country_code=1;
+--------------+---------+----------+-------+------------+------+-----------+------------------------+---------+
| country_code | country | areacode | state | GMT_offset | DST  | DST_range | geographic_description | tz_code |
+--------------+---------+----------+-------+------------+------+-----------+------------------------+---------+
|            1 | BHS     | 242      |       | -5         | Y    | FSA-LSO   | Bahamas                | EST     |
|            1 | BRB     | 246      |       | -4         | N    |           | Barbados               | AST     |
|            1 | AIA     | 264      |       | -4         | N    |           | Anguilla               | AST     |
|            1 | ATG     | 268      |       | -4         | N    |           | Antigua and Barbuda    | AST     |
|            1 | VGB     | 284      |       | -4         | N    |           | British Virgin Islands | AST     |
|            1 | ABW     | 297      |       | -4         | N    |           | Aruba                  | AST     |
|            1 | VIR     | 340      |       | -4         | N    |           | Virgin Islands         | AST     |
|            1 | CAY     | 345      |       | -5         | Y    | FSA-LSO   | Cayman Islands         | EST     |
|            1 | BMU     | 441      |       | -4         | Y    | FSA-LSO   | Bermuda                | AST     |
|            1 | GRD     | 473      |       | -4         | N    |           | Grenada                | AST     |
|            1 | GLP     | 590      |       | -4         | N    |           | Guadeloupe             | AST     |
|            1 | MTQ     | 596      |       | -4         | N    |           | Martinique             | AST     |
|            1 | ANT     | 599      |       | -4         | N    |           | Antilles               | AST     |
|            1 | TCA     | 649      |       | -5         | Y    | FSA-LSO   | Turks Islands          | EST     |
|            1 | MSR     | 664      |       | -4         | N    |           | Montserrat             | AST     |
|            1 | ASM     | 684      |       | -11        | N    |           | American Samoa         | SST     |
|            1 | NLD     | 721      |       | -4         | N    |           | St. Maarten            | AST     |
|            1 | LCA     | 758      |       | -4         | N    |           | St. Lucia              | AST     |
|            1 | DMA     | 767      |       | -4         | N    |           | Dominica               | AST     |
|            1 | VCT     | 784      |       | -4         | N    |           | St. Vincent            | AST     |
|            1 | DOM     | 809      |       | -4         | N    |           | Dominican Republic     | AST     |
|            1 | DOM     | 829      |       | -4         | N    |           | Dominican Republic     | AST     |
|            1 | DOM     | 849      |       | -4         | N    |           | Dominican Republic     | AST     |
|            1 | TTO     | 868      |       | -4         | N    |           | Trinidad and Tobago    | AST     |
|            1 | KNA     | 869      |       | -4         | N    |           | St. Kitts and Nevis    | AST     |
|            1 | JAM     | 876      |       | -5         | N    |           | Jamaica                | EST     |
|            1 | CAN     | 403      | AB    | -7         | Y    | SSM-FSN   | Alberta                | MST     |
|            1 | CAN     | 587      | AB    | -7         | Y    | SSM-FSN   | Alberta                | MST     |
|            1 | CAN     | 780      | AB    | -7         | Y    | SSM-FSN   | Alberta                | MST     |
|            1 | USA     | 907      | AK    | -9         | Y    | SSM-FSN   | Alaska                 | AKST    |
|            1 | USA     | 205      | AL    | -6         | Y    | SSM-FSN   | Alabama                | CST     |
|            1 | USA     | 251      | AL    | -6         | Y    | SSM-FSN   | Alabama                | CST     |
|            1 | USA     | 256      | AL    | -6         | Y    | SSM-FSN   | Alabama                | CST     |
|            1 | USA     | 334      | AL    | -6         | Y    | SSM-FSN   | Alabama                | CST     |
|            1 | USA     | 659      | AL    | -6         | Y    | SSM-FSN   | Alabama                | CST     |


When you choose "COUNTRY_AND_AREA_CODE" it refers to that table to set the time, but after i ran the following query using the area code that you suggest, it is not marked as a Texas areacode.


Code: Select all
MariaDB [asterisk]> select * from vicidial_phone_codes WHERE country_code=1 and areacode=217;
+--------------+---------+----------+-------+------------+------+-----------+------------------------+---------+
| country_code | country | areacode | state | GMT_offset | DST  | DST_range | geographic_description | tz_code |
+--------------+---------+----------+-------+------------+------+-----------+------------------------+---------+
|            1 | USA     | 217      | IL    | -6         | Y    | SSM-FSN   | Illinois               | CST     |
+--------------+---------+----------+-------+------------+------+-----------+------------------------+---------+
1 row in set (0.01 sec)


As i comment before, you may accomplish this by using a filter such as phone_number NOT LIKE 217%, this way, while the filter is active vicidial wont dial any number that begins with areacode 217.
covarrubiasgg
 
Posts: 420
Joined: Thu Jun 10, 2010 10:20 am
Location: Tijuana, Mexico

Re: Vicidial times by area code

Postby mav2287 » Thu Aug 21, 2014 2:08 pm

Yea I saw that I had the are code wrong, but I had Illinos on my no-call list as well so it should have worked. It seems to be working fine now after I cleared the list and loaded new leads. Your post triggered me to think I may have forgotten to put a country code of 1 in when I did my first test leads. I added them in a rush to test it and may have forgot to add 1. Completely obvious mistake I know, but these things happen... The nice thing about doing it this way instead of with a sql query with all the zip codes for the states I don't want to call is I can add/remove states fairly easily. For this client they had different licensing needed for each state they worked in and wanted to safeguard against working in a state they don't have a license for. They do get new licenses though and wanted an easy way to add states as they grew.
ViciBox5.x86_64-5.0.3.preload from .iso upgraded to 13.1 | VERSION: 2.10-444c BUILD: 150129-0828 | 1.8.32.2-vici | Dual Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel twin quad core 3Ghz Xeon chips | 32gb of RAM
mav2287
 
Posts: 256
Joined: Thu Oct 03, 2013 6:47 pm

Re: Vicidial times by area code

Postby williamconley » Sun Aug 24, 2014 11:58 am

We have several clients with several methods of locking out groups of leads. A common one is to use the Gender field (often otherwise ignored) as a "flag" that must be a specific value to allow dialing. Then any filter will include "and gender = X". Then a script (or several?) can be used to set the gender based on whether a specific lead should be allowed. And upgrade safe as the gender field is not going away any time soon and the scripts all run outside vicidial-core.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Vicidial times by area code

Postby mav2287 » Mon Sep 15, 2014 6:30 pm

I seem to be running into problems with this again. I am starting to worry that the state call times either doesn't work or has a glitch. For some reason it seems to auto dial area codes in states that are marked as 2400-2400 default. Any ideas on where to start digging into this one?

The last test I did had a IL number 224. I checked the db and it showed country code was correct and all information was correct. The issue I seem to be having is that the state call override seems to be going off of the state listed in the lead not the state associated with the number. for example if I have a lead with a KS address and state but the numbers are code is IL it will still dial that lead rather than using the db to block the call based on the area code being in IL and that states call time being set to 2400-2400

If someone can tell me what part of the code handles this I can then go in and see why it isn't doing what I am expect and either fix it to do what I would like or modify it to work the way I think it should.
ViciBox5.x86_64-5.0.3.preload from .iso upgraded to 13.1 | VERSION: 2.10-444c BUILD: 150129-0828 | 1.8.32.2-vici | Dual Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel twin quad core 3Ghz Xeon chips | 32gb of RAM
mav2287
 
Posts: 256
Joined: Thu Oct 03, 2013 6:47 pm

Re: Vicidial times by area code

Postby mav2287 » Mon Sep 15, 2014 11:10 pm

So after more work on this and some coding I think have cracked my issue. The way that the state call times look to work is they are based on the state field in the lead. It appears only the timezone is pulled from the areacode of the number. This means if your area code and your lead state field don't actually match you are out of luck because the state rule won't be applied. So for example if you have a state field set as KS but the leads actual area code is for a state that can't takes calls Sunday. Vicidial will still call Sunday because the rule sees only the state field of KS not the state associated with the area code. From what I can tell vici wouldn't see it because it is not reading the area code it's pulling the state field. I have been looking at the hopper script to see if I can rewrite it to account for this. The only issue I see though is that as far as the hopper is concerned there is 1 state per lead. So if I have a home number for CA and an alt_phone of KS the hopper doesn't seem to be able to account for that. This is what I am seeing in the code so if I am off some one please chime in and set it straight.

The code to pull accounts into the hopper and apply state rules based on area code isn't too bad. The only thing I am seeing is that the same code is used to delete out of gmt items from the hopper by state and this would bypass them. The other issue is that if you have a number with a state rule and one without you would want to call the one without. I have code to pull the area codes for each state and throw the data into an array. The issue I am running into is that changing the columns and the way the hopper works to do this doesn't seem worth it. Any ideas?
ViciBox5.x86_64-5.0.3.preload from .iso upgraded to 13.1 | VERSION: 2.10-444c BUILD: 150129-0828 | 1.8.32.2-vici | Dual Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel twin quad core 3Ghz Xeon chips | 32gb of RAM
mav2287
 
Posts: 256
Joined: Thu Oct 03, 2013 6:47 pm


Return to Support

Who is online

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