Pages

Monday 13 June 2011

How to Configure Asterisk…a very basic guide!

After hours of work and frustration I was greeted with “Is that it?” by her-indoors and “Dad can we play now…this stuff is totally boring!” by the little one. Well it was worth it…

First thing get yourself Asterisk running on Centos (maybe on VMWare etc.). The following link to MiamiManni on YouTube will provide all the information on how to install the operating system and install Asterisk. This guy is brilliant! The only two files that you need to configure are the sip.conf and extensions.conf files. The following configurations should work for you. As you can see I have configured only two SIP phones in my lab.

sip.conf

[general]
port=5060
bindaddr=0.0.0.0
context=other


register => username:account_password@voip_provider_fqdn/username

[2000]
type=friend
context=my-phones
secret=a_good_password
host=dynamic

[2001]
type=friend
context=my-phones
secret=a_good_password
host=dynamic

[ext-sip-account]
type=friend
context=from-voip-provider
username=your_username
fromuser=your_DID
secret=account_password
host=voip_provider_fqdn
fromdomain=voip_provider_fqdn

qualify=yes
insecure=port,invite
nat=yes

 

extensions.conf

[globals]

[general]
autofallthrough=yes

[my-phones]
exten => 2000,1,Dial(SIP/2000,20)
exten => 2000,2,Voicemail(2000,u)

exten => 2001,1,Dial(SIP/2001,20)
exten => 2001,2,Voicemail(2001,u)

exten => 2999,1,VoiceMailMain(${CALLERID(num)},s)


exten => _X.,1,Dial(SIP/${EXTEN}@ext-sip-account)

[from-voip-provider]
exten => your_DID_Number,1,Dial(SIP/2000,20)

As said, this will provide you with just the basics.

Remember to open the following ports:

SIP 5004-5100 TCP and UDP

STUN 3400-3499 TCP and UDP

RTPSIP 10000-20000 UDP

Remember to reload asterisk in the CLI> after you make changes to the sip.conf and extensions.conf changes.

You can test trunk registration by typing “CLI> sip show registry”

 

 

No comments:

Post a Comment