Remove incoming +46 replace with 0046

Hi …

Im trying to fix in the context in extensions.conf so that when a orginating number is calling in the +46
will transform/rewrite to 0046 i tried a lot of things with teh callerid, but it doesnt work it still shows +46.
Does anyone have any tips how to set the extensions so it works?

There are examples of basic prefix re-writes, like this, in the sample extensions.conf.

Like, David says you should do it rather simply. Jus use CallerID(num) and the methods for number manipulations that are bult in the Asterisk dialplan.

Hi …

Thanks for your suggestion , but I dont get it to work…
I tried a lot of different stuff, but i dont get the number up to our application…
I have set it like this…

_0141544XXX,1,Agi(agi:async),(callerid(num)=015${callerid(num)})

Just to see if it makes any difference and it doesnt, also tried to strip off the +46

also tried something like this, but no luck

exten => _X!,1,GotoIf($["${CALLERID(num):0:2}" != “+1”]?noplusatstart)
exten => _X!,n,NoOp(Changing Caller ID number from ${CALLERID(num)} to ${CALLERID(num):1})
exten => _X!,n,Set(CALLERID(num)=${CALLERID(num):1})
exten => _X!,n(noplusatstart),Goto(from-trunk,${EXTEN},1)

I read the original question as being about the extension number, not the caller ID number.

The parentheses are wrong on the AGI call. As I don’t know what your script does, I can’t say more than that.

The second example strips a + from numbers starting +1. It does nothing to numbers starting +46, and certainly doesn’t add a 00.

[quote=“david55”]I read the original question as being about the extension number, not the caller ID number.
[/quote]

You are probably correct. In that case the original poster needs to modify the EXTEN variable.