CallerID - Match null on inbound route?

I’m running a FreePBX 13.0.167 system with PRI (ISDN30 in the UK) and several DDIs. The system is working great except the telco transmits the incoming caller ID without the leading 0, i.e. they are sending 1123445678 rather than 01123445678. This is OK but a little annoying as users can’t hit ‘redial’ from their phone history, instead they have to type the number out to include the 0.

I have got around this by sending inbound calls to the ‘Set CallerID’ module and adding the leading 0 in there, so I have 0${CALLERID(num)} and this works perfectly for calls which have an inbound Caller ID. However, in cases where the caller did not provide a caller ID - i.e. if they are anonymous or withheld - the telco does not send any caller ID info at all. On an inbound call, the caller ID is shown as “”. What then happens is that the ringing phone displays 0 rather than anonymous/unknown as my above solution is prefixing a 0 to nothing.

Is there a way to match calls in inbound routes with ‘null’ data - i.e. no caller ID data provided - and I can then send this straight to the queue without going via the Set CallerID module? I have tried to play with it but can’t seem to find a way. All I want to do is differentiate between the inbound calls to a certain DDI with caller ID so we can prefix it correctly, and those without so we don’t try to prefix a 0. This is a mild annoyance rather than a huge issue but it would be nice for the phones to display ‘unknown’ rather than just 0.

Thank you!

Sounds like you need to craft up a special inbound context. It should do pretty much everything you’re doing now (calling the Set Caller ID context) but check the inbound CID first before processing.

Have you asked your telco to send the extra digit you are missing? Here in the states I had to ask my sip provider to send me only 10 digits it was originally 11.