I have been using freepbx 2.11 for a long time but now changing to freepbx 15.
I have the following setup / problem.
Incoming sip line for NL BE and DE.
whenever someone from Germany calls my German number their caller id starts typically with 0 and than a number from 1-9.
when someone from Germany calls my Dutch number the caller id starts with 00 than a number from 1-9
The problem I have is that 2 extension a mobile cellphones and the caller id of the incoming number is also transferred to the cellphone.
So when a german call comes in and caller id is 0and than number 1-9 this is transferred to my cellphone. The problem is on the cellphone I am unable to see that this is a call from germany.
In the current setup I have therefore added 0049 to the incomming number. So whenever a call comes in where the number starts with 0 next number is 1-9 the 0 is stripped and replaced by 0049.
Whenever someone from say France calls the german number being an international call the number will already contain 0033 or +33. Thin than case the number show not be changed.
Freepbx has a mobile set cid to change the incoming caller if.
In freepbx 2.11 I used this syntax:
${IF( $[ ${CALLERID(num):0:2} : "00" ] ? "+${CALLERID(num):2}" :${IF( $[ ${CALLERID(num):0:2} : "0[1-9]" ] ? "+31${CALLERID(num):1}" :"${CALLERID(num)
Don’t know anymore how I came to this but it still works fine.
I can use IF before called ID and than set called ID if it is according to the if setting.
The freepbx 15 module seems to work different. I can use " anymore.
So far after some hours of testing syntaxes I have been able to do the following 2 lines that work when used individual
${IF${CALLERID(num)}0[1-9]}+31${CALLERID(num):1}
when incoming caller is is say 0101234567 it will replace this with +31101234567
${IF${CALLERID(num)}00}+${CALLERID(num):2}
when incoming caller is is 0031101234567 it will replace this with +31101234567
Next step is I need to combine these in 1 line
${IF${CALLERID(num)}0[1-9]}+31${CALLERID(num):1}
${IF${CALLERID(num)}00}+${CALLERID(num):2}
but above doesn’t works. anyone know how I can do this.