Page 1 of 1
Changing CallerID on Outbound Calls within Same Campaign

Posted:
Mon Oct 27, 2008 1:36 pm
by TroyD
We have several numbers in various states that are set up for inbound calls to our PBX, what we want to do is change the callerID to the number that we have for a certain State (like FL for example) when we call a person that is in that state. For example if we are dialing a Georgia client, we want to set our caller ID to our Gerogia number and if its a FL cleint we want the caller ID to have our FL number in it for tracking purposes. is it possible to modify some of the code to do this, or can you tell me where I should look to try to accomplish this? Thanks in Advance..
(I know that I could create different campaigns for each state, but would rather handle it without having to have 52 campaigns..And for other obvious reasons..)
Re: Changing CallerID on Outbound Calls within Same Campaign

Posted:
Mon Oct 27, 2008 1:55 pm
by Nortelguy
TroyD wrote:We have several numbers in various states that are set up for inbound calls to our PBX, what we want to do is change the callerID to the number that we have for a certain State (like FL for example) when we call a person that is in that state. For example if we are dialing a Georgia client, we want to set our caller ID to our Gerogia number and if its a FL cleint we want the caller ID to have our FL number in it for tracking purposes. is it possible to modify some of the code to do this, or can you tell me where I should look to try to accomplish this? Thanks in Advance..
(I know that I could create different campaigns for each state, but would rather handle it without having to have 52 campaigns..And for other obvious reasons..)
Hrm , set all CID as an 800 # ? What tracking purposes ? There are other ways to track calls then that.
Re: Changing CallerID on Outbound Calls within Same Campaign

Posted:
Mon Oct 27, 2008 3:17 pm
by TroyD
Nortelguy wrote:TroyD wrote:We have several numbers in various states that are set up for inbound calls to our PBX, what we want to do is change the callerID to the number that we have for a certain State (like FL for example) when we call a person that is in that state. For example if we are dialing a Georgia client, we want to set our caller ID to our Gerogia number and if its a FL cleint we want the caller ID to have our FL number in it for tracking purposes. is it possible to modify some of the code to do this, or can you tell me where I should look to try to accomplish this? Thanks in Advance..
(I know that I could create different campaigns for each state, but would rather handle it without having to have 52 campaigns..And for other obvious reasons..)
Hrm , set all CID as an 800 # ? What tracking purposes ? There are other ways to track calls then that.
We have Local numbers (not 800#) in each state (some have offices) and we want to be able to track which state has better return than other states, etc. There is a lot to it, and without disclosing our business model it may be hard to explain, but at the end of the day, we want to be able to change CallerId outbound for a single campaign (based on state or other filters) without having to create a campaign for each state that we are calling. It also imposes an administrative nightmare trying to keep track of which agents have which states, etc... hope this helps... I guess Im mainly concerned with where (AGI?) that i have to touch that handles what the outbound callerid is set to. (rather than the box in campaigns..) I can certainly look at it and dig to figure it out, but was hoping for a quicker answer...
Also, I may have failed to mention that the numbers we own in each state are tied to another IP based PBX (not vicidial) so when a returned call comes in on that pbx, we can track the inbound call by number called on our other PBX. (Trixbox)

Posted:
Mon Oct 27, 2008 6:28 pm
by mflorell
We had written an AGI a couple years ago that would change the callerID number for all outgoing calls depending on areacode(which also means you could really do it by state).
It was a hack and everything was hard-coded, but it did work just fine for over a year while the client was doing that campaign.
An example of the script is the agi-VDADselective_CID.agi script available in the release.

Posted:
Mon Oct 27, 2008 7:13 pm
by Nortelguy
mflorell wrote:We had written an AGI a couple years ago that would change the callerID number for all outgoing calls depending on areacode(which also means you could really do it by state).
It was a hack and everything was hard-coded, but it did work just fine for over a year while the client was doing that campaign.
An example of the script is the agi-VDADselective_CID.agi script available in the release.
Neat ... *Files that one away for later use*
Looked at the script but..

Posted:
Thu Oct 30, 2008 12:27 am
by TroyD
I took a look and tried some things with the script, but im not sure what i should have set in the campaign callerid section from the web gui, should i leave it blank?, and where exactly am i setting the cid to a value in the script, (here:?
### set the callerid to the ACQS value(calleridname)
## use these two lines for Asterisk 1.2 tree
$newcallerid = "\"$calleridname <8665551212>\"";
$AGI->set_callerid($newcallerid);
for example if i called the AGI script and just wanted to set the caller id to our 800 number what would be a short agi example? Sorry for such a basic question, just trying to figure out where and what its getting set to in the selective script.

Posted:
Thu Oct 30, 2008 8:37 am
by mflorell
the campaign callerID value should be your default callerID and everything that you change would be for the specific areacodes that you want to have a different callerID than the default.

Posted:
Fri Oct 31, 2008 11:37 am
by eijal
mflorell wrote:the campaign callerID value should be your default callerID and everything that you change would be for the specific areacodes that you want to have a different callerID than the default.
Hi
I have actived several lists with different states, so I want a differente caller ID depending on the state.
for FL 407XXXXXXX
for NC 91XXXXXXX
and so on.
Where should I write those callerIDs?
Thanks
Where in the AGI file is the caller id set

Posted:
Fri Oct 31, 2008 3:05 pm
by TroyD
Yes, thats exactly what I was missing, where is it (on which line) that I should set what I want my caller ID to be..? (do I replace the 0000000000 in the AGI file with what I want? I guess I was not as clear as I should have been. I am not a perl programmer, but I can kind of find what I want and work with it a bit with some help..

Posted:
Fri Oct 31, 2008 8:51 pm
by mflorell
Towards the top of the script code you will see a list of 3-digit area codes for Florida, this is how you put the state area codes in.

Posted:
Mon Nov 03, 2008 10:54 am
by eijal
mflorell wrote:Towards the top of the script code you will see a list of 3-digit area codes for Florida, this is how you put the state area codes in.
This is the original code
- Code: Select all
$script = 'agi-VDADselective_CID.agi';
$AGILOG=0;
$FD=0; # force debug for testing
# CLEAR AREA CODE LISTINGS:
# Florida: 239|305|321|352|386|407|561|689|727|754|772|786|813|836|850|861|863|904|941|954
$clear_area_codes = '239|305|321|352|386|407|561|689|727|754|772|786|813|836|850|861|863|904|941|954';
For example to mix TX AND NM. Should I change to something like this:
- Code: Select all
$script = 'agi-VDADselective_CID.agi';
$AGILOG=0;
$FD=0; # force debug for testing
# CLEAR AREA CODE LISTINGS:
# TX AND NM: 806|575
$clear_area_codes = '806|575';
and what about the other six digits for the callerID?
OR?
- Code: Select all
$script = 'agi-VDADselective_CID.agi';
$AGILOG=0;
$FD=0; # force debug for testing
# CLEAR AREA CODE LISTINGS:
# TX AND NM: 806XXXXXXX|575XXXXXXXXXX
$clear_area_codes = '806XXXXXXXXXX|575XXXXXXXXXX';
Thanks

Posted:
Mon Nov 03, 2008 7:39 pm
by mflorell
The other digits don't matter, it's only matching areacodes(first 3 digits of phone number).