2 ; SIP Configuration for Asterisk
4 ; Syntax for specifying a SIP device in extensions.conf is
5 ; SIP/devicename where devicename is defined in a section below.
8 ; SIP/username@domain to call any SIP user on the Internet
9 ; (Don't forget to enable DNS SRV records if you want to use this)
11 ; If you define a SIP proxy as a peer below, you may call
12 ; SIP/proxyhostname/user or SIP/user@proxyhostname
13 ; where the proxyhostname is defined in a section below
15 ; Useful CLI commands to check peers/users:
16 ; sip show peers Show all SIP peers (including friends)
17 ; sip show users Show all SIP users (including friends)
18 ; sip show registry Show status of hosts we register with
20 ; sip debug Show all SIP messages
24 context=default ; Default context for incoming calls
25 ;recordhistory=yes ; Record SIP history by default
26 ; (see sip history / sip no history)
27 ;realm=mydomain.tld ; Realm for digest authentication
28 ; defaults to "asterisk"
29 ; Realms MUST be globally unique according to RFC 3261
30 ; Set this to your host name or domain name
31 port=5060 ; UDP Port to bind to (SIP standard port is 5060)
32 bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
33 srvlookup=yes ; Enable DNS SRV lookups on outbound calls
34 ; Note: Asterisk only uses the first host
36 ; Disabling DNS SRV lookups disables the
37 ; ability to place SIP calls based on domain
38 ; names to some other SIP users on the Internet
40 ;pedantic=yes ; Enable slow, pedantic checking for Pingtel
41 ; and multiline formatted headers for strict
42 ; SIP compatibility (defaults to "no")
43 ;tos=184 ; Set IP QoS to either a keyword or numeric val
44 ;tos=lowdelay ; lowdelay,throughput,reliability,mincost,none
45 ;maxexpirey=3600 ; Max length of incoming registration we allow
46 ;defaultexpirey=120 ; Default length of incoming/outoing registration
47 ;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
48 ;checkmwi=10 ; Default time between mailbox checks for peers
49 ;videosupport=yes ; Turn on support for SIP video
51 ;disallow=all ; First disallow all codecs
52 ;allow=ulaw ; Allow codecs in order of preference
53 ;allow=ilbc ; Note: codec order is respected only in [general]
54 ;musicclass=default ; Sets the default music on hold class for all SIP calls
55 ; This may also be set for individual users/peers
56 ;language=en ; Default language setting for all users/peers
57 ; This may also be set for individual users/peers
58 ;relaxdtmf=yes ; Relax dtmf handling
59 ;rtptimeout=60 ; Terminate call if 60 seconds of no RTP activity
60 ; when we're not on hold
61 ;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP activity
62 ; when we're on hold (must be > rtptimeout)
63 ;trustrpid = no ; If Remote-Party-ID should be trusted
64 ;progressinband=never ; If we should generate in-band ringing always
65 ; use 'never' to never use in-band signalling, even in cases
66 ; where some buggy devices might not render it
67 ;useragent=Asterisk PBX ; Allows you to change the user agent string
68 ;nat=no ; NAT settings
69 ; yes = Always ignore info and assume NAT
70 ; no = Use NAT mode only according to RFC3581
71 ; never = Never attempt NAT mode or RFC3581 support
72 ; route = Assume NAT, don't send rport
73 ; (work around more UNIDEN bugs)
74 ;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address
75 ; Note that promiscredir when redirects are made to the
76 ; local system will cause loops since SIP is incapable
77 ;usereqphone = no ; If yes, ";user=phone" is added to uri that contains
78 ; a valid phone number
79 ; of performing a "hairpin" call.
80 ;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
82 ; info : SIP INFO messages
83 ; inband : Inband audio
85 ;compactheaders = yes ; send compact sip headers.
88 ; If regcontext is specified, Asterisk will dynamically
89 ; create and destroy a NoOp priority 1 extension for a given
90 ; peer who registers or unregisters with us. The actual extension
91 ; is the 'regexten' parameter of the registering peer or its
92 ; name if 'regexten' is not provided. More than one regexten may be supplied
93 ; if they are separated by '&'. Patterns may be used in regexten.
95 ;regcontext=sipregistrations
97 ; Asterisk can register as a SIP user agent to a SIP proxy (provider)
98 ; Format for the register statement is:
99 ; register => user[:secret[:authuser]]@host[:port][/extension]
101 ; If no extension is given, the 's' extension is used. The extension
102 ; needs to be defined in extensions.conf to be able to accept calls
103 ; from this SIP proxy (provider)
105 ; host is either a host name defined in DNS or the name of a
106 ; section defined below.
110 ;register => 1234:password@mysipprovider.com
112 ; This will pass incoming calls to the 's' extension
115 ;register => 2345:password@sip_proxy/1234
117 ; Register 2345 at sip provider 'sip_proxy'. Calls from this provider connect to local
118 ; extension 1234 in extensions.conf default context, unless you define
119 ; unless you configure a [sip_proxy] section below, and configure a context.
120 ; Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]
121 ; Tip 2: Use separate type=peer and type=user sections for SIP providers
122 ; (instead of type=friend) if you have calls in both directions
124 ;registertimeout=20 ; retry registration calls every 20 seconds (default)
126 ;externip = 200.201.202.203 ; Address that we're going to put in outbound SIP messages
127 ; if we're behind a NAT
129 ; The externip and localnet is used
130 ; when registering and communicating with other proxies
131 ; that we're registered with
132 ; You may add multiple local networks. A reasonable set of defaults
134 ;externhost=foo.dyndns.net ; Alternatively you can specify an
135 ; external host, and Asterisk will
136 ; perform DNS queries periodically. Not
137 ; recommended for production
138 ; environments! Use externip instead
139 ;externrefresh=10 ; How often to refresh externhost if
141 ;localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
142 ;localnet=10.0.0.0/255.0.0.0 ; Also RFC1918
143 ;localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation
144 ;localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
146 ;-----------------------------------------------------------------------------------
147 ; Users and peers have different settings available. Friends have all settings,
148 ; since a friend is both a peer and a user
150 ; User config options: Peer configuration:
151 ; -------------------- -------------------
156 ; md5secret md5secret
158 ; canreinvite canreinvite
160 ; callgroup callgroup
161 ; pickupgroup pickupgroup
166 ; trustrpid trustrpid
167 ; progressinband progressinband
168 ; promiscredir promiscredir
169 ; useclientcode useclientcode
191 ; For incoming calls only. Example: FWD (Free World Dialup)
196 ;type=peer ; we only want to call out, not be called
198 ;username=yourusername ; Authentication user for outbound proxies
199 ;fromuser=yourusername ; Many SIP providers require this!
200 ;host=box.provider.com
201 ;usereqphone=yes ; This provider requires ";user=phone" on URI
204 ;type=friend ; either "friend" (peer+user), "peer" or "user"
206 ;fromuser=grandstream1 ; overrides the callerid, e.g. required by FWD
207 ;callerid=John Doe <1234>
208 ;host=192.168.0.23 ; we have a static but private IP address
209 ;nat=no ; there is not NAT between phone and Asterisk
210 ;canreinvite=yes ; allow RTP voice traffic to bypass Asterisk
211 ;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone
212 ;incominglimit=1 ; permit only 1 outgoing call at a time
213 ; from the phone to asterisk
214 ;mailbox=1234@default ; mailbox 1234 in voicemail context "default"
215 ;disallow=all ; need to disallow=all before we can use allow=
216 ;allow=ulaw ; Note: In user sections the order of codecs
217 ; listed with allow= does NOT matter!
219 ;allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
220 ;allow=g729 ; Pass-thru only unless g729 license obtained
224 ;Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
225 ;Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
227 ;regexten=1234 ; When they register, create extension 1234
229 ;callerid="Jane Smith" <5678>
231 ;nat=yes ; X-Lite is behind a NAT router
232 ;canreinvite=no ; Typically set to NO if behind NAT
234 ;allow=gsm ; GSM consumes far less bandwidth than ulaw
240 ;type=friend ; Friends place calls and receive calls
241 ;context=from-sip ; Context for incoming calls from this user
243 ;language=de ; Use German prompts for this user
244 ;host=dynamic ; This peer register with us
245 ;dtmfmode=inband ; Choices are inband, rfc2833, or info
246 ;defaultip=192.168.0.59 ; IP used until peer registers
247 ;username=snom ; Username to use in INVITE until peer registers
248 ;mailbox=1234,2345 ; Mailboxes for message waiting indicator
249 ;restrictcid=yes ; To have the callerid restriced -> sent as ANI
251 ;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw!
252 ;mailbox=1234@context,2345 ; Mailbox(-es) for message waiting indicator
260 ;insecure=yes ; To match a peer based by IP address only and not peer
261 ;insecure=very ; To allow registered hosts to call without re-authenticating
262 ;qualify=1000 ; Consider it down if it's 1 second to reply
263 ; Helps with NAT session
264 ; qualify=yes uses default value
265 ;callgroup=1,3-4 ; We are in caller groups 1,3,4
266 ;pickupgroup=1,3-5 ; We can do call pick-p for call group 1,3,4,5
267 ;defaultip=192.168.0.60 ; IP address to use if peer has not registred
273 ;qualify=200 ; Qualify peer is no more than 200ms away
274 ;nat=yes ; This phone may be natted
275 ; Send SIP and RTP to IP address that packet is
276 ; received from instead of trusting SIP headers
277 ;host=dynamic ; This device registers with us
278 ;canreinvite=no ; Asterisk by default tries to redirect the
279 ; RTP media stream (audio) to go directly from
280 ; the caller to the callee. Some devices do not
281 ; support this (especially if one of them is
283 ;defaultip=192.168.0.4
288 ;fromuser=markster ; Specify user to put in "from" instead of callerid
289 ;fromdomain=yourdomain.com ; Specify domain to put in "from" instead of callerid
290 ; fromuser and fromdomain are used when Asterisk
291 ; places calls to this account. It is not used for
292 ; calls from this account.
295 ;defaultip=192.168.0.4
296 ;amaflags=default ; Choices are default, omit, billing, documentation
297 ;accountcode=markster ; Users may be associated with an accountcode to ease billing