limiting timezones based dialing

Discussions about development of VICIDIAL and astGUIclient

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

limiting timezones based dialing

Postby zeeshansajid » Thu Sep 29, 2011 6:24 am

Hi everyone,

I am trying to add support for timezone based dialing in the system at the campaign level. Basically the idea is that i choose a list of different timezones, which are allowed for a particular campaign and now regardless of what the agent shift etc is selected, only valid leads for the specified timezone should be loaded into the hopper.

So i need some help in understanding how the hopper works and how leads are loaded into the system. i believe that for each lead there is a GMT value assigned at the time of lead loading, if that's correct.

How is this GMT value assigned? I know that the GMT gets assigned based on the postal code or area code of the phone number. But how does it work for NON us numbers, since the vicidial_postal_codes table only has US related data.

Also one lead can have many phone numbers, so how is this GMT value saved for the lead or loaded against the lead in the hopper related. Is it only related / based on the primary phone number or all the other numbers.

Also any guidance for adding the timezone dialing feature would be greatly appreciated.

Thanks

Zeeshan Sajid
zeeshansajid
 
Posts: 15
Joined: Wed Sep 28, 2011 3:18 pm

Postby mflorell » Thu Sep 29, 2011 8:47 am

Take a look at the vicidial_phone_codes table and the ADMIN_adjust_GMTnow_on_leads.pl script, non-USA/CANADA timezones are first determined by phone_code(the country code), and then some countries are further broken up by state or areacode.

As for multiple phone numbers per lead, if you leave them in the same lead the record will only use the timezone of the first phone_number. If you are using MULTI_LEAD auto-alt-dialing where each phone number has it's own lead and the records are linked by vendor_lead_code then each phone number will get it's own timezone.

You can easily use a filter to specify only a specific set of timezones to use.
mflorell
Site Admin
 
Posts: 18383
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

limiting timezones based dialing

Postby zeeshansajid » Sat Oct 08, 2011 4:32 pm

Hi Matt,

thanks for your quick reply, actually i am in the hopper code and i do understand that there is a gmt_offset_in condition for the destination time in the campaign's setting. Now i only know that the campaign should only run at EST and the following query

SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user FROM vicidial_list .....

returns leads with different offset values, now if DST is set then the est value can be -4 else -5. Now my quick question is at the time when the hopper executes this query i would like to add a condition to limit it by EST only, the lead data does return the state such as NJ etc ... is that an authentic value and can i use that to find the timezone from phone_codes tables and compare or not. If not what would be a better way of implementing it. Thanks

best regards,
Zeeshan
zeeshansajid
 
Posts: 15
Joined: Wed Sep 28, 2011 3:18 pm

Postby mflorell » Sun Oct 09, 2011 7:04 am

Just add a filter like this:

gmt_offset_now = '-4.00'


You would have to change it when daylight savings changes, but that is the simplest option at this time.
mflorell
Site Admin
 
Posts: 18383
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby zeeshansajid » Sun Oct 09, 2011 1:23 pm

but wouldnt that conflict with AST because that also has -4 GMT offset with no DST so eventually its offset becomes -4 as well.

mysql> SELECT areacode, GMT_offset, DST FROM vicidial_phone_codes WHERE tz_code = 'AST' AND country = 'USA';
+----------+------------+------+
| areacode | GMT_offset | DST |
+----------+------------+------+
| 939 | -4 | N |
+----------+------------+------+



may be i shud take the phone prefix into account to determine if the DST is enabled or not what do you think ??

Thanks in advance
zeeshansajid
 
Posts: 15
Joined: Wed Sep 28, 2011 3:18 pm

Postby mflorell » Sun Oct 09, 2011 4:56 pm

Doing a cross-table subselect on anything but a small set of leads is going to lock your database up and cause problems. You could put the timezone code('EST','CST','MST','PST','AKST','HST') in the owner field, which would make this easier and more efficient to use a filter for.
mflorell
Site Admin
 
Posts: 18383
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby zeeshansajid » Mon Oct 10, 2011 9:55 am

Great ... this solved my problem thanks Matt
zeeshansajid
 
Posts: 15
Joined: Wed Sep 28, 2011 3:18 pm

Re: limiting timezones based dialing

Postby renzo.caso » Mon Nov 05, 2012 8:16 am

There is any way activate and deactivate the filters automatically in one campaign depend of the time? example I want a stop calling all East coast numbers at 8pm is possible?

thank you







VICIBOX 3.1.9
VERSION: 2.4-299
BUILD: 110214-0001
Asterisk 1.4.39.1-vici
dahdi-linux-complete-2.4.1.2+2.4.1
wanpipe-3.5.20
libpri-1.4.11.5
renzo.caso
 
Posts: 19
Joined: Mon Sep 19, 2011 10:05 am

Re: limiting timezones based dialing

Postby williamconley » Mon Nov 05, 2012 11:06 am

That would be call times. Pretty much what they are for.
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: 20253
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Development

Who is online

Users browsing this forum: No registered users and 20 guests