Using sip.conf to Configure SIP in Asterisk PBX

The sip.conf file contains parameters relating to the configuration of sip client access to the Asterisk server. Clients must be configured in this file before they can place or receive calls using the Asterisk server.this file contains everything to do with the SIP protocol, settings and authentication for Asterisk ....

If you are not an advanced user of Asterisk, we highly recommend the use of one of GUI interfaces of Asterisk for SIP Configuraiton.There are several GUI interfaces for Asterisk that simplify installation of Asterisk. These interfaces allow administrators to view, edit, and change most aspects of Asterisk via a web interface.
The following steps  Is the typical configuration process of SIP using sip.conf:
1. Login via shell (SSH, console login, etc.) to your Asterisk SIP Server As root
2-change directories to your Asterisk configuration file directory.
The Asterisk configuration files are found in /etc/asterisk.
Example: asteriskhost:~/# cd /etc/asterisk
3. Edit the SIP configuration file: 
The sip.conf file is read from the top down.
1-The first section is for general server options, (the IP address and port number to bind to..)
2-The following sections define client parameters such as the username, password, and default IP address for unregistered clients.
The following keywords are defined in /etc/asterisk/sip.conf.
In the  [general] section of sip.conf includes the following variables: 
allowsubscribe =no Disable support for subscriptions. (Default is yes)
bindport=5060 UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 The IP address Asterisk should listen on for incoming SIP connections.(0.0.0.0 binds to all)
domain=1.2.3.4 Add IP address as local domain
autodomain=yes
turn this on to have Asterisk add local host
disallow=all
First disallow all codecs
allow=ulaw
Allow codecs in order of preference
allow=ilbc
sipdebug = yes
Turn on SIP debugging by default
context=default
Default context for incoming calls
maxexpiry=3600
Max length of incoming registrations/subscriptions we allow (seconds)
…………………………… …………………………………………………………………………
Read More:http://asterisk.gnuinter.net/files/digium/asterisk-ng/configs/sip.conf.sample
Complete File Example
The following is a complete example of a workable /etc/asterisk/sip.conf file.

[general]
port=5060
bindaddr=192.168.0.20
context=default
[snom]
type=friend
secret=snom100
host=dynamic
defaultip=192.168.0.15
[cisco]
type=friend
secret=mysecret
host=192.168.0.20
canreinvite=no
context=trusted
Read More:www.digium.com/asterisk_handbook/sip.conf.pdf

Related post



Newer Post Older Post

0 comments:

Post a Comment

 

Wiki Voip And Fax Tutorials Copyright © 2010 Labloub