SIP.conf – General option in SIP.conf

SIP.conf – General option in SIP.conf

SIP Configuration – general

The [general] section of sip.conf includes the following variables:

  • allowsubscribe = yes|no : Allow or Ignore Subscribe requests
  • allow = <codec> : Allow codecs in order of preference (Use DISALLOW=ALL first, before allowing other codecs)
  • disallow = all : Disallow all codecs (global configuration)
  • allowexternaldomains = yes|no : Enable/Disable INVITE and REFER to non-local domains. Default yes. (New in v1.2.x).
  • allowguest = yes|no : Allow or reject guest calls. Default is yes. (this can also be set to ‘osp’ if asterisk was compiled with OSP support). (New in v1.2.x).
  • allowoverlap = yes|no : Enable/disable overlap dialing support. Default yes (Overlap dial provides for a longer time-out period between digits, also called the inter-digit timer. With overlap dial set to off, the gateway expects to receive the digits one right after the other coming in to this line with very little delay between digits. With overlap dial set to on, then the device waits up to about 2 seconds between digits).
  • autocreatepeer = yes|no : If set, anyone will be able to log in as a peer (with no check of credentials; useful for operation with SER). Default no.
  • autodomain = yes|no : Enable/disable Asterisk’s ability to add local hostnames and local IP address to the domain list. externip or externhost are also taken into the domain list. Default no. (New in v1.2.x).
  • bindaddr = IP_Address : IP Address to bind to (listen on). Default 0.0.0.0 (all network interfaces).
  • bindport = Number : UDP Port to bind to (listen on). Used to be port in Asterisk v1.0.x. Default 5060.
  • callerid = <string> : Caller ID information used when nothing else is available. Defaults to asterisk. (The ability to override the default appears to available in Asterisk 1.0.9. Unsure about other versions.)
  • canreinvite = update|yes|no|nonat (global setting): For some reason this defaults to yes, so beware…
  • checkmwi = Number : Global interval (in seconds) between mailbox checks. Default 10 seconds. (New in v1.2.x)
  • compactheaders = yes|no : Indicates Asterisk should send compact (i.e. abbreviated) headers in the SIP messages. Default no. (New in v1.2.x)
  • context = <contextname> : This is the default context and is used when a endpoint has no context property. The context in section of an endpoint is used to route calls from that endpoint to the wanted destination. The context body is located in extensions.conf.
  • defaultexpiry= Number : Default duration (in seconds) of incoming/outgoing registration. Default 120 seconds.
  • domain = domains : Comma separated list of domains which Asterisk is responsible for. (New in Asterisk 1.2.x)
  • dtmfmode = inband|info|rfc2833 (global setting). Default rfc2833Warning: inband very high CPU load.
  • dumphistory = yes|no : Enable support for dumping of SIP conversation’s transaction history to LOG_DEBUG. Default no. (New in v1.2.x)
  • externip = IP_Address or a hostname : Address that we’re going to put in SIP messages if we’re behind a NAT. If a hostname is used as the value, then the IP address associated with the hostname is looked up only once during the reading of the sip.conf. If you want support for a hostname associated with a dynamic IP address, use externhost.
  • externhost = hostname.tld : (New in Asterisk 1.2.x)
  • externrefresh = Number : Specify how often (in seconds) a hostname DNS lookup should be performed for the value entered in ‘externhost’. Default 10 seconds. (New in Asterisk 1.2.x).
  • fromdomain = <domain> : Sets default From: domain in SIP messages when acting as a SIP UAC (client)
  • ignoreregexpire = yes|no : Indicates whether to use Contact information about a peer even if the information is stale because it has reached its expiration time. Default no. (New in v1.2.x)
  • jbenable = yes|no : Enables the use of a jitterbuffer on the receiving side of a SIP channel. (Added in Version 1.4)
  • jbforce = yes|no : Forces the use of a jitterbuffer on the receive side of a SIP channel. Defaults to “no”. (Added in Version 1.4)
  • jbmaxsize = Number : Max length of the jitterbuffer in milliseconds. (Added in Version 1.4)
  • jbresyncthreshold = Number : Jump in the frame timestamps over which the jitterbuffer is resynchronized. Useful to improve the quality of the voice, with big jumps in/broken timestamps, usually sent from exotic devices and programs. Defaults to 1000. (Added in Version 1.4)
  • jbimpl = fixed|adaptive: Jitterbuffer implementation, used on the receiving side of a SIP channel. Two implementations are currently available – “fixed” (with size always equals to jbmaxsize) and “adaptive” (with variable size, actually the new jb of IAX2). Defaults to fixed. (Added in Version 1.4)
  • jblog = no|yes: Enables jitterbuffer frame logging. Defaults to “no”. (Added in Version 1.4)
  • language = <string> : Default language used by any Playback()/Background().
  • limitonpeers = yes|no: If set to yes use only the peer call counter for both incoming and outgoing calls (ref. hints, subscriptions, BLF; added in 1.4)
  • localnet = NetAddress/Netmask : local network and mask.
  • insecure = very|yes|no|invite|port : Specifies how to handle connections with peers. Default no (authenticate all connections). invite and port added in v1.2.x, yes and very removed in v1.6.x, possible to use multiple options separated by commas from v1.4.x
  • maxexpiry = Number : Max duration (in seconds) of incoming registration we allow. Default 3600 seconds.
  • musicclass = one of the classes specified in musiconhold.conf
  • musdiconhold = same as musicclass
  • nat = yes|no : Please note that as of Asterisk 1.0.x nat can now have the values: yes|no|never|route. Default no which really means to use rfc3581 techniques.
  • notifymimetype = mediatype/subtype : Allow overriding of mime type in MWI NOTIFY used in Asterisk cmd VoiceMail2 online messages. Valid MIME types can be found here. Default application/simple-message-summary. (New in v1.2.x).
  • notifyringing = yes|no : Notify subscription on RINGING state. Default yes. (New in v1.2.x).
  • outboundproxy = IP_address or DNS SRV name (excluding the _sip._udp prefix) : SRV name, hostname, or IP address of the outbound SIP Proxy. (New in v1.2.x).
  • outboundproxyport = Number : UDP port number for the Outbound SIP Proxy. (New in v1.2.x).
  • pedantic = yes|no : Enable slow, pedantic checking of Call-ID:s, multiline SIP headers and URI-encoded headers. Default no (in Asterisk 1.8 default yes).
  • port = <portno> : Default SIP port of peer. (this is not the port for Asterisk to listen. See bindport).
  • progressinband = never|no|yes : If we should generate in-band ringing always. Default never.
  • promiscredir= yes|no : Allows support for 302 Redirects; (Note: will redirect them all to the local extension returned in Contact rather than to that extension at the destination). Default no.
  • qualify = yes|no|milliseconds : Check if client is reachable. If yes, the checks occur every 60 seconds. Default no.
  • realm = my realm (Change authentication realm from asterisk (default) to your own. Requires Asterisk v1.x)
  • recordhistory = yes|no. Enable logging of SIP conversation’s transaction history. Default no. (New in v1.2.x).
  • regcontext = context : Default context to use for SIP REGISTER replies from the SIP Registrar.
  • register => <username>:<password>:[authid]@<sip client/peer id in sip.conf>/<contact> :Register with a SIP provider
  • registerattempts = Number : Number of SIP REGISTER messages to send to a SIP Registrar before giving up. Default 0 (no limit). (New in v1.2.x).
  • registertimeout = Number : Number of seconds to wait for a response from a SIP Registrar before classifying the SIP REGISTER has timed out. Default 20 seconds. (New in v1.2.x).
  • relaxdtmf = yes|no: Default no.
  • rtautoclear = yes|no|number : Auto-Expire friends created on the fly. If yes the autoexpire will be in 120 seconds. Default yes. (New in v1.2.x). Buggy up to 1.4.19, see bug 12707
  • rtcachefriends = yes|no : Cache realtime friends by adding them to the internal list just like friends added from the config file. Default no. (New in v1.2.x). Buggy up to 1.4.19, see bug 12707
  • rtsavesysname = yes|no : If set will write the value of asterisk.conf (options) systemname to the sip peer table in the field “regserver”. Useful for multi-server systems. (New in v1.?)
  • rtpholdtimeout = Number : Max number of seconds of inactivity before terminating a call on hold. Default 0 (no limit). (New in v1.2.x).
  • rtpkeepalive = Number : Number of seconds, when a RTP Keepalive packet will be sent if no other RTP traffic on that connection. Default 0 (no RTP Keepalive). (New in v1.2.x).
  • rtptimeout = Number : Number of seconds, to wait for RTP traffic before classify the connection as discontinued. Default 0 (no RTP timeout). (New in v1.2.x).
  • rtupdate = yes|no : Send registry updates to the database when using Realtime support. Default yes. (New in v1.2.x).
  • sendrpid = yes|no : If a Remote-Party-ID SIP header should be sent. Default no.
  • sipdebug = yes|no. Default setting for whether SIP debug is enabled upon loading of the sip.conf. Default no. (New in v1.2.x).
  • srvlookup = yes|no : Enable DNS SRV lookups on calls. Default yes. (Default is no prior to v1.4.14)
  • tos = <value> : Set IP QoS parameters for outgoing media streams (numeric values are also accepted, like tos=184 )
  • trustrpid = yes|no : If Remote-Party-ID SIP header should be trusted. Default no.
  • useclientcode = yes|no : If yes, then the Call Originator as stated in the CDR will be changed to whatever is specified in a X-ClientCode SIP Header. Default no. (New in v1.2.x)
  • usereqphone = yes|no : Indicates whether to add a “;user=phone” to the URI. Default no. (New in v1.2.x)
  • useragent = <string> : Allow the SIP header “User-Agent” to be customized. Default asterisk.
  • videosupport = yes|no : Turn on support for SIP video (peer specific setting added in SVN Dec 21 2005, bug 5427. Default no.
  • vmexten = <string> : Dialplan extension to reach mailbox. Default asterisk. (New in v1.2.x)
  • callevents = yes|no: Set to yes to receive events on AMI when a call is put on/off hold.
  • disallowed_methods= (1.8.x) When a dialog is started with another SIP endpoint, the other endpoint should include an Allow header telling us what SIP methods the endpoint implements. However, some endpoints either do not include an Allow header or lie about what methods they implement. In the former case, Asterisk makes the assumption that the endpoint supports all known SIP methods. If you know that your SIP endpoint does not provide support for a specific method, then you may provide a comma-separated list of methods that your endpoint does not implement in the disallowed_methods option. Note that if your endpoint is truthful with its Allow header, then there is no need to set this option. This option may be set in the general section or may be set per endpoint. If this option is set both in the general section and in a peer section, then the peer setting completely overrides the general setting (i.e. the result is *not* the union of the two options). Note also that while Asterisk currently will parse an Allow header to learn what methods an endpoint supports, the only actual use for this currently is for determining if Asterisk may send connected line UPDATE requests. Its use may be expanded in the future.
  • preferred_codec_only= (1.8.x) Respond to a SIP invite with the single most preferred codec rather than advertising all joint codec capabilities. This limits the other side’s codec choice to exactly what we prefer.
  • engine= (1.8.x) RTP engine to use when communicating with the device