The Asterisk Documentation Project: Volume One: An Introduction to Asterisk | ||
---|---|---|
<<< Previous | Configuring Channels | Next >>> |
The Session Initiation Protocol (SIP) is rapidly becoming the most widely supported VoIP protocol. Like IAX, SIP is pretty easy to set up. There are some gotcha's with the protocol though. Be aware that while your channels may be set up correctly, SIP does not handle NAT very well, and this can be a source of significant headaches. To configure SIP, you will need to create a sip.conf file
The first thing tht needs to be done is setup the general settings. Much like IAX this allows you to make settings that all sip connections will use.
[general] port = 5060 ; Port to bind to bindaddr = 10.78.1.90 ; Address to bind to context = default ; Default for incoming calls srvlookup=yes ; Enable SRV lookups on outbound calls dtmfmode=inband allow=all ; Allow all codecs |
As you can see, the settings are very similar to IAX. We have a port, address, context, and allow. The srvlookup setting is a way to look up host names. If set to yes, DNS lookups will happen on SRV records instead of A records to accomodate for load balancing. The dtmfmode setting is used to determine how Asterisk should listen for tones, such as someone dialing an extension.
For SIP channels to be used, clients have to be given permission to authenticate to Asterisk via SIP. Also for Asterisk to be used as a client (for something like Free World Dialup phone service via SIP, the client settings must be setup.
[general] port = 5060 ; Port to bind to bindaddr = 10.78.1.90 ; Address to bind to context = default ; Default for incoming calls srvlookup=yes ; Enable SRV lookups on outbound calls dtmfmode=inband allow=all ; Allow all codecs register => FWDNumber:secretpassword@fwd.pulver.com/EXTEN [fwd.pulver.com] type=user username=FWDNumber secret=secretpassword host=fwd.pulver.com nat=yes canreinvite=no [fwd.pulver.com] type=peer host=fwd.pulver.com context=default nat=yes canreinvite=no |
FWD stands for Free World Dialup, a free VoIP to VoIP service that can be found at http://www.freeworlddialup.com. Communications between FWD and IAXTel are allowed and there are instructions on their respective websites on how to do this inter-service communications.
Again, you can see that we've put a register line in the general section to let the service provider know that we are the correct client for calls that would be routed to FWDNumber. You'll also notice that there is a new context in the example. The fwd.pulver.com context allows calls to FWD and from FWD to be handled by Asterisk.
The first entry is the information necessary for outbound calls to use the FWD service as a client. It is almost identical to the section under IAX for "type=user". The second entry is for authenticating inbound calls, to ensure that we're not getting fake call routing from another source.
<<< Previous | Home | Next >>> |
IAX | Up | Other Channel Protocols |