make the option actually match the documentation
[asterisk-bristuff.git] / configs / iax.conf.sample
blob4c016bac653cb1cfa4035411483a87fce7b08780
2 ; Inter-Asterisk eXchange driver definition
4 ; This configuration is re-read at reload
5 ; or with the CLI command
6 ;       reload chan_iax2.so
8 ; General settings, like port number to bind to, and
9 ; an option address (the default is to bind to all
10 ; local addresses).
12 [general]
13 ;bindport=4569                  ; bindport and bindaddr may be specified
14 ;                               ; NOTE: bindport must be specified BEFORE
15                                 ; bindaddr or may be specified on a specific
16                                 ; bindaddr if followed by colon and port
17                                 ;  (e.g. bindaddr=192.168.0.1:4569)
18 ;bindaddr=192.168.0.1           ; more than once to bind to multiple
19 ;                               ; addresses, but the first will be the 
20 ;                               ; default
22 ; Set iaxcompat to yes if you plan to use layered switches or
23 ; some other scenario which may cause some delay when doing a
24 ; lookup in the dialplan. It incurs a small performance hit to
25 ; enable it. This option causes Asterisk to spawn a separate thread
26 ; when it receives an IAX DPREQ (Dialplan Request) instead of
27 ; blocking while it waits for a response.
29 ;iaxcompat=yes
31 ; Disable UDP checksums (if nochecksums is set, then no checkums will
32 ; be calculated/checked on systems supporting this feature)
34 ;nochecksums=no
37 ; For increased security against brute force password attacks
38 ; enable "delayreject" which will delay the sending of authentication
39 ; reject for REGREQ or AUTHREP if there is a password.  
41 ;delayreject=yes
43 ; You may specify a global default AMA flag for iaxtel calls.  It must be
44 ; one of 'default', 'omit', 'billing', or 'documentation'.  These flags
45 ; are used in the generation of call detail records.
47 ;amaflags=default
49 ; ADSI (Analog Display Services Interface) can be enabled if you have
50 ; (or may have) ADSI compatible CPE equipment
52 ;adsi=no
54 ; You may specify a default account for Call Detail Records in addition
55 ; to specifying on a per-user basis
57 ;accountcode=lss0101
59 ; You may specify a global default language for users. 
60 ; Can be specified also on a per-user basis
61 ; If omitted, will fallback to english
63 ;language=en
65 ; This option specifies a preference for which music on hold class this channel
66 ; should listen to when put on hold if the music class has not been set on the
67 ; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
68 ; channel putting this one on hold did not suggest a music class.
70 ; If this option is set to "passthrough", then the hold message will always be
71 ; passed through as signalling instead of generating hold music locally.
73 ; This option may be specified globally, or on a per-user or per-peer basis.
75 ;mohinterpret=default
77 ; This option specifies which music on hold class to suggest to the peer channel
78 ; when this channel places the peer on hold. It may be specified globally or on
79 ; a per-user or per-peer basis.
81 ;mohsuggest=default
83 ; Specify bandwidth of low, medium, or high to control which codecs are used
84 ; in general.
86 bandwidth=low
88 ; You can also fine tune codecs here using "allow" and "disallow" clauses
89 ; with specific codecs.  Use "all" to represent all formats.
91 ;allow=all                      ; same as bandwidth=high
92 ;disallow=g723.1                ; Hm...  Proprietary, don't use it...
93 disallow=lpc10                  ; Icky sound quality...  Mr. Roboto.
94 ;allow=gsm                      ; Always allow GSM, it's cool :)
97 ; You can adjust several parameters relating to the jitter buffer.
98 ; The jitter buffer's function is to compensate for varying
99 ; network delay.
101 ; All the jitter buffer settings except dropcount are in milliseconds.
102 ; The jitter buffer works for INCOMING audio - the outbound audio
103 ; will be dejittered by the jitter buffer at the other end.
105 ; jitterbuffer=yes|no: global default as to whether you want
106 ; the jitter buffer at all.
108 ; forcejitterbuffer=yes|no: in the ideal world, when we bridge VoIP channels
109 ; we don't want to do jitterbuffering on the switch, since the endpoints
110 ; can each handle this.  However, some endpoints may have poor jitterbuffers 
111 ; themselves, so this option will force * to always jitterbuffer, even in this
112 ; case.
114 ; maxjitterbuffer: a maximum size for the jitter buffer.
115 ; Setting a reasonable maximum here will prevent the call delay
116 ; from rising to silly values in extreme situations; you'll hear
117 ; SOMETHING, even though it will be jittery.
119 ; resyncthreshold: when the jitterbuffer notices a significant change in delay
120 ; that continues over a few frames, it will resync, assuming that the change in
121 ; delay was caused by a timestamping mix-up. The threshold for noticing a
122 ; change in delay is measured as twice the measured jitter plus this resync
123 ; threshold.
124 ; Resyncing can be disabled by setting this parameter to -1.
126 ; maxjitterinterps: the maximum number of interpolation frames the jitterbuffer
127 ; should return in a row. Since some clients do not send CNG/DTX frames to
128 ; indicate silence, the jitterbuffer will assume silence has begun after
129 ; returning this many interpolations. This prevents interpolating throughout
130 ; a long silence.
133 jitterbuffer=no
134 forcejitterbuffer=no
135 ;dropcount=2
136 ;maxjitterbuffer=1000
137 ;maxjitterinterps=10
138 ;resyncthreshold=1000
139 ;maxexcessbuffer=80
140 ;minexcessbuffer=10
141 ;jittershrinkrate=1
143 ;trunkfreq=20                   ; How frequently to send trunk msgs (in ms)
145 ; Should we send timestamps for the individual sub-frames within trunk frames?
146 ; There is a small bandwidth use for these (less than 1kbps/call), but they
147 ; ensure that frame timestamps get sent end-to-end properly.  If both ends of
148 ; all your trunks go directly to TDM, _and_ your trunkfreq equals the frame
149 ; length for your codecs, you can probably suppress these.  The receiver must
150 ; also support this feature, although they do not also need to have it enabled.
152 ; trunktimestamps=yes
154 ; Minimum and maximum amounts of time that IAX peers can request as
155 ; a registration expiration interval (in seconds).
156 ; minregexpire = 60
157 ; maxregexpire = 60
159 ; IAX helper threads
160 ; Establishes the number of iax helper threads to handle I/O.
161 ; iaxthreadcount = 10
162 ; Establishes the number of extra dynamic threads that may be spawned to handle I/O
163 ; iaxmaxthreadcount = 100
165 ; We can register with another IAX server to let him know where we are
166 ; in case we have a dynamic IP address for example
168 ; Register with tormenta using username marko and password secretpass
170 ;register => marko:secretpass@tormenta.linux-support.net
172 ; Register joe at remote host with no password
174 ;register => joe@remotehost:5656
176 ; Register marko at tormenta.linux-support.net using RSA key "torkey"
178 ;register => marko:[torkey]@tormenta.linux-support.net
180 ; Sample Registration for iaxtel
182 ; Visit http://www.iaxtel.com to register with iaxtel.  Replace "user"
183 ; and "pass" with your username and password for iaxtel.  Incoming 
184 ; calls arrive at the "s" extension of "default" context.
186 ;register => user:pass@iaxtel.com
188 ; Sample Registration for IAX + FWD
190 ; To register using IAX with FWD, it must be enabled by visiting the URL
191 ; http://www.fwdnet.net/index.php?section_id=112
193 ; Note that you need an extension in you default context which matches
194 ; your free world dialup number.  Please replace "FWDNumber" with your
195 ; FWD number and "passwd" with your password.
197 ;register => FWDNumber:passwd@iax.fwdnet.net
200 ; You can disable authentication debugging to reduce the amount of 
201 ; debugging traffic.
203 ;authdebug=no
205 ; See doc/README.tos for a description of the tos parameters.
206 ;tos=ef
208 ; If regcontext is specified, Asterisk will dynamically create and destroy
209 ; a NoOp priority 1 extension for a given peer who registers or unregisters
210 ; with us.  The actual extension is the 'regexten' parameter of the registering
211 ; peer or its name if 'regexten' is not provided.  More than one regexten
212 ; may be supplied if they are separated by '&'.  Patterns may be used in
213 ; regexten.
215 ;regcontext=iaxregistrations
217 ; If we don't get ACK to our NEW within 2000ms, and autokill is set to yes,
218 ; then we cancel the whole thing (that's enough time for one retransmission
219 ; only).  This is used to keep things from stalling for a long time for a host
220 ; that is not available, but would be ill advised for bad connections.  In
221 ; addition to 'yes' or 'no' you can also specify a number of milliseconds.
222 ; See 'qualify' for individual peers to turn on for just a specific peer.
224 autokill=yes
226 ; codecpriority controls the codec negotiation of an inbound IAX call.
227 ; This option is inherited to all user entities.  It can also be defined 
228 ; in each user entity separately which will override the setting in general.
230 ; The valid values are:
232 ; caller   - Consider the callers preferred order ahead of the host's.
233 ; host     - Consider the host's preferred order ahead of the caller's.
234 ; disabled - Disable the consideration of codec preference altogether.
235 ;            (this is the original behaviour before preferences were added)
236 ; reqonly  - Same as disabled, only do not consider capabilities if
237 ;            the requested format is not available the call will only
238 ;            be accepted if the requested format is available.
240 ; The default value is 'host'
242 ;codecpriority=host
244 ;rtcachefriends=yes     ; Cache realtime friends by adding them to the internal list
245                         ; just like friends added from the config file only on a
246                         ; as-needed basis? (yes|no)
248 ;rtupdate=yes           ; Send registry updates to database using realtime? (yes|no)
249                         ; If set to yes, when a IAX2 peer registers successfully,
250                         ; the ip address, the origination port, the registration period,
251                         ; and the username of the peer will be set to database via realtime.
252                         ; If not present, defaults to 'yes'.
254 ;rtautoclear=yes        ; Auto-Expire friends created on the fly on the same schedule
255                         ; as if it had just registered? (yes|no|<seconds>)
256                         ; If set to yes, when the registration expires, the friend will
257                         ; vanish from the configuration until requested again.
258                         ; If set to an integer, friends expire within this number of
259                         ; seconds instead of the registration interval.
261 ;rtignoreregexpire=yes  ; When reading a peer from Realtime, if the peer's registration
262                         ; has expired based on its registration interval, used the stored
263                         ; address information regardless. (yes|no)
265 ; Guest sections for unauthenticated connection attempts.  Just specify an
266 ; empty secret, or provide no secret section.
268 [guest]
269 type=user
270 context=default
271 callerid="Guest IAX User"
274 ; Trust Caller*ID Coming from iaxtel.com
276 [iaxtel]
277 type=user
278 context=default
279 auth=rsa
280 inkeys=iaxtel
283 ; Trust Caller*ID Coming from iax.fwdnet.net
285 [iaxfwd]
286 type=user
287 context=default
288 auth=rsa
289 inkeys=freeworlddialup
292 ; Trust callerid delivered over DUNDi/e164
295 ;[dundi]
296 ;type=user
297 ;dbsecret=dundi/secret
298 ;context=dundi-e164-local
301 ; Further user sections may be added, specifying a context and a secret used
302 ; for connections with that given authentication name.  Limited IP based
303 ; access control is allowed by use of "allow" and "deny" keywords.  Multiple
304 ; rules are permitted.  Multiple permitted contexts may be specified, in
305 ; which case the first will be the default.  You can also override caller*ID
306 ; so that when you receive a call you set the Caller*ID to be what you want
307 ; instead of trusting what the remote user provides
309 ; There are three authentication methods that are supported:  md5, plaintext,
310 ; and rsa.  The least secure is "plaintext", which sends passwords cleartext
311 ; across the net.  "md5" uses a challenge/response md5 sum arrangement, but
312 ; still requires both ends have plain text access to the secret.  "rsa" allows
313 ; unidirectional secret knowledge through public/private keys.  If "rsa"
314 ; authentication is used, "inkeys" is a list of acceptable public keys on the 
315 ; local system that can be used to authenticate the remote peer, separated by
316 ; the ":" character.  "outkey" is a single, private key to use to authenticate
317 ; to the other side.  Public keys are named /var/lib/asterisk/keys/<name>.pub
318 ; while private keys are named /var/lib/asterisk/keys/<name>.key.  Private
319 ; keys should always be 3DES encrypted.
322 ; NOTE: All hostnames and IP addresses in this file are for example purposes
323 ;       only; you should not expect any of them to actually be available for
324 ;       your use.
327 ;[markster]
328 ;type=user
329 ;context=default
330 ;context=local
331 ;auth=md5,plaintext,rsa
332 ;secret=markpasswd
333 ;setvar=foo=bar
334 ;dbsecret=mysecrets/place       ; Secrets can be stored in astdb, too
335 ;transfer=no            ; Disable IAX native transfer
336 ;transfer=mediaonly     ; When doing IAX native transfers, transfer 
337                         ; only media stream
338 ;jitterbuffer=yes       ; Override global setting an enable jitter buffer
339 ;                       ; for this user
340 ;maxauthreq=10          ; Set maximum number of outstanding AUTHREQs waiting for replies. Any further authentication attempts will be blocked
341 ;                       ; if this limit is reached until they expire or a reply is received.
342 ;callerid="Mark Spencer" <(256) 428-6275>
343 ;deny=0.0.0.0/0.0.0.0
344 ;accountcode=markster0101
345 ;permit=209.16.236.73/255.255.255.0
346 ;language=en            ; Use english as default language
348 ; Peers may also be specified, with a secret and
349 ; a remote hostname.
351 [demo]
352 type=peer
353 username=asterisk
354 secret=supersecret
355 host=216.207.245.47
356 ;sendani=no
357 ;host=asterisk.linux-support.net
358 ;port=5036
359 ;mask=255.255.255.255
360 ;qualify=yes                    ; Make sure this peer is alive
361 ;qualifysmoothing = yes         ; use an average of the last two PONG
362                                 ; results to reduce falsely detected LAGGED hosts
363                                 ; Default: Off
364 ;qualifyfreqok = 60000          ; how frequently to ping the peer when
365                                 ; everything seems to be ok, in milliseconds
366 ;qualifyfreqnotok = 10000       ; how frequently to ping the peer when it's
367                                 ; either LAGGED or UNAVAILABLE, in milliseconds
368 ;jitterbuffer=no                ; Turn off jitter buffer for this peer
371 ; Peers can remotely register as well, so that they can be mobile.  Default
372 ; IP's can also optionally be given but are not required.  Caller*ID can be
373 ; suggested to the other side as well if it is for example a phone instead of
374 ; another PBX.
377 ;[dynamichost]
378 ;host=dynamic
379 ;secret=mysecret
380 ;mailbox=1234           ; Notify about mailbox 1234
381 ;inkeys=key1:key2
382 ;peercontext=local      ; Default context to request for calls to peer
383 ;defaultip=216.207.245.34
384 ;callerid="Some Host" <(256) 428-6011>
388 ;[biggateway]
389 ;type=peer
390 ;host=192.168.0.1
391 ;context=*
392 ;secret=myscret
393 ;trunk=yes                      ; Use IAX2 trunking with this host
394 ;timezone=America/New_York      ; Set a timezone for the date/time IE
398 ; Friends are a short cut for creating a user and
399 ; a peer with the same values.
401 ;[marko]
402 ;type=friend
403 ;host=dynamic
404 ;regexten=1234
405 ;secret=moofoo   ; Multiple secrets may be specified. For a "user", all
406 ;secret=foomoo   ; specified entries will be accepted as valid. For a "peer",
407 ;secret=shazbot  ; only the last specified secret will be used.
408 ;context=default
409 ;permit=0.0.0.0/0.0.0.0