SOLVED Prepend incomming callerid

Status
Not open for further replies.

comdif

New Member
Apr 18, 2019
18
2
3
64
France
Hello, I'm very noob on FPBX and Freeswitch and I have no idea how to manipulate the dialplan.
When I receive a national call the Callerid is 0XXXXXXXXX and I get only 9 last digits without 0

On Asterisk I use this dialplan on inbound context
[inbound]
exten => s,1,Set(CALLERID(num)=${IF($[${LEN(${CALLERID(num)})}=9]?0${CALLERID(num)}:${CALLERID(num)})})
same => n,answer
same => n,Goto(from-pstn,${EXTEN},1)

Any doc or help on this subject ?
Thank's
Christian
 

comdif

New Member
Apr 18, 2019
18
2
3
64
France
I have modified inbound route and add a line Action set effective_caller_id_number=0${caller_id_number} and it work fine
But how to do it only for condition callerid is 9 digit
 

comdif

New Member
Apr 18, 2019
18
2
3
64
France
Thank's DigitalDaz, this guide is a very interesting explaination for genius, I'm not but I can understain as I use many time notepad++ regular exp module and it seem very close I understain $1, $2 is the pattern into the ().
Right when I go to the inbound dialplan editor I select regex and can't see my custom number translation.
So I can't understain how to use it
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
So what comes in and what do you want? I don't understand the asterisk :)
 

comdif

New Member
Apr 18, 2019
18
2
3
64
France
Right as your recommendation I make this to get french national good format
1556172210530.png
I'm not sure to understain how to use it then for change incomming callerid number ?
is this the correct way in sip external profile:
1556172872961.png
 

comdif

New Member
Apr 18, 2019
18
2
3
64
France
Ok it work, correct Value is Translate:fr_in,XML
But it change not only caller_id_number, it change also destination number so I have changed destination with the 10 digits number and it work
I have added also in my inbound route dialplan
effective_caller_id_name=${caller_id_number} as my provider send the caller_id_number as callerid name

This do exacty what I need thanks :)
 
Status
Not open for further replies.