(closes issue #12846)
[asterisk-bristuff.git] / configs / iax.conf.sample
blobcd4b8751a39bd10d9d52920eb3f659b63b626faa
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 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 ;maxjitterbuffer=1000
136 ;maxjitterinterps=10
137 ;resyncthreshold=1000
139 ;trunkfreq=20                   ; How frequently to send trunk msgs (in ms)
141 ; Should we send timestamps for the individual sub-frames within trunk frames?
142 ; There is a small bandwidth use for these (less than 1kbps/call), but they
143 ; ensure that frame timestamps get sent end-to-end properly.  If both ends of
144 ; all your trunks go directly to TDM, _and_ your trunkfreq equals the frame
145 ; length for your codecs, you can probably suppress these.  The receiver must
146 ; also support this feature, although they do not also need to have it enabled.
148 ; trunktimestamps=yes
150 ; Minimum and maximum amounts of time that IAX peers can request as
151 ; a registration expiration interval (in seconds).
152 ; minregexpire = 60
153 ; maxregexpire = 60
155 ; IAX helper threads
156 ; Establishes the number of iax helper threads to handle I/O.
157 ; iaxthreadcount = 10
158 ; Establishes the number of extra dynamic threads that may be spawned to handle I/O
159 ; iaxmaxthreadcount = 100
161 ; We can register with another IAX server to let him know where we are
162 ; in case we have a dynamic IP address for example
164 ; Register with tormenta using username marko and password secretpass
166 ;register => marko:secretpass@tormenta.linux-support.net
168 ; Register joe at remote host with no password
170 ;register => joe@remotehost:5656
172 ; Register marko at tormenta.linux-support.net using RSA key "torkey"
174 ;register => marko:[torkey]@tormenta.linux-support.net
176 ; Sample Registration for iaxtel
178 ; Visit http://www.iaxtel.com to register with iaxtel.  Replace "user"
179 ; and "pass" with your username and password for iaxtel.  Incoming 
180 ; calls arrive at the "s" extension of "default" context.
182 ;register => user:pass@iaxtel.com
184 ; Sample Registration for IAX + FWD
186 ; To register using IAX with FWD, it must be enabled by visiting the URL
187 ; http://www.fwdnet.net/index.php?section_id=112
189 ; Note that you need an extension in you default context which matches
190 ; your free world dialup number.  Please replace "FWDNumber" with your
191 ; FWD number and "passwd" with your password.
193 ;register => FWDNumber:passwd@iax.fwdnet.net
196 ; You can disable authentication debugging to reduce the amount of 
197 ; debugging traffic.
199 ;authdebug=no
201 ; See doc/ip-tos.txt for a description of the tos parameters.
202 ;tos=ef
204 ; If regcontext is specified, Asterisk will dynamically create and destroy
205 ; a NoOp priority 1 extension for a given peer who registers or unregisters
206 ; with us.  The actual extension is the 'regexten' parameter of the registering
207 ; peer or its name if 'regexten' is not provided.  More than one regexten
208 ; may be supplied if they are separated by '&'.  Patterns may be used in
209 ; regexten.
211 ;regcontext=iaxregistrations
213 ; If we don't get ACK to our NEW within 2000ms, and autokill is set to yes,
214 ; then we cancel the whole thing (that's enough time for one retransmission
215 ; only).  This is used to keep things from stalling for a long time for a host
216 ; that is not available, but would be ill advised for bad connections.  In
217 ; addition to 'yes' or 'no' you can also specify a number of milliseconds.
218 ; See 'qualify' for individual peers to turn on for just a specific peer.
220 autokill=yes
222 ; codecpriority controls the codec negotiation of an inbound IAX call.
223 ; This option is inherited to all user entities.  It can also be defined 
224 ; in each user entity separately which will override the setting in general.
226 ; The valid values are:
228 ; caller   - Consider the callers preferred order ahead of the host's.
229 ; host     - Consider the host's preferred order ahead of the caller's.
230 ; disabled - Disable the consideration of codec preference altogether.
231 ;            (this is the original behaviour before preferences were added)
232 ; reqonly  - Same as disabled, only do not consider capabilities if
233 ;            the requested format is not available the call will only
234 ;            be accepted if the requested format is available.
236 ; The default value is 'host'
238 ;codecpriority=host
240 ;rtcachefriends=yes     ; Cache realtime friends by adding them to the internal list
241                         ; just like friends added from the config file only on a
242                         ; as-needed basis? (yes|no)
244 ;rtupdate=yes           ; Send registry updates to database using realtime? (yes|no)
245                         ; If set to yes, when a IAX2 peer registers successfully,
246                         ; the ip address, the origination port, the registration period,
247                         ; and the username of the peer will be set to database via realtime.
248                         ; If not present, defaults to 'yes'.
250 ;rtautoclear=yes        ; Auto-Expire friends created on the fly on the same schedule
251                         ; as if it had just registered? (yes|no|<seconds>)
252                         ; If set to yes, when the registration expires, the friend will
253                         ; vanish from the configuration until requested again.
254                         ; If set to an integer, friends expire within this number of
255                         ; seconds instead of the registration interval.
257 ;rtignoreregexpire=yes  ; When reading a peer from Realtime, if the peer's registration
258                         ; has expired based on its registration interval, used the stored
259                         ; address information regardless. (yes|no)
261 ; Guest sections for unauthenticated connection attempts.  Just specify an
262 ; empty secret, or provide no secret section.
264 [guest]
265 type=user
266 context=default
267 callerid="Guest IAX User"
270 ; Trust Caller*ID Coming from iaxtel.com
272 [iaxtel]
273 type=user
274 context=default
275 auth=rsa
276 inkeys=iaxtel
279 ; Trust Caller*ID Coming from iax.fwdnet.net
281 [iaxfwd]
282 type=user
283 context=default
284 auth=rsa
285 inkeys=freeworlddialup
288 ; Trust callerid delivered over DUNDi/e164
291 ;[dundi]
292 ;type=user
293 ;dbsecret=dundi/secret
294 ;context=dundi-e164-local
297 ; Further user sections may be added, specifying a context and a secret used
298 ; for connections with that given authentication name.  Limited IP based
299 ; access control is allowed by use of "allow" and "deny" keywords.  Multiple
300 ; rules are permitted.  Multiple permitted contexts may be specified, in
301 ; which case the first will be the default.  You can also override caller*ID
302 ; so that when you receive a call you set the Caller*ID to be what you want
303 ; instead of trusting what the remote user provides
305 ; There are three authentication methods that are supported:  md5, plaintext,
306 ; and rsa.  The least secure is "plaintext", which sends passwords cleartext
307 ; across the net.  "md5" uses a challenge/response md5 sum arrangement, but
308 ; still requires both ends have plain text access to the secret.  "rsa" allows
309 ; unidirectional secret knowledge through public/private keys.  If "rsa"
310 ; authentication is used, "inkeys" is a list of acceptable public keys on the 
311 ; local system that can be used to authenticate the remote peer, separated by
312 ; the ":" character.  "outkey" is a single, private key to use to authenticate
313 ; to the other side.  Public keys are named /var/lib/asterisk/keys/<name>.pub
314 ; while private keys are named /var/lib/asterisk/keys/<name>.key.  Private
315 ; keys should always be 3DES encrypted.
318 ; NOTE: All hostnames and IP addresses in this file are for example purposes
319 ;       only; you should not expect any of them to actually be available for
320 ;       your use.
323 ;[markster]
324 ;type=user
325 ;context=default
326 ;context=local
327 ;auth=md5,plaintext,rsa
328 ;secret=markpasswd
329 ;setvar=foo=bar
330 ;dbsecret=mysecrets/place       ; Secrets can be stored in astdb, too
331 ;transfer=no            ; Disable IAX native transfer
332 ;transfer=mediaonly     ; When doing IAX native transfers, transfer 
333                         ; only media stream
334 ;jitterbuffer=yes       ; Override global setting an enable jitter buffer
335 ;                       ; for this user
336 ;maxauthreq=10          ; Set maximum number of outstanding AUTHREQs waiting for replies. Any further authentication attempts will be blocked
337 ;                       ; if this limit is reached until they expire or a reply is received.
338 ;callerid="Mark Spencer" <(256) 428-6275>
339 ;deny=0.0.0.0/0.0.0.0
340 ;accountcode=markster0101
341 ;permit=209.16.236.73/255.255.255.0
342 ;language=en            ; Use english as default language
344 ; Peers may also be specified, with a secret and
345 ; a remote hostname.
347 [demo]
348 type=peer
349 username=asterisk
350 secret=supersecret
351 host=216.207.245.47
352 ;sendani=no
353 ;host=asterisk.linux-support.net
354 ;port=5036
355 ;mask=255.255.255.255
356 ;qualify=yes                    ; Make sure this peer is alive
357 ;qualifysmoothing = yes         ; use an average of the last two PONG
358                                 ; results to reduce falsely detected LAGGED hosts
359                                 ; Default: Off
360 ;qualifyfreqok = 60000          ; how frequently to ping the peer when
361                                 ; everything seems to be ok, in milliseconds
362 ;qualifyfreqnotok = 10000       ; how frequently to ping the peer when it's
363                                 ; either LAGGED or UNAVAILABLE, in milliseconds
364 ;jitterbuffer=no                ; Turn off jitter buffer for this peer
367 ; Peers can remotely register as well, so that they can be mobile.  Default
368 ; IP's can also optionally be given but are not required.  Caller*ID can be
369 ; suggested to the other side as well if it is for example a phone instead of
370 ; another PBX.
373 ;[dynamichost]
374 ;host=dynamic
375 ;secret=mysecret
376 ;mailbox=1234           ; Notify about mailbox 1234
377 ;inkeys=key1:key2
378 ;peercontext=local      ; Default context to request for calls to peer
379 ;defaultip=216.207.245.34
380 ;callerid="Some Host" <(256) 428-6011>
384 ;[biggateway]
385 ;type=peer
386 ;host=192.168.0.1
387 ;context=*
388 ;secret=myscret
389 ;trunk=yes                      ; Use IAX2 trunking with this host
390 ;timezone=America/New_York      ; Set a timezone for the date/time IE
394 ; Friends are a short cut for creating a user and
395 ; a peer with the same values.
397 ;[marko]
398 ;type=friend
399 ;host=dynamic
400 ;regexten=1234
401 ;secret=moofoo   ; Multiple secrets may be specified. For a "user", all
402 ;secret=foomoo   ; specified entries will be accepted as valid. For a "peer",
403 ;secret=shazbot  ; only the last specified secret will be used.
404 ;context=default
405 ;permit=0.0.0.0/0.0.0.0