Remove "0" prefix from inbound calls...?


We are using Asterisk 1.2.13, FreePBX 2.2.0rc.1, Trixbox 2.0.
Our ISDN phoneline is connected to a Eicon Diva Server 4BRI 8M.

Everythings works almost flawlessly :smile:

We have selected 0. to tell Asterisk, that this call is outbound, and it works.

Now our problem is that that incoming calls are getting this “0” in front of there number…

If number 23232323 is calling us, it is displayet as 023232323.

Is there a way to avoid this ?

Inbound and outbound should be in different contexts that would prevent this from being an issue.

Im not sure i fully understand what you mean…

The only thing that is configured on the inbound routes are:
Fax = disabled
CID - Source - Name of our source for CID
And the system have named the rule “any DID / any CID”

Outbound route:
Route Name = “Ud af huset - 0” Which mean "Out of the office - 0"
Dial patterns = "0|."
Insert = Pick Pre-Defined patterns

What you need to do is outcomment national in your zapata.conf
like this.

;nationalprefix = 0

mdruedal: It could be his ITSP is sending the 0.

As some one mentioned above you should use seperate contexts for inbound and outboud. If you dont some one can call in and then dial a number at your expense.

As far as getting rid of the 0 you can modify the caller ID and remove the first number like this

Exten => s,1,SetCallerID("${CALLERID(name)}" <${CALLERID(NUM):1)>)

The 1 says to remove the first number from the CID. If you were to insert the number 2 then the first two digits of the CID would be stripped.

Well, he is telling us that they use a ISDN line, so I don’t think it’s an issue with an ITSP :

Our ISDN phoneline is connected to a Eicon Diva Server 4BRI 8M.

You are right about separating contexts for security reasons, but I don’t think that is the issue here.

when you use the zaptel driver there is an line in zapata.conf you have to outcomment (;nationalprefix = 0) or else you will get an 0 before every national number that dials in. I know this because I have done it on my own system. So I would guess that AndersC uses the Capi driver, and I did not try that one, so the config file might have another name than zapata.conf but that line he must outcomment should be something similar.

I have been using asterisk for 2 1/2 years and I still believe in that “You learn something new every day”. Thanks for correcting me.