Number Translations are not behaving as expected and as before

Status
Not open for further replies.

Daniel

New Member
Oct 30, 2018
12
1
3
49
Dear all,

I have an old installation of FusionPBX and a brand new new installation that behave differently and I don't know why. It's about the fact that I want to modify the calling number as it is to be dialed when calling back from the local area network.

The number translation looks like this:
^\+492331(\d+)$ > $1
^\+49(\d+)$ > 0$1
^\+(\d+)$ > 00$1

It is called in an inbound route (order 20):
action set
effective_caller_id_number=${translate(${effective_caller_id_number} ONKZ)}

In the old installation it works fine. In the new installation, the result is always "1". In the log I see the following difference:

old OK:
2 2023-05-28 20:44:26.624595 [DEBUG] mod_translate.c:137 +49233112345 =~ /^\+492331(\d+)$/

new NOK:
1 2023-05-28 18:29:45.864975 97.30% [DEBUG] mod_translate.c:137 +49233112345 =~ /^\+492331(\d+)/

The regex is missing the trailing "$".

Does anyone have any good ideas what else I could check?

Best regards
Daniel
 

matt

Member
Oct 30, 2017
36
1
8
47
Hi,

The problem lies in this file: /var/cache/fusionpbx/configuration.translate.conf

You can fill in the missing "$" there, but everytime you clear the cache you have to redo it.
Somehow the file isn´t generated correctly.

Yours,

Matt
 

Daniel

New Member
Oct 30, 2018
12
1
3
49
Hello Matt,
Thank you for this workaround.

But that's an annoying bug. Is there anyone here who can and wants to fix this?

Best regards
Daniel
 
Status
Not open for further replies.