Delete country code RO +4

The reason is that CID Superfecta is not sending name for incoming calls.
Testing it, all seems to be working. CID Superfecta is also enabled in Inbound Routes.

My /etc/asterisk//extensions_custom.conf:
[…]

[from-pstn-e164-us]
exten => +1NXXNXXXXXX/+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => _+1NXXNXXXXXX/_NXXNXXXXXX,2,Goto(from-pstn,${EXTEN:2},1)
exten => +1NXXNXXXXXX/+NX.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => _+1NXXNXXXXXX/_011NX.,n,Goto(from-pstn,${EXTEN:2},1)
exten => _+1NXXNXXXXXX,1,Goto(from-pstn,${EXTEN:2},1)
exten => [0-9+]./+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => _[0-9+]./_1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):1})
exten => _[0-9+]./_NXXNXXXXXX,n,Goto(from-pstn,${EXTEN},1)
exten => [0-9+]./+NX.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => _[0-9+]./_011NX.,n,Goto(from-pstn,${EXTEN},1)
exten => _[0-9+].,1,Goto(from-pstn,${EXTEN},1)
exten => s/_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => s/_NXXNXXXXXX,n,Goto(from-pstn,${EXTEN},1)
exten => s/_+NX.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => s/_011NX.,n,Goto(from-pstn,${EXTEN},1)
exten => s,1,Goto(from-pstn,${EXTEN},1)

[…]

I want transform +40364123456 to 0364123456.
Thanks.

Wouldn’t this be something you handle in Outbound Routes → Your route → Dial Patterns?

If this is for inbound calls, I used the Set Caller ID module to remove the +440 which my provider prefixed to the incoming numbers. I had been having issues with the internal address book not recognising numbers and displaying associated names.

I’m bit late to this party but I have a context for you that may help you :slight_smile:
The E164 context you listed is specifically for the US, the below is for EU.
Mine was for NL, but I edited it for Romania for you.

The first two lines are an extra as my provider occasionally delivered numbers with a plus.

Put this in extensions_custom.conf and put this context (from-pstn-ro-e164) in your sip trunk under Context.

[from-pstn-ro-e164]
exten => _.,1,NoOp(International or RO)
exten => _.,n,gotoif($[“${CALLERID(num):0:3}”=“+40”]?ROPLUS)
exten => _.,n,gotoif($[“${CALLERID(num):0:1}”=“+”]?INTPLUS)
exten => _.,n,gotoif($[“${CALLERID(num):0:2}”!=“40”]?INT)
exten => _.,n,gotoif($[“${CALLERID(num):0:2}”=“40”]?RO)
exten => _.,n,Goto(from-pstn,$(EXTEN),1)
exten => _.,n(RO),NoOp(It’s Romanian!)
exten => _.,n,Set(CALLERID(num)=0${CALLERID(num):2})
exten => _.,n,Goto(from-pstn,${EXTEN},1)
exten => _.,n(ROPLUS),NoOp(It’s Romanian!)
exten => _.,n,Set(CALLERID(num)=0${CALLERID(num):3})
exten => _.,n,Goto(from-pstn,${EXTEN},1)
exten => _.,n(INT),NoOp(It’s international!)
exten => _.,n,Set(CALLERID(num)=00${CALLERID(num):0})
exten => _.,n,Goto(from-pstn,${EXTEN},1)
exten => _.,n(INTPLUS),NoOp(It’s international!)
exten => _.,n,Set(CALLERID(num)=00${CALLERID(num):1})
exten => _.,n,Goto(from-pstn,${EXTEN},1)

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.