Nullx8
Nullx8

Reputation: 137

asterisk incoming call CID rewrite

I have the following rules set for my german based SIP account (the idea is to have on ALL numbers coming through this Trunk to add 0049 and strip the first 0 so i can callback using the 0049 calling rule and number-matching in the adressbook works much better.

this is the rules I have applied

exten=s,1,NoOp(${CALLERID(num)})
exten=s,2,ExecIf($[ "${CALLERID(num)}"="" ],Set,CALLERID(all)=unknown <0000000>)
exten=s,3,ExecIf($["${CALLERID(NUM):0:1}" = "0"],Set(CALLERID(num)=0049${CALLERID(num):1}))
exten=s,4,Goto(ringroups-office-1|s|1)

but calls coming in missing the "00" and just showing 49xxxxx any idea what that could be?

hard guess: it's something stupid I missed :P

Upvotes: 2

Views: 2742

Answers (1)

arheops
arheops

Reputation: 15259

Try this:

exten=s,3,ExecIf($["${CALLERID(NUM):0:1}" = "0"],Set(CALLERID(num)="0049${CALLERID(num):1}"))

Upvotes: 3

Related Questions