Caller ID pass-through when forwarding to an external number does not work

There is a similar post with this issue however there is nothing conclusive with this post. Here are the specific of my issue (i have scrambled the DID, caller id, IP addresses to protect the innocents):

I am using FreePBX 2.11.0.34 with external IP 24.1.1.1 and I have an incoming route from trunk a and DID 2021231111. A user with caller id number 2021233333 and caller name Bozo Clown calls the DID 2021231111.

If the FreePBX inbound route destination is an internal extension the correct caller id and the correct calller name will appear on the internal extension set.

If the FreePBX inbound route destination is an external extension (custom extension with Local/ext@outbound-allroutes) that routes through trunk b (with outbound caller id of 2021232222 and proxy ip 24.1.1.2) to destination number 2021234444 (the number receiving the forwarded call) then the caller ID displayed will always be the outbound caller id of trunk b and never the original caller id of 2021233333. How can one make this work. Here is a link to the appropriate logfile with the debug, verbose, dtmf and SIP debug information. I do not understand since when executing the line s@macro-outbound-callerid:15 of the dial plan the correct caller id seems to be set but I do not understand fully what takes place after this line in the call flow nor can I determine from the SIP debug information if the caller id information is correctly sent by asterisk (and potentially ignored by trunk b).

I did not include the logfile in the post as it is 500 lines long. Thanks for any insight you can provide.

I have to use the “Set Caller ID” module when I do this. If I don’t, the outbound call gets my PBX’s CID information.

Dave,

I added a set caller id to an extension or to a ring group defined as follows:

CallerID Name: ${CALLERID(name)}
CallerID Number: ${CALLERID(num)}

However in both case (extension or ring group) I get the trunk caller id. What do you think is wrong?

I don’t think that’s what I said. You need to send the call through the SetCallerID destination for this to work.

Did you set the outbound route as an “intracompany” route? If not, the calls will probably get either the trunk of outbound route caller ID.

When I do this, I have to use a specific destination for the outbound call. The destination in the inbound route is set to “SetCallerID” and then the caller ID information is set for the ‘bounce’. I then route the call to a specific “miscellaneous destination” (IIRC) that dials the actual number of the cell phone I am forwarding to.

Also, be warned that many telephone companies do not allow “foreign” caller IDs to be sent through their systems. In these cases, your calls have two possible outcomes - the caller ID is set for you by the phone company (a common outcome when working with PRI or T1 traffic) or the call is rejected with an error like “Nope - sorry” (or something similarly informative).

Sorry Dave, I should have been more explicit. In the inbound route I set the destination to the set callerid. In one case, the set callerid destination was a custom extension (of the form Local/ext@outbound-allroutes) and the second time it was set to a ring group that includes this custom extension.

I will look into the outbound route intracompany setting.

Dave,

  1. I set the destination for inbound route to set callerid
  2. I set the destination for set callerid to misc destination
  3. I defined dial string for misc destination to use specific outbound route using prefix
  4. I set the outbound route for that prefix to be intracompany.

I make the call and I get the trunk caller id, not the original caller id. Am I doing something wrong?

Did you read this?

my trunks are all sip. Is there a way to find out if this is the case? Is there a way to find out what caller id was sent in the sip traffic that went out?

Sure - do a SIP call trace.

An easier way would be to call your SIP provider and ask “Hey, do you guys support foreign caller ID on my outbound calls?”

There is a sip call trace in the linked logfile in my original post. My provider is useless.

Dave, did you have a chance to look at the sip trace in the logfile?

Hello Dave,
I have found this thread looking for a solution to a similar problem.
Could you please recommend me any “foreign caller ID” friendly trunk providers?
All the providers I know (not so many, really) will override the CID sent by my PBX with the CID of their trunk…
Any information will be much appreciated!
Thanks!
Fabian

I use Alcazar Networks for all of my pass-through stuff. VOIP Innovations also allows Foreign Caller ID, as do many others.

Try IDT.


They allow any Caller ID.