mod_translate issue

Status
Not open for further replies.

AndyX90

New Member
Nov 5, 2021
13
0
1
34
Germany
Hi i have created a translate profile for converting numbers DE_national_to_e164 (copied from GB default).

1687013302098.png
And i use it right before the bridge statement in outbound routes.

1687013629709.png

But the logs show the following:

2023-06-17 16:24:01.810642 98.70% [DEBUG] mod_translate.c:128 translating [01234567890] against [DE_national_to_e164] profile
2023-06-17 16:24:01.810642 98.70% [DEBUG] mod_translate.c:137 01234567890 =~ /^\+(\d+)/
2023-06-17 16:24:01.810642 98.70% [DEBUG] mod_translate.c:137 01234567890 =~ /^00(\d+)/
2023-06-17 16:24:01.810642 98.70% [DEBUG] mod_translate.c:137 01234567890 =~ /^0([1-9]\d+)/
2023-06-17 16:24:01.810642 98.70% [NOTICE] mod_translate.c:249 Translated: 491

It seems as it doesn't resolve $1 in that context.
Am i missing something?

Thanks
 

AndyX90

New Member
Nov 5, 2021
13
0
1
34
Germany
If i test outbound call with e164 format, the following happens:

2023-06-18 10:02:36.676536 99.97% [DEBUG] mod_translate.c:128 translating [+491234567890] against [DE_national_to_e164] profile
2023-06-18 10:02:36.676536 99.97% [DEBUG] mod_translate.c:137 +491234567890 =~ /^\+(\d+)/
2023-06-18 10:02:36.676536 99.97% [NOTICE] mod_translate.c:249 Translated: 1

I don't get it atm.
 

AndyX90

New Member
Nov 5, 2021
13
0
1
34
Germany
I checked everything again and noticed that on mod_translate startup the $ signs are stripped away.
But this happens on the default profiles as well.
Maybe somebody can doublecheck?

2023-06-18 20:34:00.515882 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^\+(\d+)] with [1]
2023-06-18 20:34:00.515899 0.00% [DEBUG] mod_translate.c:91 starting with an empty list
2023-06-18 20:34:00.515902 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^00(\d+)] with [1]
2023-06-18 20:34:00.515905 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^0([1-9]\d+)] with [491]
2023-06-18 20:34:00.515907 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^(\d+)] with [1]
2023-06-18 20:34:00.515908 0.00% [DEBUG] mod_translate.c:101 Adding rules to profile [DE_national_to_e164]
2023-06-18 20:34:00.515911 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^44(\d+)] with [01]
2023-06-18 20:34:00.515913 0.00% [DEBUG] mod_translate.c:91 starting with an empty list
2023-06-18 20:34:00.515921 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^(\d+)] with [001]
2023-06-18 20:34:00.515923 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^\+(\d+)] with [001]
2023-06-18 20:34:00.515925 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^44(\d{3,6})] with [1]
2023-06-18 20:34:00.515927 0.00% [DEBUG] mod_translate.c:101 Adding rules to profile [e164_to_GB_national]
2023-06-18 20:34:00.515929 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^00(\d+)] with [1]
2023-06-18 20:34:00.515931 0.00% [DEBUG] mod_translate.c:91 starting with an empty list
2023-06-18 20:34:00.515937 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^0([1-9]\d+)] with [441]
2023-06-18 20:34:00.515939 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^(\d+)] with [1]
2023-06-18 20:34:00.515941 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^\+(\d+)] with [1]
2023-06-18 20:34:00.515942 0.00% [DEBUG] mod_translate.c:101 Adding rules to profile [GB_national_to_e164]
2023-06-18 20:34:00.515944 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^\+(\d+)] with [1]
2023-06-18 20:34:00.515946 0.00% [DEBUG] mod_translate.c:91 starting with an empty list
2023-06-18 20:34:00.515948 0.00% [DEBUG] mod_translate.c:101 Adding rules to profile [remove_leading_plus]
2023-06-18 20:34:00.515950 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^(.*)] with [1]
2023-06-18 20:34:00.515952 0.00% [DEBUG] mod_translate.c:91 starting with an empty list
2023-06-18 20:34:00.515954 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^[^0-9a-fA-F#*]*([0-9a-fA-F#*]+)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*([0-9a-fA-F#*]*)[^0-9a-fA-F#*]*] with [123456789]
2023-06-18 20:34:00.515956 0.00% [DEBUG] mod_translate.c:101 Adding rules to profile [strip_non_digits]
2023-06-18 20:34:00.515959 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^(.*)] with [1]
2023-06-18 20:34:00.515961 0.00% [DEBUG] mod_translate.c:91 starting with an empty list
2023-06-18 20:34:00.515962 0.00% [DEBUG] mod_translate.c:89 Replace number matching [^[ (){}_-]*([^ (){}_-]+)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*([^ (){}_-]*)[ (){}_-]*] with [123456789]
2023-06-18 20:34:00.515964 0.00% [DEBUG] mod_translate.c:101 Adding rules to profile [strip_symbols]
 
Status
Not open for further replies.