If 'faxdetect=yes' in sip.conf, switch to a 'fax' extension (if it exists) after...
[asterisk/asterisk.git] / configs / sip.conf.sample
1 ;
2 ; SIP Configuration example for Asterisk
3 ;
4 ; SIP dial strings
5 ;-----------------------------------------------------------
6 ; In the dialplan (extensions.conf) you can use several 
7 ; syntaxes for dialing SIP devices.
8 ;        SIP/devicename
9 ;        SIP/username@domain   (SIP uri)
10 ;        SIP/username[:password[:md5secret[:authname[:transport]]]]@host[:port]
11 ;        SIP/devicename/extension
12 ;
13 ;
14 ; Devicename
15 ;        devicename is defined as a peer in a section below.
16 ;
17 ; username@domain
18 ;        Call any SIP user on the Internet
19 ;        (Don't forget to enable DNS SRV records if you want to use this)
20
21 ; devicename/extension
22 ;        If you define a SIP proxy as a peer below, you may call
23 ;        SIP/proxyhostname/user or SIP/user@proxyhostname 
24 ;        where the proxyhostname is defined in a section below 
25 ;        This syntax also works with ATA's with FXO ports
26 ;
27 ; SIP/username[:password[:md5secret[:authname]]]@host[:port]
28 ;        This form allows you to specify password or md5secret and authname
29 ;        without altering any authentication data in config.
30 ;        Examples:
31 ;
32 ;        SIP/*98@mysipproxy
33 ;        SIP/sales:topsecret::account02@domain.com:5062
34 ;        SIP/12345678::bc53f0ba8ceb1ded2b70e05c3f91de4f:myname@192.168.0.1
35 ;
36 ; All of these dial strings specify the SIP request URI.
37 ; In addition, you can specify a specific To: header by adding an
38 ; exclamation mark after the dial string, like
39 ;
40 ;         SIP/sales@mysipproxy!sales@edvina.net
41 ;
42 ; CLI Commands
43 ; -------------------------------------------------------------
44 ; Useful CLI commands to check peers/users:
45 ;   sip show peers               Show all SIP peers (including friends)
46 ;   sip show registry            Show status of hosts we register with
47 ;
48 ;   sip set debug                Show all SIP messages
49 ;
50 ;   module reload chan_sip.so    Reload configuration file
51 ;
52
53 ; ** Deprecated configuration options **
54 ; The "call-limit" configuation option is deprecated. It still works in
55 ; this version of Asterisk, but will disappear in the next version.
56 ; You are encouraged to use the dialplan groupcount functionality
57 ; to enforce call limits instead of using this channel-specific method.
58 ;
59 ; You can still set limits per device in sip.conf or in a database by using 
60 ; "setvar" to set variables that can be used in the dialplan for various limits.
61
62 [general]
63 context=default                 ; Default context for incoming calls
64 ;allowguest=no                  ; Allow or reject guest calls (default is yes)
65 ;match_auth_username=yes        ; if available, match user entry using the
66                                 ; 'username' field from the authentication line
67                                 ; instead of the From: field.
68 allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
69 ;allowtransfer=no               ; Disable all transfers (unless enabled in peers or users)
70                                 ; Default is enabled
71 ;realm=mydomain.tld             ; Realm for digest authentication
72                                 ; defaults to "asterisk". If you set a system name in
73                                 ; asterisk.conf, it defaults to that system name
74                                 ; Realms MUST be globally unique according to RFC 3261
75                                 ; Set this to your host name or domain name
76 udpbindaddr=0.0.0.0             ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
77                                 ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
78
79 ;
80 ; Note that the TCP and TLS support for chan_sip is currently considered
81 ; experimental.  Since it is new, all of the related configuration options are
82 ; subject to change in any release.  If they are changed, the changes will
83 ; be reflected in this sample configuration file, as well as in the UPGRADE.txt file.
84 ;
85 tcpenable=no                    ; Enable server for incoming TCP connections (default is no)
86 tcpbindaddr=0.0.0.0             ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
87                                 ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)
88
89 ;tlsenable=no                   ; Enable server for incoming TLS (secure) connections (default is no)
90 ;tlsbindaddr=0.0.0.0            ; IP address for TLS server to bind to (0.0.0.0) binds to all interfaces)
91                                 ; Optionally add a port number, 192.168.1.1:5063 (default is port 5061)
92                                 ; Remember that the IP address must match the common name (hostname) in the
93                                 ; certificate, so you don't want to bind a TLS socket to multiple IP addresses.
94
95 ;tlscertfile=asterisk.pem       ; Certificate file (*.pem only) to use for TLS connections 
96                                 ; default is to look for "asterisk.pem" in current directory
97
98 ;tlscafile=</path/to/certificate>
99 ;        If the server your connecting to uses a self signed certificate
100 ;        you should have their certificate installed here so the code can 
101 ;        verify the authenticity of their certificate.
102
103 ;tlscadir=</path/to/ca/dir>
104 ;        A directory full of CA certificates.  The files must be named with 
105 ;        the CA subject name hash value. 
106 ;        (see man SSL_CTX_load_verify_locations for more info) 
107
108 ;tlsdontverifyserver=[yes|no]
109 ;        If set to yes, don't verify the servers certificate when acting as 
110 ;        a client.  If you don't have the server's CA certificate you can
111 ;        set this and it will connect without requiring tlscafile to be set.
112 ;        Default is no.
113
114 ;tlscipher=<SSL cipher string>
115 ;        A string specifying which SSL ciphers to use or not use
116 ;        A list of valid SSL cipher strings can be found at: 
117 ;                http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
118
119 srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
120                                 ; Note: Asterisk only uses the first host 
121                                 ; in SRV records
122                                 ; Disabling DNS SRV lookups disables the 
123                                 ; ability to place SIP calls based on domain 
124                                 ; names to some other SIP users on the Internet
125
126 ;pedantic=yes                   ; Enable checking of tags in headers, 
127                                 ; international character conversions in URIs
128                                 ; and multiline formatted headers for strict
129                                 ; SIP compatibility (defaults to "no")
130
131 ; See qos.tex or Quality of Service section of asterisk.pdf for a description of these parameters.
132 ;tos_sip=cs3                    ; Sets TOS for SIP packets.
133 ;tos_audio=ef                   ; Sets TOS for RTP audio packets.
134 ;tos_video=af41                 ; Sets TOS for RTP video packets.
135 ;tos_text=af41                  ; Sets TOS for RTP text packets.
136
137 ;cos_sip=3                      ; Sets 802.1p priority for SIP packets.
138 ;cos_audio=5                    ; Sets 802.1p priority for RTP audio packets.
139 ;cos_video=4                    ; Sets 802.1p priority for RTP video packets.
140 ;cos_text=3                     ; Sets 802.1p priority for RTP text packets.
141
142 ;maxexpiry=3600                 ; Maximum allowed time of incoming registrations
143                                 ; and subscriptions (seconds)
144 ;minexpiry=60                   ; Minimum length of registrations/subscriptions (default 60)
145 ;defaultexpiry=120              ; Default length of incoming/outgoing registration
146 ;mwiexpiry=3600                 ; Expiry time for outgoing MWI subscriptions
147 ;qualifyfreq=60                 ; Qualification: How often to check for the 
148                                 ; host to be up in seconds
149                                 ; Set to low value if you use low timeout for
150                                 ; NAT of UDP sessions
151 ;notifymimetype=text/plain      ; Allow overriding of mime type in MWI NOTIFY
152 ;buggymwi=no                    ; Cisco SIP firmware doesn't support the MWI RFC
153                                 ; fully. Enable this option to not get error messages
154                                 ; when sending MWI to phones with this bug.
155 ;vmexten=voicemail              ; dialplan extension to reach mailbox sets the 
156                                 ; Message-Account in the MWI notify message 
157                                 ; defaults to "asterisk"
158 ;disallow=all                   ; First disallow all codecs
159 ;allow=ulaw                     ; Allow codecs in order of preference
160 ;allow=ilbc                     ; see doc/rtp-packetization for framing options
161 ;
162 ; This option specifies a preference for which music on hold class this channel
163 ; should listen to when put on hold if the music class has not been set on the
164 ; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
165 ; channel putting this one on hold did not suggest a music class.
166 ;
167 ; This option may be specified globally, or on a per-user or per-peer basis.
168 ;
169 ;mohinterpret=default
170 ;
171 ; This option specifies which music on hold class to suggest to the peer channel
172 ; when this channel places the peer on hold. It may be specified globally or on
173 ; a per-user or per-peer basis.
174 ;
175 ;mohsuggest=default
176 ;
177 ;parkinglot=plaza               ; Sets the default parking lot for call parking
178                                 ; This may also be set for individual users/peers
179                                 ; Parkinglots are configured in features.conf
180 ;language=en                    ; Default language setting for all users/peers
181                                 ; This may also be set for individual users/peers
182 ;relaxdtmf=yes                  ; Relax dtmf handling
183 ;trustrpid = no                 ; If Remote-Party-ID should be trusted
184 ;sendrpid = yes                 ; If Remote-Party-ID should be sent
185 ;progressinband=never           ; If we should generate in-band ringing always
186                                 ; use 'never' to never use in-band signalling, even in cases
187                                 ; where some buggy devices might not render it
188                                 ; Valid values: yes, no, never Default: never
189 ;useragent=Asterisk PBX         ; Allows you to change the user agent string
190                                 ; The default user agent string also contains the Asterisk
191                                 ; version. If you don't want to expose this, change the
192                                 ; useragent string.
193 ;sdpsession=Asterisk PBX        ; Allows you to change the SDP session name string, (s=)
194                                 ; Like the useragent parameter, the default user agent string
195                                 ; also contains the Asterisk version.
196 ;sdpowner=root                  ; Allows you to change the username field in the SDP owner string, (o=)
197                                 ; This field MUST NOT contain spaces
198 ;promiscredir = no              ; If yes, allows 302 or REDIR to non-local SIP address
199                                 ; Note that promiscredir when redirects are made to the
200                                 ; local system will cause loops since Asterisk is incapable
201                                 ; of performing a "hairpin" call.
202 ;usereqphone = no               ; If yes, ";user=phone" is added to uri that contains
203                                 ; a valid phone number
204 ;dtmfmode = rfc2833             ; Set default dtmfmode for sending DTMF. Default: rfc2833
205                                 ; Other options: 
206                                 ; info : SIP INFO messages (application/dtmf-relay)
207                                 ; shortinfo : SIP INFO messages (application/dtmf)
208                                 ; inband : Inband audio (requires 64 kbit codec -alaw, ulaw)
209                                 ; auto : Use rfc2833 if offered, inband otherwise
210
211 ;compactheaders = yes           ; send compact sip headers.
212 ;
213 ;videosupport=yes               ; Turn on support for SIP video. You need to turn this
214                                 ; on in this section to get any video support at all.
215                                 ; You can turn it off on a per peer basis if the general
216                                 ; video support is enabled, but you can't enable it for
217                                 ; one peer only without enabling in the general section.
218                                 ; If you set videosupport to "always", then RTP ports will
219                                 ; always be set up for video, even on clients that don't
220                                 ; support it.  This assists callfile-derived calls and
221                                 ; certain transferred calls to use always use video when
222                                 ; available. [yes|NO|always]
223
224 ;maxcallbitrate=384             ; Maximum bitrate for video calls (default 384 kb/s)
225                                 ; Videosupport and maxcallbitrate is settable
226                                 ; for peers and users as well
227 ;callevents=no                  ; generate manager events when sip ua 
228                                 ; performs events (e.g. hold)
229 ;authfailureevents=no           ; generate manager "peerstatus" events when peer can't
230                                 ; authenticate with Asterisk. Peerstatus will be "rejected".
231 ;alwaysauthreject = yes         ; When an incoming INVITE or REGISTER is to be rejected,
232                                 ; for any reason, always reject with '401 Unauthorized'
233                                 ; instead of letting the requester know whether there was
234                                 ; a matching user or peer for their request
235
236 ;g726nonstandard = yes          ; If the peer negotiates G726-32 audio, use AAL2 packing
237                                 ; order instead of RFC3551 packing order (this is required
238                                 ; for Sipura and Grandstream ATAs, among others). This is
239                                 ; contrary to the RFC3551 specification, the peer _should_
240                                 ; be negotiating AAL2-G726-32 instead :-(
241 ;outboundproxy=proxy.provider.domain            ; send outbound signaling to this proxy, not directly to the devices
242 ;outboundproxy=proxy.provider.domain:8080       ; send outbound signaling to this proxy, not directly to the devices
243 ;outboundproxy=proxy.provider.domain,force      ; Send ALL outbound signalling to proxy, ignoring route: headers
244 ;outboundproxy=tls://proxy.provider.domain      ; same as '=proxy.provider.domain' except we try to connect with tls 
245 ;                                               ; (could also be tcp,udp) - defining transports on the proxy line only
246 ;                                               ; applies for the global proxy, otherwise use the transport= option
247 ;matchexterniplocally = yes     ; Only substitute the externip or externhost setting if it matches
248                                 ; your localnet setting. Unless you have some sort of strange network
249                                 ; setup you will not need to enable this.
250
251 ;dynamic_exclude_static = yes   ; Disallow all dynamic hosts from registering
252                                 ; as any IP address used for staticly defined
253                                 ; hosts.  This helps avoid the configuration
254                                 ; error of allowing your users to register at
255                                 ; the same address as a SIP provider.
256
257 ;contactdeny=0.0.0.0/0.0.0.0           ; Use contactpermit and contactdeny to
258 ;contactpermit=172.16.0.0/255.255.0.0  ; restrict at what IPs your users may
259                                        ; register their phones.
260
261 ;
262 ; If regcontext is specified, Asterisk will dynamically create and destroy a
263 ; NoOp priority 1 extension for a given peer who registers or unregisters with
264 ; us and have a "regexten=" configuration item.  
265 ; Multiple contexts may be specified by separating them with '&'. The 
266 ; actual extension is the 'regexten' parameter of the registering peer or its
267 ; name if 'regexten' is not provided.  If more than one context is provided,
268 ; the context must be specified within regexten by appending the desired
269 ; context after '@'.  More than one regexten may be supplied if they are 
270 ; separated by '&'.  Patterns may be used in regexten.
271 ;
272 ;regcontext=sipregistrations
273 ;regextenonqualify=yes          ; Default "no"
274                                 ; If you have qualify on and the peer becomes unreachable
275                                 ; this setting will enforce inactivation of the regexten
276                                 ; extension for the peer
277 ;
278 ;--------------------------- SIP timers ----------------------------------------------------
279 ; These timers are used primarily in INVITE transactions. 
280 ; The default for Timer T1 is 500 ms or the measured run-trip time between
281 ; Asterisk and the device if you have qualify=yes for the device.
282 ;
283 ;t1min=100                      ; Minimum roundtrip time for messages to monitored hosts
284                                 ; Defaults to 100 ms
285 ;timert1=500                    ; Default T1 timer
286                                 ; Defaults to 500 ms or the measured round-trip
287                                 ; time to a peer (qualify=yes).
288 ;timerb=32000                   ; Call setup timer. If a provisional response is not received
289                                 ; in this amount of time, the call will autocongest
290                                 ; Defaults to 64*timert1
291
292 ;--------------------------- RTP timers ----------------------------------------------------
293 ; These timers are currently used for both audio and video streams. The RTP timeouts
294 ; are only applied to the audio channel.
295 ; The settings are settable in the global section as well as per device
296 ;
297 ;rtptimeout=60                  ; Terminate call if 60 seconds of no RTP or RTCP activity
298                                 ; on the audio channel
299                                 ; when we're not on hold. This is to be able to hangup
300                                 ; a call in the case of a phone disappearing from the net,
301                                 ; like a powerloss or grandma tripping over a cable.
302 ;rtpholdtimeout=300             ; Terminate call if 300 seconds of no RTP or RTCP activity
303                                 ; on the audio channel
304                                 ; when we're on hold (must be > rtptimeout)
305 ;rtpkeepalive=<secs>            ; Send keepalives in the RTP stream to keep NAT open
306                                 ; (default is off - zero)
307
308 ;--------------------------- SIP Session-Timers (RFC 4028)------------------------------------
309 ; SIP Session-Timers provide an end-to-end keep-alive mechanism for active SIP sessions.
310 ; This mechanism can detect and reclaim SIP channels that do not terminate through normal
311 ; signaling procedures. Session-Timers can be configured globally or at a user/peer level.
312 ; The operation of Session-Timers is driven by the following configuration parameters:
313 ;
314 ; * session-timers    - Session-Timers feature operates in the following three modes:
315 ;                            originate : Request and run session-timers always
316 ;                            accept    : Run session-timers only when requested by other UA
317 ;                            refuse    : Do not run session timers in any case
318 ;                       The default mode of operation is 'accept'.
319 ; * session-expires   - Maximum session refresh interval in seconds. Defaults to 1800 secs.
320 ; * session-minse     - Minimum session refresh interval in seconds. Defualts to 90 secs.
321 ; * session-refresher - The session refresher (uac|uas). Defaults to 'uas'.
322 ;
323 ;session-timers=originate
324 ;session-expires=600
325 ;session-minse=90
326 ;session-refresher=uas
327 ;
328 ;--------------------------- HASH TABLE SIZES ------------------------------------------------
329 ; For maximum efficiency, adjust the following
330 ; values to be slightly larger than the maximum number of in-memory objects (devices).
331 ; Too large, and space is wasted. Too small, and things will run slower.
332 ; 563 is probably way too big for small (home) applications, but it
333 ; should cover most small/medium sites.
334 ; It is recommended to make the sizes be a prime number!
335 ; This was internally set to 17 for small-memory applications...
336 ; All tables default to 563, except when compiled in LOW_MEMORY mode,
337 ; in which case, they default to 17. You can override this by uncommenting
338 ; the following, and changing the values.
339 ;hash_users=563
340 ;hash_peers=563
341 ;hash_dialogs=563
342
343 ;--------------------------- SIP DEBUGGING ---------------------------------------------------
344 ;sipdebug = yes                 ; Turn on SIP debugging by default, from
345                                 ; the moment the channel loads this configuration
346 ;recordhistory=yes              ; Record SIP history by default 
347                                 ; (see sip history / sip no history)
348 ;dumphistory=yes                ; Dump SIP history at end of SIP dialogue
349                                 ; SIP history is output to the DEBUG logging channel
350
351
352 ;--------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ----------------------------
353 ; You can subscribe to the status of extensions with a "hint" priority
354 ; (See extensions.conf.sample for examples)
355 ; chan_sip support two major formats for notifications: dialog-info and SIMPLE 
356 ;
357 ; You will get more detailed reports (busy etc) if you have a call counter enabled
358 ; for a device. 
359 ;
360 ; If you set the busylevel, we will indicate busy when we have a number of calls that 
361 ; matches the busylevel treshold.
362 ;
363 ; For queues, you will need this level of detail in status reporting, regardless
364 ; if you use SIP subscriptions. Queues and manager use the same internal interface
365 ; for reading status information.
366 ;
367 ; Note: Subscriptions does not work if you have a realtime dialplan and use the
368 ; realtime switch.
369 ;
370 ;allowsubscribe=no              ; Disable support for subscriptions. (Default is yes)
371 ;subscribecontext = default     ; Set a specific context for SUBSCRIBE requests
372                                 ; Useful to limit subscriptions to local extensions
373                                 ; Settable per peer/user also
374 ;notifyringing = no             ; Control whether subscriptions already INUSE get sent
375                                 ; RINGING when another call is sent (default: yes)
376 ;notifyhold = yes               ; Notify subscriptions on HOLD state (default: no)
377                                 ; Turning on notifyringing and notifyhold will add a lot
378                                 ; more database transactions if you are using realtime.
379 ;notifycid = yes                ; Control whether caller ID information is sent along with
380                                 ; dialog-info+xml notifications (supported by snom phones).
381                                 ; Note that this feature will only work properly when the
382                                 ; incoming call is using the same extension and context that
383                                 ; is being used as the hint for the called extension.  This means
384                                 ; that it won't work when using subscribecontext for your sip
385                                 ; user or peer (if subscribecontext is different than context).
386                                 ; This is also limited to a single caller, meaning that if an
387                                 ; extension is ringing because multiple calls are incoming,
388                                 ; only one will be used as the source of caller ID.  Specify
389                                 ; 'ignore-context' to ignore the called context when looking
390                                 ; for the caller's channel.  The default value is 'no.'
391 ;callcounter = yes              ; Enable call counters on devices. This can be set per
392                                 ; device too.
393
394 ;----------------------------------------- T.38 FAX PASSTHROUGH SUPPORT -----------------------
395 ;
396 ; This setting is available in the [general] section as well as in device configurations.
397 ; Setting this to yes, enables T.38 fax (UDPTL) passthrough on SIP to SIP calls, provided
398 ; both parties have T38 support enabled in their Asterisk configuration 
399 ; This has to be enabled in the general section for all devices to work. You can then
400 ; disable it on a per device basis. 
401 ;
402 ; T.38 faxing only works in SIP to SIP calls, with no local or agent channel being used.
403 ;
404 ; t38pt_udptl = yes            ; Default false
405 ;
406 ; Fax Detect will cause the SIP channel to jump to the 'fax' extension (if it exists)
407 ; after T.38 is successfully negotiated.
408
409 ; faxdetect = yes              ; Default false  
410 ;
411 ;----------------------------------------- OUTBOUND SIP REGISTRATIONS  ------------------------
412 ; Asterisk can register as a SIP user agent to a SIP proxy (provider)
413 ; Format for the register statement is:
414 ;       register => [transport://]user[:secret[:authuser]]@host[:port][/extension][~expiry]
415 ;
416
417 ;
418 ; If no extension is given, the 's' extension is used. The extension needs to
419 ; be defined in extensions.conf to be able to accept calls from this SIP proxy
420 ; (provider).
421 ;
422 ; host is either a host name defined in DNS or the name of a section defined
423 ; below.
424 ;
425 ; A similar effect can be achieved by adding a "callbackextension" option in a peer section.
426 ; this is equivalent to having the following line in the general section:
427 ;
428 ;        register => username:secret@host/callbackextension
429 ;
430 ; and more readable because you don't have to write the parameters in two places
431 ; (note that the "port" is ignored - this is a bug that should be fixed).
432 ;
433 ; Examples:
434 ;
435 ;register => 1234:password@mysipprovider.com        
436 ;
437 ;     This will pass incoming calls to the 's' extension
438 ;
439 ;
440 ;register => 2345:password@sip_proxy/1234
441 ;
442 ;    Register 2345 at sip provider 'sip_proxy'.  Calls from this provider
443 ;    connect to local extension 1234 in extensions.conf, default context,
444 ;    unless you configure a [sip_proxy] section below, and configure a
445 ;    context.
446 ;    Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]
447 ;    Tip 2: Use separate inbound and outbound sections for SIP providers
448 ;           (instead of type=friend) if you have calls in both directions
449   
450 ;registertimeout=20             ; retry registration calls every 20 seconds (default)
451 ;registerattempts=10            ; Number of registration attempts before we give up
452                                 ; 0 = continue forever, hammering the other server
453                                 ; until it accepts the registration
454                                 ; Default is 0 tries, continue forever
455 ;----------------------------------------- OUTBOUND MWI SUBSCRIPTIONS -------------------------
456 ; Asterisk can subscribe to receive the MWI from another SIP server and store it locally for retrieval
457 ; by other phones.
458 ; Format for the mwi register statement is:
459 ;       mwi => user[:secret[:authuser]]@host[:port][/mailbox]
460 ;
461 ; Examples:
462 ;mwi => 1234:password@mysipprovider.com/1234
463 ;
464 ; MWI received will be stored in the 1234 mailbox of the SIP_Remote context. It can be used by other phones by following the below:
465 ; mailbox=1234@SIP_Remote
466 ;----------------------------------------- NAT SUPPORT ------------------------
467 ;
468 ; WARNING: SIP operation behind a NAT is tricky and you really need
469 ; to read and understand well the following section.
470 ;
471 ; When Asterisk is behind a NAT device, the "local" address (and port) that
472 ; a socket is bound to has different values when seen from the inside or
473 ; from the outside of the NATted network. Unfortunately this address must
474 ; be communicated to the outside (e.g. in SIP and SDP messages), and in
475 ; order to determine the correct value Asterisk needs to know:
476 ;
477 ; + whether it is talking to someone "inside" or "outside" of the NATted network.
478 ;   This is configured by assigning the "localnet" parameter with a list
479 ;   of network addresses that are considered "inside" of the NATted network.
480 ;   IF LOCALNET IS NOT SET, THE EXTERNAL ADDRESS WILL NOT BE SET CORRECTLY.
481 ;   Multiple entries are allowed, e.g. a reasonable set is the following:
482 ;
483 ;      localnet=192.168.0.0/255.255.0.0 ; RFC 1918 addresses
484 ;      localnet=10.0.0.0/255.0.0.0      ; Also RFC1918
485 ;      localnet=172.16.0.0/12           ; Another RFC1918 with CIDR notation
486 ;      localnet=169.254.0.0/255.255.0.0 ; Zero conf local network
487 ;
488 ; + the "externally visible" address and port number to be used when talking
489 ;   to a host outside the NAT. This information is derived by one of the
490 ;   following (mutually exclusive) config file parameters:
491 ;
492 ;   a. "externip = hostname[:port]" specifies a static address[:port] to
493 ;      be used in SIP and SDP messages.
494 ;      The hostname is looked up only once, when [re]loading sip.conf .
495 ;      If a port number is not present, use the "bindport" value (which is
496 ;      not guaranteed to work correctly, because a NAT box might remap the
497 ;      port number as well as the address).
498 ;      This approach can be useful if you have a NAT device where you can
499 ;      configure the mapping statically. Examples:
500 ;
501 ;        externip = 12.34.56.78          ; use this address.
502 ;        externip = 12.34.56.78:9900     ; use this address and port.
503 ;        externip = mynat.my.org:12600   ; Public address of my nat box.
504 ;
505 ;   b. "externhost = hostname[:port]" is similar to "externip" except
506 ;      that the hostname is looked up every "externrefresh" seconds
507 ;      (default 10s). This can be useful when your NAT device lets you choose
508 ;      the port mapping, but the IP address is dynamic.
509 ;      Beware, you might suffer from service disruption when the name server
510 ;      resolution fails. Examples:
511 ;
512 ;        externhost=foo.dyndns.net       ; refreshed periodically
513 ;        externrefresh=180               ; change the refresh interval
514 ;
515 ;   c. "stunaddr = stun.server[:port]" queries the STUN server specified
516 ;      as an argument to obtain the external address/port.
517 ;      Queries are also sent periodically every "externrefresh" seconds
518 ;      (as a side effect, sending the query also acts as a keepalive for
519 ;      the state entry on the nat box):
520 ;
521 ;        stunaddr = foo.stun.com:3478
522 ;        externrefresh = 15
523 ;
524 ;   Note that at the moment all these mechanism work only for the SIP socket.
525 ;   The IP address discovered with externip/externhost/STUN is reused for
526 ;   media sessions as well, but the port numbers are not remapped so you
527 ;   may still experience problems.
528 ;
529 ; NOTE 1: in some cases, NAT boxes will use different port numbers in
530 ; the internal<->external mapping. In these cases, the "externip" and
531 ; "externhost" might not help you configure addresses properly, and you
532 ; really need to use STUN.
533 ;
534 ; NOTE 2: when using "externip" or "externhost", the address part is
535 ; also used as the external address for media sessions.
536 ; If you use "stunaddr", STUN queries will be sent to the same server
537 ; also from media sockets, and this should permit a correct mapping of
538 ; the port numbers as well.
539 ;
540 ; In addition to the above, Asterisk has an additional "nat" parameter to
541 ; address NAT-related issues in incoming SIP or media sessions.
542 ; In particular, depending on the 'nat= ' settings described below, Asterisk
543 ; may override the address/port information specified in the SIP/SDP messages,
544 ; and use the information (sender address) supplied by the network stack instead.
545 ; However, this is only useful if the external traffic can reach us.
546 ; The following settings are allowed (both globally and in individual sections):
547 ;
548 ;        nat = no                ; default. Use NAT mode only according to RFC3581 (;rport)
549 ;        nat = yes               ; Always ignore info and assume NAT
550 ;        nat = never             ; Never attempt NAT mode or RFC3581 support
551 ;        nat = route             ; route = Assume NAT, don't send rport 
552 ;                                ; (work around more UNIDEN bugs)
553
554 ;----------------------------------- MEDIA HANDLING --------------------------------
555 ; By default, Asterisk tries to re-invite the audio to an optimal path. If there's
556 ; no reason for Asterisk to stay in the media path, the media will be redirected.
557 ; This does not really work with in the case where Asterisk is outside and have
558 ; clients on the inside of a NAT. In that case, you want to set canreinvite=nonat
559 ;
560 ;canreinvite=yes                ; Asterisk by default tries to redirect the
561                                 ; RTP media stream (audio) to go directly from
562                                 ; the caller to the callee.  Some devices do not
563                                 ; support this (especially if one of them is behind a NAT).
564                                 ; The default setting is YES. If you have all clients
565                                 ; behind a NAT, or for some other reason wants Asterisk to
566                                 ; stay in the audio path, you may want to turn this off.
567
568                                 ; This setting also affect direct RTP
569                                 ; at call setup (a new feature in 1.4 - setting up the
570                                 ; call directly between the endpoints instead of sending
571                                 ; a re-INVITE).
572
573 ;directrtpsetup=yes             ; Enable the new experimental direct RTP setup. This sets up
574                                 ; the call directly with media peer-2-peer without re-invites.
575                                 ; Will not work for video and cases where the callee sends 
576                                 ; RTP payloads and fmtp headers in the 200 OK that does not match the
577                                 ; callers INVITE. This will also fail if canreinvite is enabled when
578                                 ; the device is actually behind NAT.
579
580 ;canreinvite=nonat              ; An additional option is to allow media path redirection
581                                 ; (reinvite) but only when the peer where the media is being
582                                 ; sent is known to not be behind a NAT (as the RTP core can
583                                 ; determine it based on the apparent IP address the media
584                                 ; arrives from).
585
586 ;canreinvite=update             ; Yet a third option... use UPDATE for media path redirection,
587                                 ; instead of INVITE. This can be combined with 'nonat', as
588                                 ; 'canreinvite=update,nonat'. It implies 'yes'.
589
590 ;----------------------------------------- REALTIME SUPPORT ------------------------
591 ; For additional information on ARA, the Asterisk Realtime Architecture,
592 ; please read realtime.txt and extconfig.txt in the /doc directory of the
593 ; source code.
594 ;
595 ;rtcachefriends=yes             ; Cache realtime friends by adding them to the internal list
596                                 ; just like friends added from the config file only on a
597                                 ; as-needed basis? (yes|no)
598
599 ;rtsavesysname=yes              ; Save systemname in realtime database at registration
600                                 ; Default= no
601
602 ;rtupdate=yes                   ; Send registry updates to database using realtime? (yes|no)
603                                 ; If set to yes, when a SIP UA registers successfully, the ip address,
604                                 ; the origination port, the registration period, and the username of
605                                 ; the UA will be set to database via realtime. 
606                                 ; If not present, defaults to 'yes'. Note: realtime peers will
607                                 ; probably not function across reloads in the way that you expect, if
608                                 ; you turn this option off.
609 ;rtautoclear=yes                ; Auto-Expire friends created on the fly on the same schedule
610                                 ; as if it had just registered? (yes|no|<seconds>)
611                                 ; If set to yes, when the registration expires, the friend will
612                                 ; vanish from the configuration until requested again. If set
613                                 ; to an integer, friends expire within this number of seconds
614                                 ; instead of the registration interval.
615
616 ;ignoreregexpire=yes            ; Enabling this setting has two functions:
617                                 ;
618                                 ; For non-realtime peers, when their registration expires, the
619                                 ; information will _not_ be removed from memory or the Asterisk database
620                                 ; if you attempt to place a call to the peer, the existing information
621                                 ; will be used in spite of it having expired
622                                 ;
623                                 ; For realtime peers, when the peer is retrieved from realtime storage,
624                                 ; the registration information will be used regardless of whether
625                                 ; it has expired or not; if it expires while the realtime peer 
626                                 ; is still in memory (due to caching or other reasons), the 
627                                 ; information will not be removed from realtime storage
628
629 ;----------------------------------------- SIP DOMAIN SUPPORT ------------------------
630 ; Incoming INVITE and REFER messages can be matched against a list of 'allowed'
631 ; domains, each of which can direct the call to a specific context if desired.
632 ; By default, all domains are accepted and sent to the default context or the
633 ; context associated with the user/peer placing the call.
634 ; REGISTER to non-local domains will be automatically denied if a domain
635 ; list is configured.
636 ;
637 ; Domains can be specified using:
638 ; domain=<domain>[,<context>]
639 ; Examples:
640 ; domain=myasterisk.dom
641 ; domain=customer.com,customer-context
642 ;
643 ; In addition, all the 'default' domains associated with a server should be
644 ; added if incoming request filtering is desired.
645 ; autodomain=yes
646 ;
647 ; To disallow requests for domains not serviced by this server:
648 ; allowexternaldomains=no
649
650 ;domain=mydomain.tld,mydomain-incoming
651                                 ; Add domain and configure incoming context
652                                 ; for external calls to this domain
653 ;domain=1.2.3.4                 ; Add IP address as local domain
654                                 ; You can have several "domain" settings
655 ;allowexternaldomains=no        ; Disable INVITE and REFER to non-local domains
656                                 ; Default is yes
657 ;autodomain=yes                 ; Turn this on to have Asterisk add local host
658                                 ; name and local IP to domain list.
659
660 ; fromdomain=mydomain.tld       ; When making outbound SIP INVITEs to
661                                 ; non-peers, use your primary domain "identity"
662                                 ; for From: headers instead of just your IP
663                                 ; address. This is to be polite and
664                                 ; it may be a mandatory requirement for some
665                                 ; destinations which do not have a prior
666                                 ; account relationship with your server. 
667
668 ;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
669 ; jbenable = yes              ; Enables the use of a jitterbuffer on the receiving side of a
670                               ; SIP channel. Defaults to "no". An enabled jitterbuffer will
671                               ; be used only if the sending side can create and the receiving
672                               ; side can not accept jitter. The SIP channel can accept jitter,
673                               ; thus a jitterbuffer on the receive SIP side will be used only
674                               ; if it is forced and enabled.
675
676 ; jbforce = no                ; Forces the use of a jitterbuffer on the receive side of a SIP
677                               ; channel. Defaults to "no".
678
679 ; jbmaxsize = 200             ; Max length of the jitterbuffer in milliseconds.
680
681 ; jbresyncthreshold = 1000    ; Jump in the frame timestamps over which the jitterbuffer is
682                               ; resynchronized. Useful to improve the quality of the voice, with
683                               ; big jumps in/broken timestamps, usually sent from exotic devices
684                               ; and programs. Defaults to 1000.
685
686 ; jbimpl = fixed              ; Jitterbuffer implementation, used on the receiving side of a SIP
687                               ; channel. Two implementations are currently available - "fixed"
688                               ; (with size always equals to jbmaxsize) and "adaptive" (with
689                               ; variable size, actually the new jb of IAX2). Defaults to fixed.
690
691 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
692 ;-----------------------------------------------------------------------------------
693
694 [authentication]
695 ; Global credentials for outbound calls, i.e. when a proxy challenges your
696 ; Asterisk server for authentication. These credentials override
697 ; any credentials in peer/register definition if realm is matched.
698 ;
699 ; This way, Asterisk can authenticate for outbound calls to other
700 ; realms. We match realm on the proxy challenge and pick an set of 
701 ; credentials from this list
702 ; Syntax:
703 ;        auth = <user>:<secret>@<realm>
704 ;        auth = <user>#<md5secret>@<realm>
705 ; Example:
706 ;auth=mark:topsecret@digium.com
707
708 ; You may also add auth= statements to [peer] definitions 
709 ; Peer auth= override all other authentication settings if we match on realm
710
711 ;------------------------------------------------------------------------------
712 ; DEVICE CONFIGURATION
713
714 ; The SIP channel has two types of devices, the friend and the peer.
715 ; * The type=friend is a device type that accepts both incoming and outbound calls,
716 ;   where Asterisk match on the From: username on incoming calls.
717 ;   (A synonym for friend is "user"). This is a type you use for your local
718 ;   SIP phones.
719 ; * The type=peer also handles both incoming and outbound calls. On inbound calls,
720 ;   Asterisk only matches on IP/port, not on names. This is mostly used for SIP
721 ;   trunks.
722 ;
723 ; For device names, we recommend using only a-z, numerics (0-9) and underscore
724
725 ; For local phones, type=friend works most of the time
726 ;
727 ; If you have one-way audio, you probably have NAT problems. 
728 ; If Asterisk is on a public IP, and the phone is inside of a NAT device
729 ; you will need to configure nat option for those phones.
730 ; Also, turn on qualify=yes to keep the nat session open
731
732 ; Configuration options available 
733 ; --------------------     
734 ; context
735 ; callingpres
736 ; permit
737 ; deny
738 ; secret
739 ; md5secret
740 ; remotesecret
741 ; transport
742 ; dtmfmode
743 ; canreinvite
744 ; nat
745 ; callgroup
746 ; pickupgroup
747 ; language
748 ; allow
749 ; disallow
750 ; insecure
751 ; trustrpid
752 ; progressinband
753 ; promiscredir
754 ; useclientcode
755 ; accountcode
756 ; setvar
757 ; callerid
758 ; amaflags
759 ; callcounter
760 ; busylevel
761 ; allowoverlap
762 ; allowsubscribe
763 ; allowtransfer
764 ; subscribecontext
765 ; template
766 ; videosupport
767 ; maxcallbitrate
768 ; rfc2833compensate
769 ; mailbox
770 ; session-timers
771 ; session-expires
772 ; session-minse
773 ; session-refresher
774 ; t38pt_usertpsource
775 ; regexten
776 ; fromdomain
777 ; fromuser
778 ; host
779 ; port
780 ; qualify
781 ; defaultip
782 ; defaultuser
783 ; rtptimeout
784 ; rtpholdtimeout
785 ; sendrpid
786 ; outboundproxy
787 ; rfc2833compensate
788 ; callbackextension
789 ; registertrying
790 ; timert1
791 ; timerb
792 ; qualifyfreq
793 ; t38pt_usertpsource
794 ; contactpermit         ; Limit what a host may register as (a neat trick
795 ; contactdeny           ; is to register at the same IP as a SIP provider,
796 ;                       ; then call oneself, and get redirected to that
797 ;                       ; same location).
798
799 ;[sip_proxy]
800 ; For incoming calls only. Example: FWD (Free World Dialup)
801 ; We match on IP address of the proxy for incoming calls 
802 ; since we can not match on username (caller id)
803 ;type=peer
804 ;context=from-fwd
805 ;host=fwd.pulver.com
806
807 ;[sip_proxy-out]
808 ;type=peer                        ; we only want to call out, not be called
809 ;remotesecret=guessit             ; Our password to their service
810 ;defaultuser=yourusername         ; Authentication user for outbound proxies
811 ;fromuser=yourusername            ; Many SIP providers require this!
812 ;fromdomain=provider.sip.domain        
813 ;host=box.provider.com
814 ;transport=udp,tcp                ; This sets the transport type to udp for outgoing, and will
815 ;                                 ;   accept both tcp and udp. Default is udp. The first transport
816 ;                                 ;   listed will always be used for outgoing connections.
817 ;usereqphone=yes                  ; This provider requires ";user=phone" on URI
818 ;callcounter=yes                  ; Enable call counter
819 ;busylevel=2                      ; Signal busy at 2 or more calls
820 ;outboundproxy=proxy.provider.domain  ; send outbound signaling to this proxy, not directly to the peer
821 ;port=80                          ; The port number we want to connect to on the remote side
822                                   ; Also used as "defaultport" in combination with "defaultip" settings
823
824 ;--- sample definition for a provider
825 ;[provider1]
826 ;type=peer
827 ;host=sip.provider1.com
828 ;fromuser=4015552299              ; how your provider knows you
829 ;remotesecret=youwillneverguessit ; The password we use to authenticate to them
830 ;secret=gissadetdu                ; The password they use to contact us
831 ;callbackextension=123            ; Register with this server and require calls coming back to this extension
832 ;transport=udp,tcp                ; This sets the transport type to udp for outgoing, and will
833 ;                                 ;   accept both tcp and udp. Default is udp. The first transport
834 ;                                 ;   listed will always be used for outgoing connections.
835
836 ;
837 ; Because you might have a large number of similar sections, it is generally
838 ; convenient to use templates for the common parameters, and add them
839 ; the the various sections. Examples are below, and we can even leave
840 ; the templates uncommented as they will not harm:
841
842 [basic-options](!)                ; a template
843         dtmfmode=rfc2833
844         context=from-office
845         type=friend
846
847 [natted-phone](!,basic-options)   ; another template inheriting basic-options
848         nat=yes
849         canreinvite=no
850         host=dynamic
851
852 [public-phone](!,basic-options)   ; another template inheriting basic-options
853         nat=no
854         canreinvite=yes
855
856 [my-codecs](!)                    ; a template for my preferred codecs
857         disallow=all
858         allow=ilbc
859         allow=g729
860         allow=gsm
861         allow=g723
862         allow=ulaw
863
864 [ulaw-phone](!)                   ; and another one for ulaw-only
865         disallow=all
866         allow=ulaw
867
868 ; and finally instantiate a few phones
869 ;
870 ; [2133](natted-phone,my-codecs)
871 ;        secret = peekaboo
872 ; [2134](natted-phone,ulaw-phone)
873 ;        secret = not_very_secret
874 ; [2136](public-phone,ulaw-phone)
875 ;        secret = not_very_secret_either
876 ; ...
877 ;
878
879 ; Standard configurations not using templates look like this:
880 ;
881 ;[grandstream1]
882 ;type=friend                         
883 ;context=from-sip                ; Where to start in the dialplan when this phone calls
884 ;callerid=John Doe <1234>        ; Full caller ID, to override the phones config
885                                  ; on incoming calls to Asterisk
886 ;host=192.168.0.23               ; we have a static but private IP address
887                                  ; No registration allowed
888 ;nat=no                          ; there is not NAT between phone and Asterisk
889 ;canreinvite=yes                 ; allow RTP voice traffic to bypass Asterisk
890 ;dtmfmode=info                   ; either RFC2833 or INFO for the BudgeTone
891 ;call-limit=1                    ; permit only 1 outgoing call and 1 incoming call at a time
892                                  ; from the phone to asterisk (deprecated)
893                                  ; 1 for the explicit peer, 1 for the explicit user,
894                                  ; remember that a friend equals 1 peer and 1 user in
895                                  ; memory
896                                  ; There is no combined call counter for a "friend"
897                                  ; so there's currently no way in sip.conf to limit
898                                  ; to one inbound or outbound call per phone. Use
899                                  ; the group counters in the dial plan for that.
900                                  ;
901 ;mailbox=1234@default            ; mailbox 1234 in voicemail context "default"
902 ;disallow=all                    ; need to disallow=all before we can use allow=
903 ;allow=ulaw                      ; Note: In user sections the order of codecs
904                                  ; listed with allow= does NOT matter!
905 ;allow=alaw
906 ;allow=g723.1                    ; Asterisk only supports g723.1 pass-thru!
907 ;allow=g729                      ; Pass-thru only unless g729 license obtained
908 ;callingpres=allowed_passed_screen ; Set caller ID presentation
909                                  ; See README.callingpres for more information
910
911 ;[xlite1]
912 ; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)!
913 ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed
914 ;type=friend
915 ;regexten=1234                   ; When they register, create extension 1234
916 ;callerid="Jane Smith" <5678>
917 ;host=dynamic                    ; This device needs to register
918 ;nat=yes                         ; X-Lite is behind a NAT router
919 ;canreinvite=no                  ; Typically set to NO if behind NAT
920 ;disallow=all
921 ;allow=gsm                       ; GSM consumes far less bandwidth than ulaw
922 ;allow=ulaw
923 ;allow=alaw
924 ;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes
925 ;registertrying=yes              ; Send a 100 Trying when the device registers.
926
927 ;[snom]
928 ;type=friend                     ; Friends place calls and receive calls
929 ;context=from-sip                ; Context for incoming calls from this user
930 ;secret=blah
931 ;subscribecontext=localextensions ; Only allow SUBSCRIBE for local extensions
932 ;language=de                     ; Use German prompts for this user 
933 ;host=dynamic                    ; This peer register with us
934 ;dtmfmode=inband                 ; Choices are inband, rfc2833, or info
935 ;defaultip=192.168.0.59          ; IP used until peer registers
936 ;mailbox=1234@context,2345       ; Mailbox(-es) for message waiting indicator
937 ;subscribemwi=yes                ; Only send notifications if this phone 
938                                  ; subscribes for mailbox notification
939 ;vmexten=voicemail               ; dialplan extension to reach mailbox 
940                                  ; sets the Message-Account in the MWI notify message
941                                  ; defaults to global vmexten which defaults to "asterisk"
942 ;disallow=all
943 ;allow=ulaw                      ; dtmfmode=inband only works with ulaw or alaw!
944
945
946 ;[polycom]
947 ;type=friend                     ; Friends place calls and receive calls
948 ;context=from-sip                ; Context for incoming calls from this user
949 ;secret=blahpoly
950 ;host=dynamic                    ; This peer register with us
951 ;dtmfmode=rfc2833                ; Choices are inband, rfc2833, or info
952 ;defaultuser=polly               ; Username to use in INVITE until peer registers
953 ;defaultip=192.168.40.123
954                                  ; Normally you do NOT need to set this parameter
955 ;disallow=all
956 ;allow=ulaw                      ; dtmfmode=inband only works with ulaw or alaw!
957 ;progressinband=no               ; Polycom phones don't work properly with "never"
958
959
960 ;[pingtel]
961 ;type=friend
962 ;secret=blah
963 ;host=dynamic
964 ;insecure=port                   ; Allow matching of peer by IP address without 
965                                  ; matching port number
966 ;insecure=invite                 ; Do not require authentication of incoming INVITEs
967 ;insecure=port,invite            ; (both)
968 ;qualify=1000                    ; Consider it down if it's 1 second to reply
969                                  ; Helps with NAT session
970                                  ; qualify=yes uses default value
971 ;qualifyfreq=60                  ; Qualification: How often to check for the 
972                                  ; host to be up in seconds
973                                  ; Set to low value if you use low timeout for
974                                  ; NAT of UDP sessions
975 ;
976 ; Call group and Pickup group should be in the range from 0 to 63
977 ;
978 ;callgroup=1,3-4                 ; We are in caller groups 1,3,4
979 ;pickupgroup=1,3-5               ; We can do call pick-p for call group 1,3,4,5
980 ;defaultip=192.168.0.60          ; IP address to use if peer has not registered
981 ;deny=0.0.0.0/0.0.0.0            ; ACL: Control access to this account based on IP address
982 ;permit=192.168.0.60/255.255.255.0
983
984 ;[cisco1]
985 ;type=friend
986 ;secret=blah
987 ;qualify=200                     ; Qualify peer is no more than 200ms away
988 ;nat=yes                         ; This phone may be natted
989                                  ; Send SIP and RTP to the IP address that packet is 
990                                  ; received from instead of trusting SIP headers 
991 ;host=dynamic                    ; This device registers with us
992 ;canreinvite=no                  ; Asterisk by default tries to redirect the
993                                  ; RTP media stream (audio) to go directly from
994                                  ; the caller to the callee.  Some devices do not
995                                  ; support this (especially if one of them is 
996                                  ; behind a NAT).
997 ;defaultip=192.168.0.4           ; IP address to use until registration
998 ;defaultuser=goran               ; Username to use when calling this device before registration
999                                  ; Normally you do NOT need to set this parameter
1000 ;setvar=CUSTID=5678              ; Channel variable to be set for all calls from this device
1001 ;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep   ; This channel variable will
1002                                                 ; cause the given audio file to
1003                                                 ; be played upon completion of
1004                                                 ; an attended transfer.
1005
1006 ;[pre14-asterisk]
1007 ;type=friend
1008 ;secret=digium
1009 ;host=dynamic
1010 ;rfc2833compensate=yes          ; Compensate for pre-1.4 DTMF transmission from another Asterisk machine.
1011                                 ; You must have this turned on or DTMF reception will work improperly.
1012 ;t38pt_usertpsource=yes         ; Use the source IP address of RTP as the destination IP address for UDPTL packets
1013                                 ; if the nat option is enabled. If a single RTP packet is received Asterisk will know the
1014                                 ; external IP address of the remote device. If port forwarding is done at the client side
1015                                 ; then UDPTL will flow to the remote device.