DanieleDiGiovanna | 2024-11-26 10:17:58 UTC | #1
Hi,
I'd like to transform called address on outbound calls using regex on the external trunk configuration.
If there is +39 in front of the number, I need to delete it.
After that, if the phone number is longer than 6 characters, I need to put "0" in front of the number.
I configured the regex:
^(sip:|tel:|sip[s]:)(\+39)(.*) $1$3 --> to delete the +39, it works correctly
^(sip:|tel:|sip[s]:)(\d{6,})$ $1\x30$2 --> to add 0 (zero), but it doesn't work.

Called +393405438365 or 3405438365 the call comes out as: tel:3405438365 --> KO
Called 3456 or +393456 the call comes out as: tel:3456 --> OK
Using regex101.com, It seems to be working fine, but on GenesysCloud doesn't work.


Can you please help me to configure it?
Kind Regards,
Daniele
sjnoh | 2024-11-28 08:16:24 UTC | #2
Try it like this
${1}0${2}
DanieleDiGiovanna | 2024-11-28 09:46:54 UTC | #3
Hi, I already tried but it doesn't work. The problem is not the substitution but the regex. Trying with this: ^(sip:|tel:|sip[s]:)(.*)$ the substitution works correctly.
system | 2024-12-29 09:47:02 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 30564