Getting rid of leading ZERO


#1

I am having a very strange problem:

When I dialout on any number from asterisk, it adds a leading zero in the dialed number, for e.g I dial a number 5832876 and when I check the tracer’s result of the PSTN switch, it shows that my call request was for 05832876. So basically i am able to dial NWD and ISD calls but unable to dial local numbers.

I have tried changing about every option I can think of. I have tried every option for the ‘pridialplan’ field and none have been succesful.

Please if anyone can help it will be very much appreciated for I am completely lost in this case.

Thank you for your time and consideration.

P.S. I am in Pakistan
-Ali


#2

I think you want some thing like this

exten => _731805XXXX,1,Dial(Zap/r4/${EXTEN:3}) The :3 is to remove the first three digits


#3

Thanks for the reply rusty:

Only problem is that I have tried that as well and what it does is delete the first three digits (in your example) and then add the leading zero anyway. So if I had:

exten => _731805XXXX,1,Dial(Zap/r4/${EXTEN:3})

it would still give me 0805XXXX, even though I am expecting it without the zero.

Still so confused. :frowning:


#4

What are you dialing from SIp Phone?


#5

I have tried from SJ Phone, linksys PAP2 ATA and just from console. None worked.


#6

I assume from the first post you are using a PRI for the outbound call. Since it seems to be adding this 0 even if you tell it to strip the leading digits I would go back and look at the zapata and zaptal file sounds like something buggy in there. Or post them here and maybe someone can spot the problem


#7

Rusty thanks for everything:

Just figured it out, I had my prilocaldialplan and pridialplan lines a little too far down the file.

I swear… :smile:

have a good one.