Emergency CID - Correct on 999 but not 112

Hi,

We’re having an issue with the CID when emergency calls are made, calls from 999 are configured as the correct CID but calls from 112 are not.

Extension 320 is configured with the Emergency CID 0208xxxxx95
Class of Service configured for emergency routes that give the 320 extension access to the emergency route only
Outbound Routes configured. Emergency is at the top of the list, and configured as Emergency route. Numbers configured are [112] and [999], and also with prefix ( ) 9|[112] and prefix ( ) 9|[999]

When I look at the logs they appear to be correct, both showing the correct CID number. However, the emergency services have advised that calls on 112 are not coming from the correct CID (unfortunately they can’t tell us what number is showing at their end).

The log appears to be fine, and both show the correct number:

Wed, Aug 31, 2022 1:18 PM	HANGUP	1661948274.35565	1661948274.35565	0208xxxxx95	h	restrictedroute-98c6f2c2287f4c73cea3d40ae7ec3ff2	PJSIP/320-00002486
Wed, Aug 31, 2022 1:18 PM	CHAN_END	1661948274.35565	1661948274.35565	0208xxxxx95	h	restrictedroute-98c6f2c2287f4c73cea3d40ae7ec3ff2	PJSIP/320-00002486
Wed, Aug 31, 2022 1:18 PM	LINKEDID_END	1661948274.35565	1661948274.35565	0208xxxxx95	h	restrictedroute-98c6f2c2287f4c73cea3d40ae7ec3ff2	PJSIP/320-00002486
Wed, Aug 31, 2022 1:17 PM	CHAN_START	1661948275.35566	1661948274.35565		s	from-trunk	SIP/Group-00000cf2
Wed, Aug 31, 2022 1:17 PM	ANSWER	1661948275.35566	1661948274.35565	112	112	from-trunk	SIP/Group-00000cf2
Wed, Aug 31, 2022 1:17 PM	ANSWER	1661948274.35565	1661948274.35565	0208xxxxx95	s	macro-dialout-trunk	PJSIP/320-00002486
Wed, Aug 31, 2022 1:17 PM	BRIDGE_ENTER	1661948275.35566	1661948274.35565	112		from-trunk	SIP/Group-00000cf2
Wed, Aug 31, 2022 1:17 PM	BRIDGE_ENTER	1661948274.35565	1661948274.35565	0208xxxxx95	s	macro-dialout-trunk	PJSIP/320-00002486
Wed, Aug 31, 2022 1:17 PM	CHAN_START	1661948274.35565	1661948274.35565	320	112	from-internal	PJSIP/320-00002486

999 Call log

Time	Event Type	UniqueID	LinkedID	Cid num	Extension	Context	Channel Name
Wed, Aug 31, 2022 1:16 PM	HANGUP	1661948115.35563	1661948115.35563	0208xxxxx95	h	restrictedroute-98c6f2c2287f4c73cea3d40ae7ec3ff2
Wed, Aug 31, 2022 1:16 PM	CHAN_END	1661948115.35563	1661948115.35563	0208xxxxx95	h	restrictedroute-98c6f2c2287f4c73cea3d40ae7ec3ff2
Wed, Aug 31, 2022 1:16 PM	LINKEDID_END	1661948115.35563	1661948115.35563	0208xxxxx95	h	restrictedroute-98c6f2c2287f4c73cea3d40ae7ec3ff2
Wed, Aug 31, 2022 1:16 PM	BRIDGE_EXIT	1661948115.35563	1661948115.35563	0208xxxxx95	s	macro-dialout-trunk
Wed, Aug 31, 2022 1:16 PM	BRIDGE_EXIT	1661948116.35564	1661948115.35563	999		from-trunk
Wed, Aug 31, 2022 1:16 PM	HANGUP	1661948116.35564	1661948115.35563	999		from-trunk	SIP/Group-00000cf1
Wed, Aug 31, 2022 1:16 PM	CHAN_END	1661948116.35564	1661948115.35563	999		from-trunk	SIP/Group-00000cf1
Wed, Aug 31, 2022 1:15 PM	CHAN_START	1661948116.35564	1661948115.35563		s	from-trunk	SIP/Group-00000cf1
Wed, Aug 31, 2022 1:15 PM	ANSWER	1661948116.35564	1661948115.35563	999	999	from-trunk	SIP/Group-00000cf1
Wed, Aug 31, 2022 1:15 PM	ANSWER	1661948115.35563	1661948115.35563	0208xxxxx95	s	macro-dialout-trunk	PJSIP/320-00002485
Wed, Aug 31, 2022 1:15 PM	BRIDGE_ENTER	1661948116.35564	1661948115.35563	999		from-trunk	SIP/Group-00000cf1
Wed, Aug 31, 2022 1:15 PM	BRIDGE_ENTER	1661948115.35563	1661948115.35563	0208xxxxx95	s	macro-dialout-trunk	PJSIP/320-00002485
Wed, Aug 31, 2022 1:15 PM	CHAN_START	1661948115.35563	1661948115.35563	320	999	from-internal	PJSIP/320-00002485

Please provide a call trace via pastebin

https://wiki.freepbx.org/display/SUP/Providing+Great+Debug#ProvidingGreatDebug-AsteriskLogs-PartII

I imagine that could be difficult as they need to have a real emergency before they can legitimately use either of these numbers, which are the UK and EU equivalents of the US 911.

Hi,

Thanks for the reply.

I may be missing something here (relatively new to FreePBX/PBXact). I went to the CDR log (/admin/config.php?display=cdr) and found the call. Grabbed the system ID, and tried to search in the logs.

Unfortunately nothing was returned:

[[email protected] ~]# grep 1661948274.35565 /var/log/asterisk/full*
[[email protected] ~]#

In the log settings only Error, Notice, and Warning are turned on for logging, everything else is off - does that need changing? Or am I simply way off the mark!

One would normally have verbose enabled, typically with verbosity set to 5, although 3 may be enough. Verbose logging is necessary to see the dialplan execution.

Thanks.

I’ll enable it and then run a new test to see what happens.

Turn on ‘debug’ for full logs on Asterisk Logfile Settings, then you should see your calls in there.

Thanks, got it all turned on now and we have scheduled an emergency test call (takes around 48 hours). Once its done will send an update with the debug information.

Pastebin generated following recent test call -

999 Test Call - Automatic Pastebin from Sangoma OS 7 - FreePBX Pastebin
112 Test Call - Automatic Pastebin from Sangoma OS 7 - FreePBX Pastebin

Only the 112 is not showing the correct CID, but it looks correct to me.

Any thoughts on this? Bit stuck myself as can’t see why its not working when it all looks like it should be.

Both calls appear to be leaving the PBX with the CID number set identically. You can also confirm this by checking the outbound cid column in the CDR for the calls in question. If the calls are ultimately terminated using a different cid number, then you should look further downstream.

Is there any reason why you can’t translate 112 to 999 in the PABX (for non-UK readers, these numbers are equivalent: 999 is the traditional number, and 112 is EU one; I think 911 may also be recognized by the network - there are reports that it works at least some time).