Merged revisions 140817 via svnmerge from
[asterisk-bristuff.git] / configs / iax.conf.sample
blobdc3c46568a5e59d5de53fefef14194d93a016b35
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 ; Perform an SRV lookup on outbound calls
56 ;srvlookup=yes
58 ; You may specify a default account for Call Detail Records in addition
59 ; to specifying on a per-user basis
61 ;accountcode=lss0101
63 ; You may specify a global default language for users. 
64 ; Can be specified also on a per-user basis
65 ; If omitted, will fallback to english
67 ;language=en
69 ; This option specifies a preference for which music on hold class this channel
70 ; should listen to when put on hold if the music class has not been set on the
71 ; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
72 ; channel putting this one on hold did not suggest a music class.
74 ; If this option is set to "passthrough", then the hold message will always be
75 ; passed through as signalling instead of generating hold music locally.
77 ; This option may be specified globally, or on a per-user or per-peer basis.
79 ;mohinterpret=default
81 ; This option specifies which music on hold class to suggest to the peer channel
82 ; when this channel places the peer on hold. It may be specified globally or on
83 ; a per-user or per-peer basis.
85 ;mohsuggest=default
87 ; Specify bandwidth of low, medium, or high to control which codecs are used
88 ; in general.
90 bandwidth=low
92 ; You can also fine tune codecs here using "allow" and "disallow" clauses
93 ; with specific codecs.  Use "all" to represent all formats.
95 ;allow=all                      ; same as bandwidth=high
96 ;disallow=g723.1                ; Hm...  Proprietary, don't use it...
97 disallow=lpc10                  ; Icky sound quality...  Mr. Roboto.
98 ;allow=gsm                      ; Always allow GSM, it's cool :)
101 ; You can adjust several parameters relating to the jitter buffer.
102 ; The jitter buffer's function is to compensate for varying
103 ; network delay.
105 ; All the jitter buffer settings are in milliseconds.
106 ; The jitter buffer works for INCOMING audio - the outbound audio
107 ; will be dejittered by the jitter buffer at the other end.
109 ; jitterbuffer=yes|no: global default as to whether you want
110 ; the jitter buffer at all.
112 ; forcejitterbuffer=yes|no: in the ideal world, when we bridge VoIP channels
113 ; we don't want to do jitterbuffering on the switch, since the endpoints
114 ; can each handle this.  However, some endpoints may have poor jitterbuffers 
115 ; themselves, so this option will force * to always jitterbuffer, even in this
116 ; case.
118 ; maxjitterbuffer: a maximum size for the jitter buffer.
119 ; Setting a reasonable maximum here will prevent the call delay
120 ; from rising to silly values in extreme situations; you'll hear
121 ; SOMETHING, even though it will be jittery.
123 ; resyncthreshold: when the jitterbuffer notices a significant change in delay
124 ; that continues over a few frames, it will resync, assuming that the change in
125 ; delay was caused by a timestamping mix-up. The threshold for noticing a
126 ; change in delay is measured as twice the measured jitter plus this resync
127 ; threshold.
128 ; Resyncing can be disabled by setting this parameter to -1.
130 ; maxjitterinterps: the maximum number of interpolation frames the jitterbuffer
131 ; should return in a row. Since some clients do not send CNG/DTX frames to
132 ; indicate silence, the jitterbuffer will assume silence has begun after
133 ; returning this many interpolations. This prevents interpolating throughout
134 ; a long silence.
137 ; jittertargetextra: number of milliseconds by which the new jitter buffer
138 ; will pad its size. the default is 40, so without modification, the new
139 ; jitter buffer will set its size to the jitter value plus 40 milliseconds.
140 ; increasing this value may help if your network normally has low jitter,
141 ; but occasionally has spikes.
144 jitterbuffer=no
145 forcejitterbuffer=no
146 ;maxjitterbuffer=1000
147 ;maxjitterinterps=10
148 ;resyncthreshold=1000
149 ;jittertargetextra=40
151 ;trunkfreq=20                   ; How frequently to send trunk msgs (in ms)
153 ; Should we send timestamps for the individual sub-frames within trunk frames?
154 ; There is a small bandwidth use for these (less than 1kbps/call), but they
155 ; ensure that frame timestamps get sent end-to-end properly.  If both ends of
156 ; all your trunks go directly to TDM, _and_ your trunkfreq equals the frame
157 ; length for your codecs, you can probably suppress these.  The receiver must
158 ; also support this feature, although they do not also need to have it enabled.
160 ; trunktimestamps=yes
162 ; Minimum and maximum amounts of time that IAX peers can request as
163 ; a registration expiration interval (in seconds).
164 ; minregexpire = 60
165 ; maxregexpire = 60
167 ; With a large amount of traffic on IAX2 trunks, there is a risk of bad voice quality due to
168 ; the fact that the IAX2 trunking scheme depends on the Linux system to handle fragmentation of
169 ; UDP packets. This may not be very efficient. 
170 ; This setting sets the maximum transmission unit for IAX2 UDP trunking.
171 ; default is 1240 bytes. Zero disables this functionality and let's the O/S handle fragmentation.
173 ; trunkmtu = 0
175 ; Enable IAX2 encryption.  The default is no.
177 ; encryption = yes
179 ; This is a compatibility option for older versions of IAX2 that do not support
180 ; key rotation with encryption.  This option will disable the IAX_COMMAND_RTENC message.
181 ; default is on
183 ; keyrotate=off
185 ; This option defines the maximum size an IAX2 trunk can grow to. The default value is 128000 bytes which
186 ; represents 40ms uncompressed linear with 200 channels. Depending on different things though
187 ; (codec in use and channels) you may need to make this value larger.
188 ; trunkmaxsize = 128000
190 ; IAX helper threads
192 ; Establishes the number of iax helper threads to handle I/O.
193 ; iaxthreadcount = 10
194 ; Establishes the number of extra dynamic threads that may be spawned to handle I/O
195 ; iaxmaxthreadcount = 100
197 ; We can register with another IAX server to let him know where we are
198 ; in case we have a dynamic IP address for example
200 ; Register with tormenta using username marko and password secretpass
202 ;register => marko:secretpass@tormenta.linux-support.net
204 ; Register joe at remote host with no password
206 ;register => joe@remotehost:5656
208 ; Register marko at tormenta.linux-support.net using RSA key "torkey"
210 ;register => marko:[torkey]@tormenta.linux-support.net
212 ; Sample Registration for iaxtel
214 ; Visit http://www.iaxtel.com to register with iaxtel.  Replace "user"
215 ; and "pass" with your username and password for iaxtel.  Incoming 
216 ; calls arrive at the "s" extension of "default" context.
218 ;register => user:pass@iaxtel.com
220 ; Sample Registration for IAX + FWD
222 ; To register using IAX with FWD, it must be enabled by visiting the URL
223 ; http://www.fwdnet.net/index.php?section_id=112
225 ; Note that you need an extension in you default context which matches
226 ; your free world dialup number.  Please replace "FWDNumber" with your
227 ; FWD number and "passwd" with your password.
229 ;register => FWDNumber:passwd@iax.fwdnet.net
232 ; You can disable authentication debugging to reduce the amount of 
233 ; debugging traffic.
235 ;authdebug=no
237 ; See qos.tex or Quality of Service section of asterisk.pdf for a description of these parameters.
238 ;tos=ef
239 ;cos=5
241 ; If regcontext is specified, Asterisk will dynamically create and destroy
242 ; a NoOp priority 1 extension for a given peer who registers or unregisters
243 ; with us.  The actual extension is the 'regexten' parameter of the registering
244 ; peer or its name if 'regexten' is not provided.  More than one regexten
245 ; may be supplied if they are separated by '&'.  Patterns may be used in
246 ; regexten.
248 ;regcontext=iaxregistrations
250 ; If we don't get ACK to our NEW within 2000ms, and autokill is set to yes,
251 ; then we cancel the whole thing (that's enough time for one retransmission
252 ; only).  This is used to keep things from stalling for a long time for a host
253 ; that is not available, but would be ill advised for bad connections.  In
254 ; addition to 'yes' or 'no' you can also specify a number of milliseconds.
255 ; See 'qualify' for individual peers to turn on for just a specific peer.
257 autokill=yes
259 ; codecpriority controls the codec negotiation of an inbound IAX call.
260 ; This option is inherited to all user entities.  It can also be defined 
261 ; in each user entity separately which will override the setting in general.
263 ; The valid values are:
265 ; caller   - Consider the callers preferred order ahead of the host's.
266 ; host     - Consider the host's preferred order ahead of the caller's.
267 ; disabled - Disable the consideration of codec preference altogether.
268 ;            (this is the original behaviour before preferences were added)
269 ; reqonly  - Same as disabled, only do not consider capabilities if
270 ;            the requested format is not available the call will only
271 ;            be accepted if the requested format is available.
273 ; The default value is 'host'
275 ;codecpriority=host
277 ; allowfwdownload controls whether this host will serve out firmware to
278 ; IAX clients which request it.  This has only been used for the IAXy,
279 ; and it has been recently proven that this firmware distribution method
280 ; can be used as a source of traffic amplification attacks.  Also, the
281 ; IAXy firmware has not been updated for at least 18 months, so unless
282 ; you are provisioning IAXys in a secure network, we recommend that you
283 ; leave this option to the default, off.
285 ;allowfwdownload=yes
287 ;rtcachefriends=yes     ; Cache realtime friends by adding them to the internal list
288                         ; just like friends added from the config file only on a
289                         ; as-needed basis? (yes|no)
291 ;rtupdate=yes           ; Send registry updates to database using realtime? (yes|no)
292                         ; If set to yes, when a IAX2 peer registers successfully,
293                         ; the ip address, the origination port, the registration period,
294                         ; and the username of the peer will be set to database via realtime.
295                         ; If not present, defaults to 'yes'.
297 ;rtautoclear=yes        ; Auto-Expire friends created on the fly on the same schedule
298                         ; as if it had just registered? (yes|no|<seconds>)
299                         ; If set to yes, when the registration expires, the friend will
300                         ; vanish from the configuration until requested again.
301                         ; If set to an integer, friends expire within this number of
302                         ; seconds instead of the registration interval.
304 ;rtignoreregexpire=yes  ; When reading a peer from Realtime, if the peer's registration
305                         ; has expired based on its registration interval, used the stored
306                         ; address information regardless. (yes|no)
308 ;parkinglot=edvina              ; Default parkinglot for IAX peers and users
309                                 ; This can also be configured per device
310                                 ; Parkinglots are defined in features.conf
312 ; Guest sections for unauthenticated connection attempts.  Just specify an
313 ; empty secret, or provide no secret section.
315 [guest]
316 type=user
317 context=default
318 callerid="Guest IAX User"
321 ; Trust Caller*ID Coming from iaxtel.com
323 [iaxtel]
324 type=user
325 context=default
326 auth=rsa
327 inkeys=iaxtel
330 ; Trust Caller*ID Coming from iax.fwdnet.net
332 [iaxfwd]
333 type=user
334 context=default
335 auth=rsa
336 inkeys=freeworlddialup
339 ; Trust callerid delivered over DUNDi/e164
342 ;[dundi]
343 ;type=user
344 ;dbsecret=dundi/secret
345 ;context=dundi-e164-local
348 ; Further user sections may be added, specifying a context and a secret used
349 ; for connections with that given authentication name.  Limited IP based
350 ; access control is allowed by use of "allow" and "deny" keywords.  Multiple
351 ; rules are permitted.  Multiple permitted contexts may be specified, in
352 ; which case the first will be the default.  You can also override caller*ID
353 ; so that when you receive a call you set the Caller*ID to be what you want
354 ; instead of trusting what the remote user provides
356 ; There are three authentication methods that are supported:  md5, plaintext,
357 ; and rsa.  The least secure is "plaintext", which sends passwords cleartext
358 ; across the net.  "md5" uses a challenge/response md5 sum arrangement, but
359 ; still requires both ends have plain text access to the secret.  "rsa" allows
360 ; unidirectional secret knowledge through public/private keys.  If "rsa"
361 ; authentication is used, "inkeys" is a list of acceptable public keys on the 
362 ; local system that can be used to authenticate the remote peer, separated by
363 ; the ":" character.  "outkey" is a single, private key to use to authenticate
364 ; to the other side.  Public keys are named /var/lib/asterisk/keys/<name>.pub
365 ; while private keys are named /var/lib/asterisk/keys/<name>.key.  Private
366 ; keys should always be 3DES encrypted.
369 ; NOTE: All hostnames and IP addresses in this file are for example purposes
370 ;       only; you should not expect any of them to actually be available for
371 ;       your use.
374 ;[markster]
375 ;type=user
376 ;context=default
377 ;context=local
378 ;auth=md5,plaintext,rsa
379 ;secret=markpasswd
380 ;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep   ; This channel variable will
381                                                 ; cause the given audio file to
382                                                 ; be played upon completion of
383                                                 ; an attended transfer.
384 ;dbsecret=mysecrets/place       ; Secrets can be stored in astdb, too
385 ;transfer=no            ; Disable IAX native transfer
386 ;transfer=mediaonly     ; When doing IAX native transfers, transfer 
387                         ; only media stream
388 ;jitterbuffer=yes       ; Override global setting an enable jitter buffer
389 ;                       ; for this user
390 ;maxauthreq=10          ; Set maximum number of outstanding AUTHREQs waiting for replies. Any further authentication attempts will be blocked
391 ;                       ; if this limit is reached until they expire or a reply is received.
392 ;callerid="Mark Spencer" <(256) 428-6275>
393 ;deny=0.0.0.0/0.0.0.0
394 ;accountcode=markster0101
395 ;permit=209.16.236.73/255.255.255.0
396 ;language=en            ; Use english as default language
397 ;encryption=yes ; Enable IAX2 encryption.  The default is no.
398 ;keyrotate=off ; This is a compatibility option for older versions of
399 ;              ; IAX2 that do not support key rotation with encryption. 
400 ;              ; This option will disable the IAX_COMMAND_RTENC message. 
401 ;              ; default is on.
402 ;              ; 
404 ; Peers may also be specified, with a secret and
405 ; a remote hostname.
407 [demo]
408 type=peer
409 username=asterisk
410 secret=supersecret
411 host=216.207.245.47
412 ;sendani=no
413 ;host=asterisk.linux-support.net
414 ;port=5036
415 ;mask=255.255.255.255
416 ;qualify=yes                    ; Make sure this peer is alive
417 ;qualifysmoothing = yes         ; use an average of the last two PONG
418                                 ; results to reduce falsely detected LAGGED hosts
419                                 ; Default: Off
420 ;qualifyfreqok = 60000          ; how frequently to ping the peer when
421                                 ; everything seems to be ok, in milliseconds
422 ;qualifyfreqnotok = 10000       ; how frequently to ping the peer when it's
423                                 ; either LAGGED or UNAVAILABLE, in milliseconds
424 ;jitterbuffer=no                ; Turn off jitter buffer for this peer
426 ;encryption=yes ; Enable IAX2 encryption.  The default is no.
427 ;keyrotate=off ; This is a compatibility option for older versions of
428 ;              ; IAX2 that do not support key rotation with encryption. 
429 ;              ; This option will disable the IAX_COMMAND_RTENC message. 
430 ;              ; default is on.
431 ;              ; 
432 ; Peers can remotely register as well, so that they can be mobile.  Default
433 ; IP's can also optionally be given but are not required.  Caller*ID can be
434 ; suggested to the other side as well if it is for example a phone instead of
435 ; another PBX.
438 ;[dynamichost]
439 ;host=dynamic
440 ;secret=mysecret
441 ;mailbox=1234           ; Notify about mailbox 1234
442 ;inkeys=key1:key2
443 ;peercontext=local      ; Default context to request for calls to peer
444 ;defaultip=216.207.245.34
445 ;callerid="Some Host" <(256) 428-6011>
449 ;[biggateway]
450 ;type=peer
451 ;host=192.168.0.1
452 ;context=*
453 ;secret=myscret
454 ;trunk=yes                      ; Use IAX2 trunking with this host
455 ;timezone=America/New_York      ; Set a timezone for the date/time IE
459 ; Friends are a short cut for creating a user and
460 ; a peer with the same values.
462 ;[marko]
463 ;type=friend
464 ;host=dynamic
465 ;regexten=1234
466 ;secret=moofoo   ; Multiple secrets may be specified. For a "user", all
467 ;secret=foomoo   ; specified entries will be accepted as valid. For a "peer",
468 ;secret=shazbot  ; only the last specified secret will be used.
469 ;context=default
470 ;permit=0.0.0.0/0.0.0.0