2 ; SIP Configuration example 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
22 ; reload chan_sip.so Reload configuration file
23 ; Active SIP peers will not be reconfigured
27 context=default ; Default context for incoming calls
28 ;allowguest=no ; Allow or reject guest calls (default is yes)
29 allowoverlap=yes ; Disable overlap dialing support. (Default is yes)
30 allowtransfer=yes ; Disable all transfers (unless enabled in peers or users)
32 ;realm=mydomain.tld ; Realm for digest authentication
33 ; defaults to "asterisk". If you set a system name in
34 ; asterisk.conf, it defaults to that system name
35 ; Realms MUST be globally unique according to RFC 3261
36 ; Set this to your host name or domain name
37 bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
38 ; bindport is the local UDP port that Asterisk will listen on
39 bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
40 srvlookup=yes ; Enable DNS SRV lookups on outbound calls
41 ; Note: Asterisk only uses the first host
43 ; Disabling DNS SRV lookups disables the
44 ; ability to place SIP calls based on domain
45 ; names to some other SIP users on the Internet
47 ;domain=mydomain.tld ; Set default domain for this host
48 ; If configured, Asterisk will only allow
49 ; INVITE and REFER to non-local domains
50 ; Use "sip show domains" to list local domains
51 ;pedantic=yes ; Enable checking of tags in headers,
52 ; international character conversions in URIs
53 ; and multiline formatted headers for strict
54 ; SIP compatibility (defaults to "no")
56 ; See doc/README.tos for a description of these parameters.
57 tos_sip=cs3 ; Sets TOS for SIP packets.
58 tos_audio=ef ; Sets TOS for RTP audio packets.
59 tos_video=af41 ; Sets TOS for RTP video packets.
61 ;maxexpiry=3600 ; Maximum allowed time of incoming registrations
62 ; and subscriptions (seconds)
63 ;minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
64 ;defaultexpiry=120 ; Default length of incoming/outgoing registration
65 ;t1min=100 ; Minimum roundtrip time for messages to monitored hosts
67 ;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
68 ;checkmwi=10 ; Default time between mailbox checks for peers
69 ;buggymwi=no ; Cisco SIP firmware doesn't support the MWI RFC
70 ; fully. Enable this option to not get error messages
71 ; when sending MWI to phones with this bug.
72 ;vmexten=voicemail ; dialplan extension to reach mailbox sets the
73 ; Message-Account in the MWI notify message
74 ; defaults to "asterisk"
75 ;disallow=all ; First disallow all codecs
76 ;allow=ulaw ; Allow codecs in order of preference
77 ;allow=ilbc ; see doc/rtp-packetization for framing options
88 ; This option specifies a preference for which music on hold class this channel
89 ; should listen to when put on hold if the music class has not been set on the
90 ; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
91 ; channel putting this one on hold did not suggest a music class.
93 ; This option may be specified globally, or on a per-user or per-peer basis.
97 ; This option specifies which music on hold class to suggest to the peer channel
98 ; when this channel places the peer on hold. It may be specified globally or on
99 ; a per-user or per-peer basis.
103 language=fr ; Default language setting for all users/peers
104 ; This may also be set for individual users/peers
105 ;relaxdtmf=yes ; Relax dtmf handling
106 ;trustrpid = no ; If Remote-Party-ID should be trusted
107 ;sendrpid = yes ; If Remote-Party-ID should be sent
108 ;progressinband=never ; If we should generate in-band ringing always
109 ; use 'never' to never use in-band signalling, even in cases
110 ; where some buggy devices might not render it
111 ; Valid values: yes, no, never Default: never
112 ;useragent=Asterisk PBX ; Allows you to change the user agent string
113 ;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address
114 ; Note that promiscredir when redirects are made to the
115 ; local system will cause loops since Asterisk is incapable
116 ; of performing a "hairpin" call.
117 ;usereqphone = no ; If yes, ";user=phone" is added to uri that contains
118 ; a valid phone number
119 ;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
121 ; info : SIP INFO messages
122 ; inband : Inband audio (requires 64 kbit codec -alaw, ulaw)
123 ; auto : Use rfc2833 if offered, inband otherwise
126 ;compactheaders = yes ; send compact sip headers.
128 videosupport=yes ; Turn on support for SIP video. You need to turn this on
129 ; in the this section to get any video support at all.
130 ; You can turn it off on a per peer basis if the general
131 ; video support is enabled, but you can't enable it for
132 ; one peer only without enabling in the general section.
133 ;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s)
134 ; Videosupport and maxcallbitrate is settable
135 ; for peers and users as well
136 ;callevents=no ; generate manager events when sip ua
137 ; performs events (e.g. hold)
138 ;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected,
139 ; for any reason, always reject with '401 Unauthorized'
140 ; instead of letting the requester know whether there was
141 ; a matching user or peer for their request
143 ;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing
144 ; order instead of RFC3551 packing order (this is required
145 ; for Sipura and Grandstream ATAs, among others). This is
146 ; contrary to the RFC3551 specification, the peer _should_
147 ; be negotiating AAL2-G726-32 instead :-(
149 ;matchexterniplocally = yes ; Only substitute the externip or externhost setting if it matches
150 ; your localnet setting. Unless you have some sort of strange network
151 ; setup you will not need to enable this.
154 ; If regcontext is specified, Asterisk will dynamically create and destroy a
155 ; NoOp priority 1 extension for a given peer who registers or unregisters with
156 ; us and have a "regexten=" configuration item.
157 ; Multiple contexts may be specified by separating them with '&'. The
158 ; actual extension is the 'regexten' parameter of the registering peer or its
159 ; name if 'regexten' is not provided. If more than one context is provided,
160 ; the context must be specified within regexten by appending the desired
161 ; context after '@'. More than one regexten may be supplied if they are
162 ; separated by '&'. Patterns may be used in regexten.
164 ;regcontext=sipregistrations
166 ;--------------------------- RTP timers ----------------------------------------------------
167 ; These timers are currently used for both audio and video streams. The RTP timeouts
168 ; are only applied to the audio channel.
169 ; The settings are settable in the global section as well as per device
171 ;rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
172 ; on the audio channel
173 ; when we're not on hold. This is to be able to hangup
174 ; a call in the case of a phone disappearing from the net,
175 ; like a powerloss or grandma tripping over a cable.
176 ;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
177 ; on the audio channel
178 ; when we're on hold (must be > rtptimeout)
179 ;rtpkeepalive=<secs> ; Send keepalives in the RTP stream to keep NAT open
180 ; (default is off - zero)
181 ;--------------------------- SIP DEBUGGING ---------------------------------------------------
182 ;sipdebug = yes ; Turn on SIP debugging by default, from
183 ; the moment the channel loads this configuration
184 ;recordhistory=yes ; Record SIP history by default
185 ; (see sip history / sip no history)
186 ;dumphistory=yes ; Dump SIP history at end of SIP dialogue
187 ; SIP history is output to the DEBUG logging channel
190 ;--------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ----------------------------
191 ; You can subscribe to the status of extensions with a "hint" priority
192 ; (See extensions.conf.sample for examples)
193 ; chan_sip support two major formats for notifications: dialog-info and SIMPLE
195 ; You will get more detailed reports (busy etc) if you have a call limit set
196 ; for a device. When the call limit is filled, we will indicate busy. Note that
197 ; you need at least 2 in order to be able to do attended transfers.
199 ; For queues, you will need this level of detail in status reporting, regardless
200 ; if you use SIP subscriptions. Queues and manager use the same internal interface
201 ; for reading status information.
203 ; Note: Subscriptions does not work if you have a realtime dialplan and use the
206 ;allowsubscribe=no ; Disable support for subscriptions. (Default is yes)
207 ;subscribecontext = default ; Set a specific context for SUBSCRIBE requests
208 ; Useful to limit subscriptions to local extensions
209 ; Settable per peer/user also
210 ;notifyringing = yes ; Notify subscriptions on RINGING state (default: no)
211 ;notifyhold = yes ; Notify subscriptions on HOLD state (default: no)
212 ; Turning on notifyringing and notifyhold will add a lot
213 ; more database transactions if you are using realtime.
214 ;limitonpeers = yes ; Apply call limits on peers only. This will improve
215 ; status notification when you are using type=friend
216 ; Inbound calls, that really apply to the user part
217 ; of a friend will now be added to and compared with
218 ; the peer limit instead of applying two call limits,
219 ; one for the peer and one for the user.
220 ; "sip show inuse" will only show active calls on
221 ; the peer side of a "type=friend" object if this
222 ; setting is turned on.
224 ;----------------------------------------- T.38 FAX PASSTHROUGH SUPPORT -----------------------
226 ; This setting is available in the [general] section as well as in device configurations.
227 ; Setting this to yes, enables T.38 fax (UDPTL) passthrough on SIP to SIP calls, provided
228 ; both parties have T38 support enabled in their Asterisk configuration
229 ; This has to be enabled in the general section for all devices to work. You can then
230 ; disable it on a per device basis.
232 ; T.38 faxing only works in SIP to SIP calls, with no local or agent channel being used.
234 ; t38pt_udptl = yes ; Default false
236 ;----------------------------------------- OUTBOUND SIP REGISTRATIONS ------------------------
237 ; Asterisk can register as a SIP user agent to a SIP proxy (provider)
238 ; Format for the register statement is:
239 ; register => user[:secret[:authuser]]@host[:port][/extension]
241 ; If no extension is given, the 's' extension is used. The extension needs to
242 ; be defined in extensions.conf to be able to accept calls from this SIP proxy
245 ; host is either a host name defined in DNS or the name of a section defined
250 ;register => 1234:password@mysipprovider.com
252 ; This will pass incoming calls to the 's' extension
255 ;register => 2345:password@sip_proxy/1234
257 ; Register 2345 at sip provider 'sip_proxy'. Calls from this provider
258 ; connect to local extension 1234 in extensions.conf, default context,
259 ; unless you configure a [sip_proxy] section below, and configure a
261 ; Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]
262 ; Tip 2: Use separate type=peer and type=user sections for SIP providers
263 ; (instead of type=friend) if you have calls in both directions
265 ;registertimeout=20 ; retry registration calls every 20 seconds (default)
266 ;registerattempts=10 ; Number of registration attempts before we give up
267 ; 0 = continue forever, hammering the other server
268 ; until it accepts the registration
269 ; Default is 0 tries, continue forever
271 ;----------------------------------------- NAT SUPPORT ------------------------
272 ; The externip, externhost and localnet settings are used if you use Asterisk
273 ; behind a NAT device to communicate with services on the outside.
275 ;externip = 200.201.202.203 ; Address that we're going to put in outbound SIP
276 ; messages if we're behind a NAT
278 ; The externip and localnet is used
279 ; when registering and communicating with other proxies
280 ; that we're registered with
281 ;externhost=foo.dyndns.net ; Alternatively you can specify an
282 ; external host, and Asterisk will
283 ; perform DNS queries periodically. Not
284 ; recommended for production
285 ; environments! Use externip instead
286 ;externrefresh=10 ; How often to refresh externhost if
288 ; You may add multiple local networks. A reasonable
289 ; set of defaults are:
290 ;localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
291 ;localnet=10.0.0.0/255.0.0.0 ; Also RFC1918
292 ;localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation
293 ;localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
295 ; The nat= setting is used when Asterisk is on a public IP, communicating with
296 ; devices hidden behind a NAT device (broadband router). If you have one-way
297 ; audio problems, you usually have problems with your NAT configuration or your
298 ; firewall's support of SIP+RTP ports. You configure Asterisk choice of RTP
299 ; ports for incoming audio in rtp.conf
301 ;nat=no ; Global NAT settings (Affects all peers and users)
302 ; yes = Always ignore info and assume NAT
303 ; no = Use NAT mode only according to RFC3581 (;rport)
304 ; never = Never attempt NAT mode or RFC3581 support
305 ; route = Assume NAT, don't send rport
306 ; (work around more UNIDEN bugs)
308 ;----------------------------------- MEDIA HANDLING --------------------------------
309 ; By default, Asterisk tries to re-invite the audio to an optimal path. If there's
310 ; no reason for Asterisk to stay in the media path, the media will be redirected.
311 ; This does not really work with in the case where Asterisk is outside and have
312 ; clients on the inside of a NAT. In that case, you want to set canreinvite=nonat
314 ;canreinvite=yes ; Asterisk by default tries to redirect the
315 ; RTP media stream (audio) to go directly from
316 ; the caller to the callee. Some devices do not
317 ; support this (especially if one of them is behind a NAT).
318 ; The default setting is YES. If you have all clients
319 ; behind a NAT, or for some other reason wants Asterisk to
320 ; stay in the audio path, you may want to turn this off.
322 ; In Asterisk 1.4 this setting also affect direct RTP
323 ; at call setup (a new feature in 1.4 - setting up the
324 ; call directly between the endpoints instead of sending
327 ;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up
328 ; the call directly with media peer-2-peer without re-invites.
329 ; Will not work for video and cases where the callee sends
330 ; RTP payloads and fmtp headers in the 200 OK that does not match the
331 ; callers INVITE. This will also fail if canreinvite is enabled when
332 ; the device is actually behind NAT.
334 ;canreinvite=nonat ; An additional option is to allow media path redirection
335 ; (reinvite) but only when the peer where the media is being
336 ; sent is known to not be behind a NAT (as the RTP core can
337 ; determine it based on the apparent IP address the media
340 ;canreinvite=update ; Yet a third option... use UPDATE for media path redirection,
341 ; instead of INVITE. This can be combined with 'nonat', as
342 ; 'canreinvite=update,nonat'. It implies 'yes'.
344 ;----------------------------------------- REALTIME SUPPORT ------------------------
345 ; For additional information on ARA, the Asterisk Realtime Architecture,
346 ; please read realtime.txt and extconfig.txt in the /doc directory of the
349 ;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
350 ; just like friends added from the config file only on a
351 ; as-needed basis? (yes|no)
353 ;rtsavesysname=yes ; Save systemname in realtime database at registration
356 ;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
357 ; If set to yes, when a SIP UA registers successfully, the ip address,
358 ; the origination port, the registration period, and the username of
359 ; the UA will be set to database via realtime.
360 ; If not present, defaults to 'yes'.
361 ;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
362 ; as if it had just registered? (yes|no|<seconds>)
363 ; If set to yes, when the registration expires, the friend will
364 ; vanish from the configuration until requested again. If set
365 ; to an integer, friends expire within this number of seconds
366 ; instead of the registration interval.
368 ;ignoreregexpire=yes ; Enabling this setting has two functions:
370 ; For non-realtime peers, when their registration expires, the
371 ; information will _not_ be removed from memory or the Asterisk database
372 ; if you attempt to place a call to the peer, the existing information
373 ; will be used in spite of it having expired
375 ; For realtime peers, when the peer is retrieved from realtime storage,
376 ; the registration information will be used regardless of whether
377 ; it has expired or not; if it expires while the realtime peer
378 ; is still in memory (due to caching or other reasons), the
379 ; information will not be removed from realtime storage
381 ;----------------------------------------- SIP DOMAIN SUPPORT ------------------------
382 ; Incoming INVITE and REFER messages can be matched against a list of 'allowed'
383 ; domains, each of which can direct the call to a specific context if desired.
384 ; By default, all domains are accepted and sent to the default context or the
385 ; context associated with the user/peer placing the call.
386 ; Domains can be specified using:
387 ; domain=<domain>[,<context>]
389 ; domain=myasterisk.dom
390 ; domain=customer.com,customer-context
392 ; In addition, all the 'default' domains associated with a server should be
393 ; added if incoming request filtering is desired.
396 ; To disallow requests for domains not serviced by this server:
397 ; allowexternaldomains=no
399 ;domain=mydomain.tld,mydomain-incoming
400 ; Add domain and configure incoming context
401 ; for external calls to this domain
402 ;domain=1.2.3.4 ; Add IP address as local domain
403 ; You can have several "domain" settings
404 ;allowexternaldomains=no ; Disable INVITE and REFER to non-local domains
406 ;autodomain=yes ; Turn this on to have Asterisk add local host
407 ; name and local IP to domain list.
409 ; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to
410 ; non-peers, use your primary domain "identity"
411 ; for From: headers instead of just your IP
412 ; address. This is to be polite and
413 ; it may be a mandatory requirement for some
414 ; destinations which do not have a prior
415 ; account relationship with your server.
417 ;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
418 jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
419 ; SIP channel. Defaults to "no". An enabled jitterbuffer will
420 ; be used only if the sending side can create and the receiving
421 ; side can not accept jitter. The SIP channel can accept jitter,
422 ; thus a jitterbuffer on the receive SIP side will be used only
423 ; if it is forced and enabled.
425 ; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP
426 ; channel. Defaults to "no".
428 jbmaxsize = 500 ; Max length of the jitterbuffer in milliseconds.
430 ; jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
431 ; resynchronized. Useful to improve the quality of the voice, with
432 ; big jumps in/broken timestamps, usually sent from exotic devices
433 ; and programs. Defaults to 1000.
435 ; jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
436 ; channel. Two implementations are currently available - "fixed"
437 ; (with size always equals to jbmaxsize) and "adaptive" (with
438 ; variable size, actually the new jb of IAX2). Defaults to fixed.
440 ; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
441 ;-----------------------------------------------------------------------------------
444 ; Global credentials for outbound calls, i.e. when a proxy challenges your
445 ; Asterisk server for authentication. These credentials override
446 ; any credentials in peer/register definition if realm is matched.
448 ; This way, Asterisk can authenticate for outbound calls to other
449 ; realms. We match realm on the proxy challenge and pick an set of
450 ; credentials from this list
452 ; auth = <user>:<secret>@<realm>
453 ; auth = <user>#<md5secret>@<realm>
455 ;auth=mark:topsecret@digium.com
457 ; You may also add auth= statements to [peer] definitions
458 ; Peer auth= override all other authentication settings if we match on realm
460 ;------------------------------------------------------------------------------
461 ; Users and peers have different settings available. Friends have all settings,
462 ; since a friend is both a peer and a user
464 ; User config options: Peer configuration:
465 ; -------------------- -------------------
467 ; callingpres callingpres
471 ; md5secret md5secret
473 ; canreinvite canreinvite
475 ; callgroup callgroup
476 ; pickupgroup pickupgroup
481 ; trustrpid trustrpid
482 ; progressinband progressinband
483 ; promiscredir promiscredir
484 ; useclientcode useclientcode
485 ; accountcode accountcode
489 ; call-limit call-limit
490 ; allowoverlap allowoverlap
491 ; allowsubscribe allowsubscribe
492 ; allowtransfer allowtransfer
493 ; subscribecontext subscribecontext
494 ; videosupport videosupport
495 ; maxcallbitrate maxcallbitrate
496 ; rfc2833compensate mailbox
513 ; For incoming calls only. Example: FWD (Free World Dialup)
514 ; We match on IP address of the proxy for incoming calls
515 ; since we can not match on username (caller id)
521 ;type=peer ; we only want to call out, not be called
523 ;username=yourusername ; Authentication user for outbound proxies
524 ;fromuser=yourusername ; Many SIP providers require this!
525 ;fromdomain=provider.sip.domain
526 ;host=box.provider.com
527 ;usereqphone=yes ; This provider requires ";user=phone" on URI
528 ;call-limit=5 ; permit only 5 simultaneous outgoing calls to this peer
529 ;outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the peer
530 ; Call-limits will not be enforced on real-time peers,
531 ; since they are not stored in-memory
532 ;port=80 ; The port number we want to connect to on the remote side
533 ; Also used as "defaultport" in combination with "defaultip" settings
535 ;------------------------------------------------------------------------------
536 ; Definitions of locally connected SIP devices
538 ; type = user a device that authenticates to us by "from" field to place calls
539 ; type = peer a device we place calls to or that calls us and we match by host
540 ; type = friend two configurations (peer+user) in one
542 ; For device names, we recommend using only a-z, numerics (0-9) and underscore
544 ; For local phones, type=friend works most of the time
546 ; If you have one-way audio, you probably have NAT problems.
547 ; If Asterisk is on a public IP, and the phone is inside of a NAT device
548 ; you will need to configure nat option for those phones.
549 ; Also, turn on qualify=yes to keep the nat session open
553 ; Pont "Codian" CERN/CNRS/IN2P3/Inserm/INRA pour extension *341
554 ; http://vacs.in2p3.fr/
559 host=ccmcu40.in2p3.fr
572 ; Comptes pour postes clients locaux SIP
573 #include "auf/sip.local"