extension-to-voicemail / COMPILE ERROR / regex / plus sign in ${caller_id_number}

Status
Not open for further replies.

Thorsten

New Member
Jun 21, 2017
11
1
3
50
Hi,

I setup a freeswitch 1.10.1 with FusiobPBX 4.4.8 - works fine so far. But everytime we receive an incoming call we get the following error:
[ERR] switch_regex.c:104 COMPILE ERROR: 1 [nothing to repeat][^+491751234567$]

I found out, that this is caused by the diaplan "extension-to-voicemail". There you can found:
condition : destination_number : ^{caller_id_number}$

Our SIP-Provider presents the caller_id_number with a leading plus sign. So the plus sign must be escaped but of course it isn't. And this leads to this error.

Do you havy any idea, how to solve this? Perhaps I have to search/replace caller_id_number before (search "+" and replace "\+")? But I do not relly know how to do this here.

Best regards, Thorsten
 

ad5ou

Active Member
Jun 12, 2018
887
197
43
I’m not familiar with your number patterns but the snippet below strips the “+1” in North American numbers and might help.
caller_id_number=${regex(${caller_id_number}|^\+1([0-9]{10})$|%1)}

I have this in my caller-details dial plan.
 
  • Like
Reactions: Adrian Fretwell
Status
Not open for further replies.