Page 1 of 1

How to know the city or state from inbound call?

PostPosted: Thu Oct 08, 2020 12:05 pm
by macaruchi
Hi!
I have a client that needs when he has a inbound call he can see the state and city come from this call.
There is a way to get that ?
I suppose should be a service that can I use to get that info with the phone number

TIA
;)

Re: How to know the city or state from inbound call?

PostPosted: Thu Oct 08, 2020 12:33 pm
by carpenox
Yes, when you set the DID set the In-Group Call Handle Method: CIDLOOKUP

Re: How to know the city or state from inbound call?

PostPosted: Thu Oct 08, 2020 2:50 pm
by macaruchi
Thks, but maybe I must explain better. It is not search into database the problem is identify where come from the phone number even I dont have this number in my database. I think maybe there is a service from any TELCO that can offer this

;)

Re: How to know the city or state from inbound call?

PostPosted: Thu Oct 08, 2020 10:01 pm
by mflorell
Here are a couple of the AGI scripts included with VICIdial for this purpose(designed for the USA):

# cm_areacode.agi version 2.12
#
# Designed to work with Call Menus to allow searching of the areacode of the
# caller ID phone number the customer called in on, to be searched within the
# vicidial_phone_codes table to gather the state, then search the
# vicidial_inbound_dids table for that state in the did_carrier_description
# field and send the call on to the did that matches.
#
# If areacode is not found call will go to the 'D' option in the call menu
# If state DID is not found call will go to the 'C' option in the call menu
#
# Flag Options:
# 1- Country code to search the areacode within, default 1
# 2- Length of areacode in digits, default 3
# 3- DID prefix to filter by in searching for DIDs, default 999
#
# example of what to set in the Call Menu:
# Set the prompt to "sip-silence"
# Set the Timeout to 1 second
# Option: "Timeout" Route: "AGI" AGI: "cm_areacode.agi,1---3---999"




# cm_postal.agi version 2.12
#
# Designed to work with Cell Menus to allow searching of the number entered by
# the customer to be searched within the vicidial_postal_codes table to gather
# the state, then search the vicidial_inbound_dids table for that state in the
# did_carrier_description field and send the call on to the did that matches.
#
# If postal code is not found call will go to the 'D' option in the call menu
# If state DID is not found call will go to the 'C' option in the call menu
#
# Flag Options:
# 1- minimum number of digits allowed in postal code, default 5
# 2- DID prefix to filter by in searching for DIDs, default 999
#
# example of what to put in the Custom Dialplan entry for a Call Menu:
#exten => _XXXXX,1,AGI(cm_postal.agi,5---999)

Re: How to know the city or state from inbound call?

PostPosted: Fri Oct 09, 2020 9:16 am
by carpenox
nice, good knowledge to have, thanks Matt