D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Asterisk Dialplans

 

Hi folks,

This might be a little off topic as it's Asterisk related but I figured I'd ask anyway as I know there are a few folks on the list who are Asterisk Guru's or at least have better experience of it than me :-)

So basically I've been having a play around with Asterisk for the past couple of weeks. I originally tried some of the out of the box distros and found that they didn't really fit my needs. I'm running Asterisk on a server which is doing other things too and the server has an analogue card (with 2 FXO and 2 FXS ports) fitted which ruled out running it in a VM.

The machine is running Asterisk 1.8 compiled from source, Dahdi Tools 2.6.2 and LibPri 1.4.14 (again both compiled from source).

I've got Asterisk running as a basic PBX with a Grandstream IP phone (I forget the model number off the top of my head), a couple of Android SIP clients running CSIPSimple and a softphone running on my laptop (X-Lite 4.5 I think). I've also currently got 1 analogue phone connected to one of the FXS ports.

I've been following the Asterisk Definitive Guide 3rd Edition and I've managed to allocate extension numbers to the SIP phones and the FXS ports so I can dial numbers, make calls between the FXS port and the SIP phones or between the SIP phones, make more than one phone ring, play test calls etc.

I've also figured out how to answer calls on the FXO ports (currently I've only tried it with one line and switched it between the two FXO ports and checked the output on the Asterisk CLI). I managed to route the calls from the BT lines to either an automated voice or to one of the SIP phones.

However I'm at the next step which is confusing me a bit. I'd like to route calls over the BT lines, partly because I haven't got as far as getting my Sipgate account working with it (and not having any credit on it) and partly because where the Asterisk system is the Internet connection at best is patchy and slow (*shakes fist at BT*).

I've done some Googling and see that it's possible to route different types of calls over POTS and SIP providers. At the moment I'd just like all calls to go via the DAHDI ports regardless of if it's a local number, national number, mobile etc, but at the same time ideally block premium rate services.

I've found this online which seems to suggest it's a UK dialplan...

; to ZAP trunks
1XX (BT Services)
1XXX (1471,1571 etc)
08XXXXXXXX
08XXXXXXXXX

; to VoIP trunks
0[1-7]XXXXXXXXX
01452+XXXXXX

However I'm not sure what to do with it, do I treat it like an extension?

I mean, do I put something like...

exten => _0[1-7]XXXXXXXXX,1,Dial(DAHDI/3/${EXTEN})

to get it to dial over the BT line when it picks up a number starting with 01 to 07?

Also to confuse matters, the BT line is a feature line, so it needs a 9 to dial an outside line (regardless of if there is a PBX attached to the line or just a basic old telephone) and I wasn't sure how to tell Asterisk to dial the 9 before dialing any numbers.

Rob

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq