Outbound CID from Extensions not displaying correctly

I am having an issue that many people seem to have had but can’t seem to resolve the problem. So apologies in advance as it is something I have missed.

I have FreePBX 15.0.17.24 configured with;

1 Outbound route, outbound route configured with Route CID , Override Extension set to No

1 Outbound trunk PJSIP, trunk configured with Outbound CallerID , CID Options set to Allow Any CID

Several Extensions configured with Outbound CID set to

I have looked at the following post https://community.freepbx.org/t/outbound-cid-not-working/57027/3 to resolve the issue

  1. The provider. If they are messing with your CID, you are stuck.

This is not an issue as I can set the on the outbound route and it displays correctly on the receiving party’s phone

  1. The trunk definition. If you set an overriding CID here, nothing you put below will be honored.

I have tried a blank CID but there is no change

  1. The Outbound Route definition. Here, if you set the Caller ID, it’s because a phone/outbound combination has led you to overriding the extensions’ default CIDs.

I have tried a blank CID and there is no change but as mentioned in point 1 if I set the as the CID it display correctly

  1. The Extension definition. This is the CID associated with the extension. Usually, it’s the easiest way “back” to this phone, which could be a personal extension DID or an Extension Number for local calls.

I have configured the Extension CID as but it doesn’t change the outbound CID

5?> The phone app itself. Some technologies allow you to set a CID at the actual phone (my PY-90 phone at the Farm, for example).

I am using Yealink T46S

I there any where else in the settings I need to look at or change to allow extensions to determine the CID?

Thanks

Is this a new issue that just started? If so, you can probably resolve with a core module upgrade. If already upgraded, provide a call trace via pastebin
https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-AsteriskLogs-PartII

No its a new DID for a separate department.

Interestingly when I run the CDR report indicated in the link you posted Lorne the outbound caller ID reported in the Call Detail Report is as configured for the extension.

https://pastebin.freepbx.org/view/3c0489c9

The call leaves the system bearing the CID number as set on line 113. It that’s not what’s showing up at the far end, I would say this is a provider issue.

113? - do you mean 220?

If I set the CID on the outgoing route to 0855511777 it does display correctly as 0855511777 on the receiver’s handset - is that still possible if the provider is the issue?

I have spoken to the provider and they said that the out going CID can be set to any of the DIDs on their trunk.

I have just spoken to the provider and on checking their logs they are presented with the default outbound route CID from an out bound call.

I have checked the outbound route and it does not have the CID over ride checked.

The recent bug in core could be affecting you; see

If that’s not it, at the Asterisk command prompt type
pjsip set logger on
make a test call, paste the log (which will now include a sip trace) and post the link here. Make it clear what the extension, outbound route and trunk CID values are.

1 Like

There is no one onsite at the moment, so I couldn’t get them to ring from a hand set but I used the cli command channel originate local/00777766550@from-internal extension 350@from-internal which I’m hoping will replicate a handset call from ext 350

https://pastebin.freepbx.org/view/9b7edfa0

I believe that the channel originate command did exactly what you wanted.

Line 105:
[2021-02-26 06:47:21] VERBOSE[15246][C-00005fed] pbx.c: Executing [s@macro-outbound-callerid:32] ExecIf("Local/00777766550@from-internal-000000f1;2", "1?Set(CALLERID(all)=ABCDEFG <0866668307>)") in new stack

is AFAICT the last update of caller ID prior to the Dial on line 147:
[2021-02-26 06:47:21] VERBOSE[15246][C-00005fed] app_dial.c: Called PJSIP/0777766550@Simtex

So I’m guessing that the problem is with the trunk settings or number format. Unfortunately, the pjsip logger info is missing, so we can’t see what actually went wrong.

When you issue at the Asterisk command prompt:
pjsip set logger on
you should see a response of
PJSIP Logging enabled
If not, post details.
Also, note that Apply Config or any restart or reload of Asterisk will cancel the logger setting, so you would have to issue it again.

Please try to re-enable pjsip logger, make another test call, paste the log and post the link.

I ran the command as requested and it responded with enabled, but I have made another call with the log following

https://pastebin.freepbx.org/view/48abea13

Somehow the SIP trace did not appear. I don’t know how to troubleshoot that. Possibly, it will appear on the console even if it doesn’t appear in the log. With the Asterisk command prompt open and logger enabled, see whether it shows up on a new test call.

These are images of the settings

Trunk

Outbound Route

Extension

If we can’t see a SIP trace, here are two guesses:

  1. The caller ID format is incorrect. If your number is 7654 3210 in Sydney, Engin probably wants 0276543210, 61276543210 or +61276543210. Find out from their documentation. If lacking a good bet is to send it in the same format as they send you on incoming calls.

  2. It’s in the wrong header. If you have From User set for the trunk and it’s not required, turning that off may work. If From User is required, then you probably need to set Send RPID/PAI appropriately. Again, see their documentation or see what gets sent on incoming calls.

Thanks Stewart I will have a go on the weekend to see if changes on the trunk setting make a difference.

I have spoken to simtex support but they couldn’t really provide any further information other than the main DID number was being presented at their end for outbound calls.

OK I think I know why the PJSIP wasn’t showing - I was using an extension the was chansip. See if the SIP details are the following

https://pastebin.freepbx.org/view/a60a98b2

That should not make any difference. If the extension is chan_sip and
sip set debug on
was not issued, then you won’t see the SIP trace for the extension, but requests to and responses from the pjsip trunk should still be present.

In the most recent log, an outside call was not made at all. You called ext. 350 and I presume it was intended to make an outside call (follow-me, forwarding, etc.) but it didn’t and I did not take the effort to find out exactly why, as it doesn’t seem relevant to the problem at hand.

I have no idea why pjsip logger is not writing to the Asterisk log. in Settings → Asterisk Logfile Settings → Log Files, my system shows for ‘full’: Debug, Error, Notice, Verbose and Warning are On. If you have one or more of these off, see whether turning them on (and turning pjsip logger back on after Submit and Apply Config) makes a difference.

If not, after turning pjsip logger on, leave the Asterisk command prompt open, make a test call and see whether the SIP trace appears on the console. If it’s not there, either, you should still be able to run sngrep to see the outbound INVITE sent to the trunk.

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