inbound leads when saved in DB include 1 which causes issues

Discussions about development of VICIDIAL and astGUIclient

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

inbound leads when saved in DB include 1 which causes issues

Postby bobbymc » Fri Jun 11, 2010 6:56 pm

when it gets the caller id to insert a new lead for the inbound call it also includes the 1 with he number which causes issues because when calling the lead with the dialer back it calls the number with a 1 and also adds the phone_code which is the 1.. any number in the system has 10 digits but when the number has 11 digits the additional 1 at the beginning causes a issue so example the caller id is 18881234567 it inserts the lead with phone_code 1 and the number 18881234567 and when calling the number back it trys to call 118881234567

vicidial 2.0.5rc5
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby williamconley » Sat Jun 12, 2010 4:09 pm

matt has listed the answer to this several times. in addition, if i recall, it's noted in the extensions.conf file. you can strip the first digit off inbound calls from your provider, thus sending the 10 digit actual phone to vicidial instead of the 11 digit phone_code+phone_number.

you can also request your provider send only 10 digits for the inbound caller id, but that can sometimes lead to a six month discussion as the technical support at some providers is ... not as good as it could be. generally easier to just remove the leading 1 yourself.

also, please note that 2.0.5 is no longer officially supported (and upgrading to 2.2.X via SVN is only a few lines of code ... :))
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: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby bobbymc » Mon Jun 14, 2010 4:46 pm

ok. can someone tell me how i can remove the 1 myself?
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby mflorell » Mon Jun 14, 2010 6:39 pm

I made some changes a few weeks ago to the ALL_inbound AGI(in SVN/trunk) to do some intelligent filtering when the phone_code is set to '1' to remove a leading '1' from the phone_number field.
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby williamconley » Mon Jun 14, 2010 8:21 pm

actually, i think matt left instructions inside the agi script for inbound.

look in the trunkinbound context in extensions.conf, and you will find the agi script being executed for your inbound. inside that script are some notes for its usage.

matt and the vicidial group have left A LOT of notes in these files to help people along.
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: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby bobbymc » Wed Jun 16, 2010 5:14 pm

how about something like this matt?



if($callerid =~ m/^1[2-9]{1}[0-9]{2}[2-9]{1}[0-9]{6}$/){
$callerid = substr($callerid, 1);
}

checks to see if its a us number and removed the 1?
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby williamconley » Wed Jun 16, 2010 5:32 pm

have you tested it to remove the 1 on 11 digit numbers that have the pattern 1NXXNXXXXXX?

(um ... successfully?)
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: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mflorell » Wed Jun 16, 2010 11:10 pm

The AGI in the current SVN/trunk now does this automatically on North America(phone_code == 1) calls now, so the dialplan filtering is not necessary anymore.
mflorell
Site Admin
 
Posts: 18342
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby bobbymc » Mon Jun 21, 2010 5:16 pm

i tested the svn trunk version for this and it works like a charm. i before this addition used the code i posted above. so i thought it might be helpful to share it =)
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am


Return to Development

Who is online

Users browsing this forum: No registered users and 35 guests