Need Help Understanding Trunk Caller ID (CID) in FreePBX 17

I’m using FreePBX v17 and need some help figuring out how caller ID works on my SIP trunk.

Here’s my setup:

  • I’ve set “Force Trunk CID” on my SIP trunk because I want all outbound calls to show the trunk’s number (not the extension’s).
  • For example, if extension 301 calls out, I don’t want it to attempt to send caller ID as “John <301>”, since that’s not a valid external number.
  • If I send the wrong caller ID to sip provider it might set the CID as “anonymous” for my recipients, and that’s why I used “Force Trunk CID” to avoid that.

The problem now is that on my Yealink phones, all outbound calls in the call log just show “CID: 020XXXXXXX” instead of the number I called - I have to select more details to see the actual number.

I’ve read that setting the trunk to “Allow Any CID” can fix the call log issue, but I’m worried that it might try to send the extension’s CID instead of the trunk’s, which my provider may reject.

Can someone confirm what happens if I use “Allow Any CID”? Will it still send the trunk CID or try to use the extension’s?

Thanks!

Hi @johnr
Set "Override Extension " to Yes for outbound route and give a try

If this setting is set to Yes, the extension’s Outbound CID will be ignored in favor of this CID. The extension’s Emergency CID will still be used if the route is an Emergency Route and the Extension has a defined Emergency CID.

What is the actual number you are dialling? Is the 020 the prefix of the outbound route?

What you are seeing on your phone is the ConnectedLine details which isn’t going to be the same as the CallerID details. You need to describe this with more detail. What number did you dial, was there a prefix dialled for it and what is the CallerID number to be set. You can mask it but at least provide the context.

1 Like

For examples sake lets say my business number is 02031231234 and that’s what my SIP trunk provider use as my caller ID when I call external people.

Then regardless of what I dial. I have a outbound route with no prefix at all, the dial pattern match is set to 0Z. so for example if i dial 0791235432X (annonymised) and regardless of what number matching 0Z. pattern I dial to make outbound calls, all the history on my Yealink Phones show “CID: 02031231234” but if i look at the Yealink logs it stores it as “CID: 02031231234 <0791235432X>” therefore the actual number is stored in the history and I am able to make the redial call from the history but it just does not help that all my history items are all labelled “CID: 02031231234” I then have to go into each one and click the Details option on the Yealink phone to see the number.

Hope that makes sense.

OK so this is a ConnectedLine issue, you can tell that because of the CID: part being displayed on your phone. This has nothing to do with Outbound CallerID at any level outside of what should be displayed.

ConnectedLine is like reverse CallerID, it provides details back to the caller that will display on their phone like CallerID for the call. So you will see "CID: <Outbound CallerID Number>" as the Name display and the actual dialled number as the Number display.

Go into the extension in question and set “Send Connected Line” to No because by default the extension will accept any ConnectedLine updates sent to it. See if that helps.

1 Like

OK thank you. I will try this and report back. The reason I was thinking that it had something to do trunk CallerID was because the label on the yealink history is always the word CID followed by the trunk’s callerID

Nope, that is how FreePBX sets ConnectedLine details for outbound calls. Has for years and years.

1 Like

I tested this on a test replica VM environment I have and it works awesome. But as I have a dummy SIP trunk on my VM I will check with the real one when i’m on-site tomorrow.

Out of curiosity is there a reason this Send Connected Line is set to Yes by default? as I cannot think of why someone would want to display the Caller ID in the history rather than the number that they actually dialled.

Also, for future extensions that I add, is there a way to set it to default to No for new extensions?

Thank you for all your help :folded_hands: Much appreciated.

It’s enabled by default in Asterisk and how the ConnectedLine details are sent back are based on how the dialplan is configured. In FreePBX this is how they format the ConnectedLine details for outbound calls over trunks like this.

The call history is showing the name field in the list, not the number field. You are conflating what a field gets populated with as the dialled number. If the name field is empty it is most likely populated the number because otherwise it would be blank.

1 Like

So even though this “Send Connected Line” was set to No on my test VM which seemed to work on my test VM. The onsite one I just tested it and this time instead of CID: it’s now showing as ID: instead of CID. The two setups are identical except that the test VM doesn’t have a working sip trunk just a dummy one with same settings.

It even tried setting the trunk to Allow any CID option and when I did that the display story changed to CID: 301 as in the extension number instead of the dialled number

So, I think problem may now be solved. So it was a combination of things. send Connected Line being set to No is the main setting but for some reason on it’s own it was not working. I had to make sure Send RPID/PAI was also set to No on extension level and trunk level

With this being set, it seems to be working correctly now.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.