QUESTION How to add digits infront of incoming caller ID

Albert S

Member
Joined
Jul 21, 2013
Messages
122
Reaction score
7
Hi guys,

I know there is a way do to it but I can't seem to find it.

I have a DID that is used for advertisement. I need to track who is calling me on that number.

I connected that as a seperate DID to my system. I am not able to pass 1 number because I can't see caller's number.

So I need a tag like this : "999caller'snumber" or 777 or anything that I can recognize this is coming from that specific DID without loosing caller's number.

Any ideas?
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
No system info provided/

Assuming FreePBX12

Connectivity -> inbound Routes --> Your Specific DID for your Advertising ---> CallerID Prefix

Anything you put in the box is prefixed to the caller ID (I use this to tell what line a call comes in on by the last 4 digits [e.g. 2591: or MNNtf: ]

the caller ID comes out as 2591:2078884456 or 2591:LEPAGE, PAUL (our idiot Governor)

Hope this is what you need
 

Albert S

Member
Joined
Jul 21, 2013
Messages
122
Reaction score
7
Sorry for not providing these:
Code:
───────────────────────SYSTEM INFORMATION───────────────────────────┐
  │  PIAF Installed Version  = 3.0.6.5 under *KVM*            │ 
  │  FreePBX Version          = 2.11.0.36                              │ 
  │  Running Asterisk Version = 11.8.1                                  │ 
  │  Asterisk Source Version  = 11.8.1                                  │ 
  │  Dahdi Source Version    = 2.9.0                                  │ 
  │  Libpri Source Version    = 1.4.14                                  │ 
  │  IP Address              = xx on eth0        │ 
  │  Operating System        = CentOS release 6.5 (Final) ><          │ 
  │  Kernel Version          = 2.6.32-431.1.2.0.1.el6.x86_64 - 64 Bit  │ 
  │


Here is what I did under "Inbound Routes"
http://i.imgur.com/Du0kNOl.png

I still just get the number, anything else I need to check or enable?

Btw, call is coming and hitting a ring group.
Ring group has my cell XXX.XXX.XXXX# so it's ringing an external number, you think that's where it's lost?
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
CID Prefix will add it to the name, not the number.

How many DIDs do you have? I can think of a way to do it for a small of number of DIDs with some dialplan code. Not feasible for more than 10 or so, I'd say.
 

Albert S

Member
Joined
Jul 21, 2013
Messages
122
Reaction score
7
I only have 2 DIDs that are coming from separate trunks, that also have separate inbound and outbound routes.
I am not planning to add more DIDs to this box.

1st DID hits an IVR and gets routed based on selection of caller.

2nd DID the one I am dealing at the moment just rings 1 physical phone and 2 external cell phones. Which needs some sort of identifier.

Thanks!
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
In that case, I'll mess with dialplan and get something to you here in not too long.
 

CoinTos

Member
Joined
Jan 5, 2012
Messages
34
Reaction score
7
Since you are using FreePBX 2.11. You could use the Set CallerID module under applications to create what your want. That is what I used to set my trunks dialout number for redial to work. Create a CallerID and set your destination in the module. Set your inbound destination to Set CallerID and your callid plan name. Then your done.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Since you are using FreePBX 2.11. You could use the Set CallerID module under applications to create what your want. That is what I used to set my trunks dialout number for redial to work. Create a CallerID and set your destination in the module. Set your inbound destination to Set CallerID and your callid plan name. Then your done.

Nice catch! Hadn't used that module, but it'll work great for Albert S 's purposes. See following screenshot:
MLRbnAR.png

Set your inbound route to Set Caller ID | Add Last 4 DID, and the eventual destination that was in the inbound route here. Note you'll need one of these for each DID or unique destination.
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
From the OP of the thread, there was no mention of sendding the call outside the system (to a Cell Number) and the inbound route as I described does work (for me) on my PiaF Green

The FollowMe page also has a CID prefix you could use but.... Many cell companies will disregard the prefix and only pass a CID (so possibly remove my colon ( : ) from prefix but then I am not sure any CID would pass as the CID + Prefix would no longer conform to NANPA numbering scheme or the number would be truncated on the end, which again would be of no use

Another option would be to create an outbound route with a prefix like 61 with the pattern matching (blank) + 61 | NXXNXXXXXX and send the CID you wish for that route.

Looking again at the bottom of the FollowMe page is External CID configuration -- this evidently allows you to control what CID is passed to the outgoing trunk for the forwarded calls.
I wouldn't touch this however if you use the FollowME for other purposes as well as unexpected result may be seen.

Again sending call to a cellphone, your carrier may not process the prefix anyway or truncate the cid or come up as unknows as an invalid CID length. It may be worth trying but I don't use the prefix on FM extensions

Another option is to have the trunk you use force its CID on the call and when you return to the office check the CDRs for the prefix and number in the CDR list.

Good Luck
 

Albert S

Member
Joined
Jul 21, 2013
Messages
122
Reaction score
7
This worked perfectly. (CoinTos's method and rossiv's screenshot)


Thank you
 

Albert S

Member
Joined
Jul 21, 2013
Messages
122
Reaction score
7
Hi guys,

given that this worked great for a while now I am having issues like the caller ID reverted back to the trunk's caller ID rather than the one I set with the "SetCallerID" module.

So caller is 7037037033 - from inbound route goes to Set caller ID - > 999${CALLERID(num)} |which works great with other trunks|

Then it rings an extension that has Follow Me enabled number is this: 7037747744..

As you can see the caller first has 999 infront of it but then these lines kick in and turnk CID changes:

[2015-03-28 10:49:32] VERBOSE[29710][C-00091dee] pbx.c: -- Executing [s@macro-outbound-callerid:8] Set("Local/7037747744@from-internal-000006ea;2", "TRUNKOUTCID=7039961730") in new stack
[2015-03-28 10:49:32] VERBOSE[29710][C-00091dee] pbx.c: -- Executing [s@macro-outbound-callerid:9] GotoIf("Local/7037747744@from-internal-000006ea;2", "1?trunkcid") in new stack
[2015-03-28 10:49:32] VERBOSE[29710][C-00091dee] pbx.c: -- Goto (macro-outbound-callerid,s,14)
[2015-03-28 10:49:32] VERBOSE[29710][C-00091dee] pbx.c: -- Executing [s@macro-outbound-callerid:14] ExecIf("Local/7037747744@from-internal-000006ea;2", "1?Set(CALLERID(all)=7039961730)") in new stack

Any idea?


Code:
 PBX in a Flash GREEN Status Program
──────────────────────────────────────────────────────────────────────────────
  ┌────────────────────────SYSTEM INFORMATION───────────────────────────┐
  │  Asterisk  = ONLINE  | Dahdi    = ONLINE  | MySQL    = ONLINE    │
  │  SSH        = ONLINE  | Apache    = ONLINE  | Iptables  = ONLINE    │
  │  Fail2ban  = ONLINE  | Internet  = ONLINE  | Ip6Tables = ONLINE    │
  │  Disk Free  = ADEQUATE| Mem Free  = CRITICAL| NTPD      = ONLINE    │
  │  SendMail  = ONLINE  | Samba    = OFFLINE | Webmin    = ONLINE    │
  │  Ethernet0  = ONLINE  | Ethernet1 = N/A    | Wlan0    = N/A      │
  │                                                                    │
  │  PIAF Installed Version  = 3.0.6.5 under *KVM*            │
  │  FreePBX Version          = 2.11.0.36                              │
  │  Running Asterisk Version = 11.14.0                                │
  │  Asterisk Source Version  = 11.14.0                                │
  │  Dahdi Source Version    = 2.9.0                                  │
  │  Libpri Source Version    = 1.4.14                                  │
  │  IP Address              = XXX.XXX.XXX.XXX on eth0            │
  │  Operating System        = CentOS release 6.5 (Final) ><          │
  │  Kernel Version          = 2.6.32-431.1.2.0.1.el6.x86_64 - 64 Bit

Here is the full log that this happens : http://pastebin.com/C2MzTF0E
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top