Configure Asterisk as PSTN gateway

Evening all,

I’m trying to configure asterisk as a PSTN gateway, the box has a wildcard x100p in it and it appears to be working.

I think i can do this from the extensions.conf but I’m a little unsure on the syntax.

So basically i want to route any incoming SIP calls straight on to the PSTN through the wild card.

Cheers in advance,


exten => _.,1,Dial(Zap/1/{EXTEN})

This will send any number to zap channel 1

I would recommend that you read the sample extensions.conf file. Look at the contexts ‘trunklocal’ and ‘trunkld’. You can probably use most of what is there.

However, the simplest thing to do would be to forward all 10 digit phone numbers that are formatted properly to the PSTN.

exten => _NXXNXXXXXX,1,Dial(ZAP/${EXTEN},20)


wow that was quick,

thanks guys!

me again,

I now need the config so that a group of phones (listed in the sip.conf) will be dialled on an incoming call on the zap channel.

Thanks for any help,


Just modify you Dial command to include multiple phone numbers.

Dial(type1/identifier1 [& type2/identifier2 [& type3/identifier3 … ] ], timeout, options, URL)

This will make all of the phones ring, then whoever picks up first gets the call.


Evening all,

I`ve been trying this line in my exentions.conf:

exten => _X.,1,Dial(Zap/1/{EXTEN}) or exten => _.,1,Dial(Zap/1/{EXTEN})

zap picks up and i just get a constant tone and the call isnt made.

Any thoughts? Im using xlite softphone and incomming calls work so im a bit stumped. (no NAT by the way).

Cheers Andy

exten => _X.,1,Dial(Zap/1/${EXTEN})