configuration Asterisk sip.conf file

The sip.conf file contains parameters relating to the configuration of Session Initiation Protocol (SIP) access to the Asterisk server. Clients must be configured in this file before they can place or receive calls using the Asterisk server.
The sip.conf file is read from the top down. The first section is for general server options, such as the IP address and port number to bind to. The following sections define client parameters such as the username, password, and default IP address for unregistered clients. Sections are delineated by a name in brackets. The first section is called general (which cannot be used as a client name.) The following sections begin with the client name in brackets, followed by the client options.
The following keywords are defined in sip.conf.
1-General Section Keywords:
These settings are for the [general] section of sip.conf and adjust global settings for the SIP stack.
port: The port Asterisk should listen for incoming SIP connections. The default is 5060, in keeping with standards. Takes as an argument a port number (which must not be in use by any other service.)
bindaddr: The IP address Asterisk should listen on for incoming SIP connections. If the machine has multiple real or aliased IP addresses,this option can be used to select which IP addresses Asterisk listens on. The default behavior is to listen on all available interfaces and 
aliases. Takes as it's argument an IP address (which must be an interface available on the system.)
context: Sets a default context all further clients are placed in, unless overridden within their entity definition.
allow: Explicitly allows a SIP codec. Note that codecs are preferred in the order they are allowed.
disallow: Explicitly disallows a SIP codec from being used. tos: Configures type of service (TOS) used for SIP and SIP+RTP transmissions. Acceptable values are: lowdelay, throughput,
reliability, and mincost. Also, an integer (0-255) may be specified. maxexpirey: Maximum permitted length of a registration request in seconds.
defaultexpirey: Default length of a registration request in seconds. 
register: Registers this Asterisk instance with another host. Takes a SIP address (without the sip:) optionally followed by a forward slash ('/') and an extension to use for contact.
port = 5060
bindaddr =
context = default
disallow = g729
allow = ulaw
allow = gsm
maxexpirey = 180
defaultexpirey = 160
register =>
register =>
2-Entity options:
After the general section are listed each entity in the SIP configuration. Entities are divided into three categories:
type: The type option sets the connection class for the client. Options are peer, user, and friend.
host: Sets the IP address or resolvable host name of the device. This can alternately be set to 'dynamic' in which case the host is expected to come from any IP address. This is the most common option, and normally necessary within a DHCP network.
defaultip: This option can be used when the host keyword is set to dynamic. When set, the Asterisk server will attempt to send calls to this IP address when a call is received for a SIP client that has not yet registered with the server.
username: This option sets the username the Asterisk server attempts to connect when a call is received. Used when for some reason the value is not the same as the username the client registered.
canreinvite: This option is used to tell the server to never issue a reinvite to the client. This is used to interoperate with some (buggy) hardware that crashes if we reinvite, such as the common Cisco ATA186.
context: When defined within a client definition, this keyword sets the default context for this client only.
mailbox: One or more mailboxes may be listed (separated by commas) for sending Message Waiting Indicator (MWI) messages to a given SIP peer.
qualify: A maximum time in milliseconds for a peer to respond. This causes Asterisk to poll the device periodically and consider it down if it takes longer than this number of milliseconds to respond.
secret: A shared secret used for authenticating registrations for peers and for users making calls.
nat: Causes Asterisk to interpret a peer or user as a potentially network address translated host. This is useful when peers are behind firewalls.
Read More:

Related post

Newer Post Older Post


emakader on December 9, 2011 at 12:53 AM said...

For a long distance oversea call, VoIP is the only economic option in the world. Making a voice call using a softphone through internet requires accurate programming and you can have the directions from Ozeki systems. They will tell you how to make a call using VoIP SIP SDK step by step. You can download the system easily from the website.

Post a Comment


Wiki Voip And Fax Tutorials Copyright © 2010 Labloub