The Loomiverse

The universe according to Loom

Entries Comments



Configuring Asterisk – Part 2

9 October, 2008 (16:56) | Uncategorized | By: loom

In Part 1 I looked at how to add extensions to an Asterisk configuration. If all went well, we have two extensions 1000 and 1001 which are able to dial each other and not much else

While this is incredibly exciting – for about 5 minutes – it isn’t actually very useful. In this article, I’ll be adding the first of two Trunks to Asterisk.

Again, my terminology is what works for me, I recognise that some people may disagree with this and suggest that I should use the propper terms for everything – I even agree with people who say that kind of thing – but it doesn’t mean that I’m going to do it. As far as what I’m doing here goes, a Trunk is any connection to the outside world. I’ll be setting up a connection to a VOIP provider using SIP, later, I’ll and an IAX2 connection to another ASterisk box – run by a friend of mine.

Connecting to a VOIP provider.

I use PennyTel for my VOIP provider, I live in Australia, they’re in Australia, and I’m happy with their offering. In particular, cheap calls, and a normal phone number that supports multiple dial-in lines.

PennyTel let me connect using SIP, so the configration goes in the same sip_local.conf file that we created in Part 1. If you wanted, you could use #includes in the cip.conf to seperate extensions and trunks into two seperate files – in fact I may do that myself some time.

Basically, we add the following blocks into sip_local.conf to create an incoming and an outgoing connection for PennyTel.

[613nnnnnnnn]
username=nnnnnnnn
type=user
secret=PASSWORD
qualify=yes
nat=yes
fromuser=613nnnnnnnn
context=from-trunk
canreinvite=no

[PennyTel]
username=613nnnnnnnn
type=peer
secret=PASSWORD
qualify=yes
nat=yes
insecure=very
host=sip.pennytel.com
disallow=all
context=from-trunk
canreinvite=no
canredirect=no

And finally so PennyTel knows where to find us when a call comes in, add the following to the [General] section of sip.conf

register=613nnnnnnnn:PASSWORD@sip.pennytel.com/613nnnnnnnn

Possibly Related Posts:


Write a comment





CAPTCHA image