I use isdn cards with asterisk-dahdi and all warks fine.
I just have a problem of prefix detection, I’m in france and when I receive a national call the “0” isn’t there, and when I receive internationals calls the “00” isn’t shown.
I already put
internationalprefix=00
nationalprefix=0
in chan-dahdi.conf but I have still the same problem.
I try to find in google but nothing that can help me.
You should be getting 1 when you are expecting 00 and 2 when you are expecting 0. If you are getting anything else, you will need to take the matter up with the network operator, or use heuristics, e.g. number length.
[correction-callerid]
exten => 1,1,noop(Correction du format du callerid)
same => n,GotoIf($[${CALLERID(num)} = “”]?fincorrection)
same => n,GotoIf($[${LEN(${CALLERID(num)})} = 9]?neufchiffres)
same => n,GotoIf($[${CALLERID(num):0:2} = 33]?debut33)
same => n,goto(fincorrection)
same => n(neufchiffres),Set(CALLERID(num)=0${CALLERID(num)})
same => n(neufchiffres),goto(fincorrection)
same => n(debut33),Set(CALLERID(num)=0${CALLERID(num):2})
same => n(debut33),goto(fincorrection)
same => n(fincorrection),NoOP(CALLERID->${CALLERID(num)})
same => n,Return()
And that works, but only for national incoming calls.
How can I create something similar that correct international incoming CIDs without specify one rule for each country?
For example, I think that I can create a rule with wich I add “00” to callerid with more than 9 figure, but there are some exception at this rule…