SOLVED Stripping 0s from Caller ID Numbers

Status
Not open for further replies.

etsiot

Member
Jan 14, 2018
46
1
8
54
Hello,

have setup a new FusionPBX in a small office environment.

Using a Grandstream GXW4108 as PSTN gateway which for some reason prefixes a zero (0) in the Caller ID number in some cases.
This is really erratic, irrespective of incoming trunk.

I need to strip this leading zero when it appears, since it creates issues with redialing.

I tried using the Misc. Dialplan tools examples but couldn't make it work in FusionPBX.

I tried with the following regex 0*(\d+) but apparently I am missing something in the configuration of the inbound routes.

Is there some example as to how FusionPBX inbound route should be configured? Have not found any...

Thanks in advance,

Vangelis
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
The translate module, I do not know how it works, I've never played with it but look in the hints and tips section and have a google around. Google for mod_translate
 

etsiot

Member
Jan 14, 2018
46
1
8
54
Yep, I think I got it,

steps taken to make it work for anyone else looking to do that:

1) installed mod_translate using apt-get install freeswitch-mod-translate
2) created a translate.conf.xml in /etc/freeswitch/autload_configs directory
3) configuration in the conf:

<include>
<configuration name="translate.conf" description="Number Translation Rules">
<profiles>
<profile name="GR">
<rule regex="^0*(\d+)$" replace="$1"/>
</profile>
</profiles>
</configuration>
</include>

4) start the module in FusionPBX Advanced->Modules

5) In Inbound Route definition added the following Action

Action -> Set -> effective_caller_id_number=${translate(${caller_id_number} GR)}

before bridging the call to the extension
 
  • Like
Reactions: DigitalDaz
Status
Not open for further replies.