SOLVED Manipulating Incoming CLI

Status
Not open for further replies.

Skeelkat

Member
Jun 26, 2020
35
4
8
41
I have been racking my brain and looking at example and still cannot figure this out.

I have a FusionPBX (4.5.14 | Switch Version 1.8.4) connected to a Unify OpenScape Business as a peer. Everything inbound and outbound works like a charm however the OpenScape Business has a tendancy to add the Trunk Group number to the incoming CLI. This is normal behaviour for the OpenScape Business as it presents the number to desk phones in a manner that they can be dialled back.

Thus incoming calls forwarded to the FusionPBX are presented as follows 00026461XXX XXX insted of +26461XXX XXX. I would like to strip the 000's and replce it with a + on calls that comes from the OpenScape Business but have no idea where this is done.

This is also true for calls originating from other International Destinations e.g. +264 is for Namibia, however calls from South Africa +27 is also presented by e.g. 0002711XXX XXXX
So basically it is always 000's that needs to change to +

Can anyone please help a noob out?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
You are probably looking for something like this in your inbound route:
Code:
action          set      effective_caller_id_number=${regex(${caller_id_number}|^000(.*)$|+%1)}

This will take the caller_id_number and strip the leading 000 and add the +.
 

Skeelkat

Member
Jun 26, 2020
35
4
8
41
You are probably looking for something like this in your inbound route:
Code:
action          set      effective_caller_id_number=${regex(${caller_id_number}|^000(.*)$|+%1)}

This will take the caller_id_number and strip the leading 000 and add the +.

Brilliant! Thank you so much Adrian, worked like a charm.
 
  • Like
Reactions: Adrian Fretwell
Status
Not open for further replies.