Caller ID fix

My voip provider adds a 1 to all numbers coming in to my PBX. I have a script that removes the 1 from the CID and the DID, however if an anonymous call comes through it doesn’t process and just eventually hangs up on the person. Can anyone see what I’m doing wrong here?

[custom-fixedcid]

exten => _1NXXNXXXXXX/_1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):1})
exten => _1NXXNXXXXXX/_NXXNXXXXXX,2,Goto(from-pstn,${EXTEN:1},1)

It’s really a bad idea to allow anonymus calls on your IP PBX. For security reasons, set allowguest to no.

He means a call without caller ID, not one that doesn’t match a known peer.

I don’t see anything in that dialplan that matches a number without caller-id. You probably want a line without the / and caller-id pattern.

Hi joeyc83

I do something like that for the incoming on my system:

exten => s,n,NoOp( --- Check of the incoming number - START --- ) exten => s,n,GotoIf($[$["${CALLERID(name)}" = "Anonymous"] | $["${CALLERID(name)}" = "Unavailable"]]?s,setanonnum:) ; Is it a hidden number? ... ... ... exten => s,n(setanonnum),Set(CALLERID(all)=${CALLERID(name)} <0000000000>) ; we gives it zero instead! exten => s,n,Goto(s,check_end) ... ... ... exten => s,n(check_end),NoOp( --- Check of the incoming number - END --- )
My phone company sends Anonymous or Unavailable when there is no number and/or name.
The … is lines with other things that I check for before I send the call to the phone!

Virtually yours // Nypon