blob: 9fc525c70e6af4ede4302979076a223c519c3bc1 [file] [log] [blame]
Oliver Smith667f19b2019-11-08 18:16:30 +01001<profile name="internal">
2 <!--
3 This is a sofia sip profile/user agent. This will service exactly one ip and port.
4 In FreeSWITCH you can run multiple sip user agents on their own ip and port.
5
6 When you hear someone say "sofia profile" this is what they are talking about.
7 -->
8
9 <!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
10 <!--aliases are other names that will work as a valid profile name for this profile-->
11 <aliases>
12 <!--
13 <alias name="default"/>
14 -->
15 </aliases>
16 <!-- Outbound Registrations -->
17
18 <domains>
19 <!-- indicator to parse the directory for domains with parse="true" to get gateways-->
20 <!--<domain name="$${domain}" parse="true"/>-->
21 <!-- indicator to parse the directory for domains with parse="true" to get gateways and alias every domain to this profile -->
22 <!--<domain name="all" alias="true" parse="true"/>-->
23 <domain name="all" alias="true" parse="false"/>
24 </domains>
25
26 <settings>
27
28
29 <!-- inject delay between dtmf digits on send to help some slow interpreters (also per channel with rtp_digit_delay var -->
30 <!-- <param name="rtp-digit-delay" value="40"/>-->
31
32 <!--
33 When calls are in no media this will bring them back to media
34 when you press the hold button.
35 -->
36 <!--<param name="media-option" value="resume-media-on-hold"/> -->
37 <!--
38 This will allow a call after an attended transfer go back to
39 bypass media after an attended transfer.
40 -->
41 <!--<param name="media-option" value="bypass-media-after-att-xfer"/>-->
42 <!-- <param name="user-agent-string" value="FreeSWITCH Rocks!"/> -->
43 <param name="debug" value="0"/>
44 <!-- If you want FreeSWITCH to shutdown if this profile fails to load, uncomment the next line. -->
45 <!-- <param name="shutdown-on-fail" value="true"/> -->
46 <param name="sip-trace" value="no"/>
47 <param name="sip-capture" value="no"/>
48
49 <!-- Use presence_map.conf.xml to convert extension regex to presence protos for routing -->
50 <!-- <param name="presence-proto-lookup" value="true"/> -->
51
52
53 <!-- Don't be picky about negotiated DTMF just always offer 2833 and accept both 2833 and INFO -->
54 <param name="liberal-dtmf" value="true"/>
55
56
57 <!--
58 Sometimes, in extremely rare edge cases, the Sofia SIP stack may stop
59 responding. These options allow you to enable and control a watchdog
60 on the Sofia SIP stack so that if it stops responding for the
61 specified number of milliseconds, it will cause FreeSWITCH to crash
62 immediately. This is useful if you run in an HA environment and
63 need to ensure automated recovery from such a condition. Note that if
64 your server is idle a lot, the watchdog may fire due to not receiving
65 any SIP messages. Thus, if you expect your system to be idle, you
66 should leave the watchdog disabled. It can be toggled on and off
67 through the FreeSWITCH CLI either on an individual profile basis or
68 globally for all profiles. So, if you run in an HA environment with a
69 master and slave, you should use the CLI to make sure the watchdog is
70 only enabled on the master.
71 If such crash occurs, FreeSWITCH will dump core if allowed. The
72 stacktrace will include function watchdog_triggered_abort().
73 -->
74 <param name="watchdog-enabled" value="no"/>
75 <param name="watchdog-step-timeout" value="30000"/>
76 <param name="watchdog-event-timeout" value="30000"/>
77
78 <param name="log-auth-failures" value="false"/>
79 <param name="forward-unsolicited-mwi-notify" value="false"/>
80
81 <param name="context" value="public"/>
82 <param name="rfc2833-pt" value="101"/>
83 <!-- port to bind to for sip traffic -->
Neels Hofmeyr96a12a12019-12-04 03:43:12 +010084 <param name="sip-port" value="${PBX_SIP_PORT}"/>
Oliver Smith667f19b2019-11-08 18:16:30 +010085 <param name="dialplan" value="XML"/>
86 <param name="dtmf-duration" value="2000"/>
87 <param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
88 <param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>
89 <param name="rtp-timer-name" value="soft"/>
90 <!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
91 <param name="rtp-ip" value="$${local_ip_v4}"/>
92 <!-- ip address to bind to, DO NOT USE HOSTNAMES ONLY IP ADDRESSES -->
Neels Hofmeyr96a12a12019-12-04 03:43:12 +010093 <param name="sip-ip" value="${PBX_SIP}"/>
Oliver Smith667f19b2019-11-08 18:16:30 +010094 <!--<param name="hold-music" value="$${hold_music}"/>-->
95 <param name="apply-nat-acl" value="nat.auto"/>
96
97
98 <!-- (default true) set to false if you do not wish to have called party info in 1XX responses -->
99 <!-- <param name="cid-in-1xx" value="false"/> -->
100
101 <!-- extended info parsing -->
102 <!-- <param name="extended-info-parsing" value="true"/> -->
103
104 <param name="aggressive-nat-detection" value="false"/>
105 <!--
106 There are known issues (asserts and segfaults) when 100rel is enabled.
107 It is not recommended to enable 100rel at this time.
108 -->
109 <!--<param name="enable-100rel" value="true"/>-->
110
111 <!-- uncomment if you don't wish to try a next SRV destination on 503 response -->
112 <!-- RFC3263 Section 4.3 -->
113 <!--<param name="disable-srv503" value="true"/>-->
114
115 <!-- Enable Compact SIP headers. -->
116 <!--<param name="enable-compact-headers" value="true"/>-->
117 <!--
118 enable/disable session timers
119 -->
120 <!--<param name="enable-timer" value="false"/>-->
121 <!--<param name="minimum-session-expires" value="120"/>-->
122 <param name="apply-inbound-acl" value="domains"/>
123 <!--
124 This defines your local network, by default we detect your local network
125 and create this localnet.auto ACL for this.
126 -->
127 <param name="local-network-acl" value="localnet.auto"/>
128 <param name="apply-register-acl" value="domains"/>
129 <param name="apply-candidate-acl" value="domains"/>
130 <!--<param name="dtmf-type" value="info"/>-->
131
132
133 <!-- 'true' means every time 'first-only' means on the first register -->
134 <!--<param name="send-message-query-on-register" value="true"/>-->
135
136 <!-- 'true' means every time 'first-only' means on the first register -->
137 <!--<param name="send-presence-on-register" value="first-only"/> -->
138
139
140 <!-- Caller-ID type (choose one, can be overridden by inbound call type and/or sip_cid_type channel variable -->
141 <!-- Remote-Party-ID header -->
142 <!--<param name="caller-id-type" value="rpid"/>-->
143
144 <!-- P-*-Identity family of headers -->
145 <!--<param name="caller-id-type" value="pid"/>-->
146
147 <!-- neither one -->
148 <!--<param name="caller-id-type" value="none"/>-->
149
150
151
152 <param name="record-path" value="$${recordings_dir}"/>
153 <param name="record-template" value="${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
154 <!--enable to use presence -->
155 <param name="manage-presence" value="false"/>
156 <!-- send a presence probe on each register to query devices to send presence instead of sending presence with less info -->
157 <!--<param name="presence-probe-on-register" value="true"/>-->
158 <!--<param name="manage-shared-appearance" value="true"/>-->
159 <!-- used to share presence info across sofia profiles -->
160 <!-- Name of the db to use for this profile -->
161 <!--<param name="dbname" value="share_presence"/>-->
162 <param name="presence-hosts" value="$${domain},$${local_ip_v4}"/>
163 <param name="presence-privacy" value="$${presence_privacy}"/>
164 <!-- ************************************************* -->
165
166 <!-- This setting is for AAL2 bitpacking on G726 -->
167 <!-- <param name="bitpacking" value="aal2"/> -->
168 <!--max number of open dialogs in proceeding -->
169 <!--<param name="max-proceeding" value="1000"/>-->
170 <!--session timers for all call to expire after the specified seconds -->
171 <!--<param name="session-timeout" value="1800"/>-->
172 <!-- Can be 'true' or 'contact' -->
173 <!--<param name="multiple-registrations" value="contact"/>-->
174 <!--set to 'greedy' if you want your codec list to take precedence -->
175 <param name="inbound-codec-negotiation" value="generous"/>
176 <!-- if you want to send any special bind params of your own -->
177 <!--<param name="bind-params" value="transport=udp"/>-->
178 <!--<param name="unregister-on-options-fail" value="true"/>-->
179 <!-- Send an OPTIONS packet to all registered endpoints -->
180 <!--<param name="all-reg-options-ping" value="true"/>-->
181 <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only'. -->
182 <!--<param name="nat-options-ping" value="true"/>-->
183
184 <!-- TLS: disabled by default, set to "true" to enable -->
185 <param name="tls" value="$${internal_ssl_enable}"/>
186 <!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
187 <param name="tls-only" value="false"/>
188 <!-- additional bind parameters for TLS -->
189 <param name="tls-bind-params" value="transport=tls"/>
190 <!-- Port to listen on for TLS requests. (5061 will be used if unspecified) -->
191 <param name="tls-sip-port" value="$${internal_tls_port}"/>
192 <!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
193 <!--<param name="tls-cert-dir" value=""/>-->
194 <!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
195 <param name="tls-passphrase" value=""/>
196 <!-- Verify the date on TLS certificates -->
197 <param name="tls-verify-date" value="true"/>
198 <!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
199 <!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
200 <param name="tls-verify-policy" value="none"/>
201 <!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
202 <param name="tls-verify-depth" value="2"/>
203 <!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
204 <param name="tls-verify-in-subjects" value=""/>
205 <!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
206 <param name="tls-version" value="$${sip_tls_version}"/>
207
208 <!-- turn on auto-flush during bridge (skip timer sleep when the socket already has data)
209 (reduces delay on latent connections default true, must be disabled explicitly)-->
210 <!--<param name="rtp-autoflush-during-bridge" value="false"/>-->
211
212 <!--If you don't want to pass through timestamps from 1 RTP call to another (on a per call basis with rtp_rewrite_timestamps chanvar)-->
213 <!--<param name="rtp-rewrite-timestamps" value="true"/>-->
214 <!--<param name="pass-rfc2833" value="true"/>-->
215 <!--If you have ODBC support and a working dsn you can use it instead of SQLite-->
216 <!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
217
218 <!-- Or, if you have PGSQL support, you can use that -->
219 <!--<param name="odbc-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE' application_name='freeswitch'" />-->
220
221 <!--Uncomment to set all inbound calls to no media mode-->
222 <!--<param name="inbound-bypass-media" value="true"/>-->
223
224 <!--Uncomment to set all inbound calls to proxy media mode-->
225 <!--<param name="inbound-proxy-media" value="true"/>-->
226
227 <!-- Let calls hit the dialplan before selecting codec for the a-leg -->
228 <param name="inbound-late-negotiation" value="false"/>
229
230 <!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
231 <param name="inbound-zrtp-passthru" value="true"/>
232
233 <!-- this lets anything register -->
234 <!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
235 <!-- <param name="accept-blind-reg" value="true"/> -->
236
237 <!-- accept any authentication without actually checking (not a good feature for most people) -->
238 <!-- <param name="accept-blind-auth" value="true"/> -->
239
240 <!-- suppress CNG on this profile or per call with the 'suppress_cng' variable -->
241 <!-- <param name="suppress-cng" value="true"/> -->
242
243 <!--TTL for nonce in sip auth-->
244 <param name="nonce-ttl" value="60"/>
245 <!--Uncomment if you want to force the outbound leg of a bridge to only offer the codec
246 that the originator is using-->
247 <!--<param name="disable-transcoding" value="true"/>-->
248 <!-- Handle 302 Redirect in the dialplan -->
249 <!--<param name="manual-redirect" value="true"/> -->
250 <!-- Disable Transfer -->
251 <!--<param name="disable-transfer" value="true"/> -->
252 <!-- Disable Register -->
253 <!--<param name="disable-register" value="true"/> -->
254 <!-- Used for when phones respond to a challenged ACK with method INVITE in the hash -->
255 <!--<param name="NDLB-broken-auth-hash" value="true"/>-->
256 <!-- add a ;received="<ip>:<port>" to the contact when replying to register for nat handling -->
257 <!--<param name="NDLB-received-in-nat-reg-contact" value="true"/>-->
258 <param name="auth-calls" value="$${internal_auth_calls}"/>
259 <!-- Force the user and auth-user to match. -->
260 <param name="inbound-reg-force-matching-username" value="true"/>
261 <!-- on authed calls, authenticate *all* the packets not just invite -->
262 <param name="auth-all-packets" value="false"/>
263
264 <!-- external_sip_ip
265 Used as the public IP address for SDP.
266 Can be an one of:
267 ip address - "12.34.56.78"
268 a stun server lookup - "stun:stun.server.com"
269 a DNS name - "host:host.server.com"
270 auto - Use guessed ip.
271 auto-nat - Use ip learned from NAT-PMP or UPNP
272 -->
273 <param name="ext-rtp-ip" value="$${local_ip_v4}"/>
274 <param name="ext-sip-ip" value="$${local_ip_v4}"/>
275
276 <!-- rtp inactivity timeout -->
277 <param name="rtp-timeout-sec" value="300"/>
278 <param name="rtp-hold-timeout-sec" value="1800"/>
279 <!-- VAD choose one (out is a good choice); -->
280 <!-- <param name="vad" value="in"/> -->
281 <!-- <param name="vad" value="out"/> -->
282 <!-- <param name="vad" value="both"/> -->
283 <!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
284 <!--
285 These are enabled to make the default config work better out of the box.
286 If you need more than ONE domain you'll need to not use these options.
287
288 -->
289 <!--all inbound reg will look in this domain for the users -->
290 <param name="force-register-domain" value="$${domain}"/>
291 <!--force the domain in subscriptions to this value -->
292 <param name="force-subscription-domain" value="$${domain}"/>
293 <!--all inbound reg will stored in the db using this domain -->
294 <param name="force-register-db-domain" value="$${domain}"/>
295
296
297 <!-- uncomment for sip over websocket support -->
298 <!--<param name="ws-binding" value=":5066"/>-->
299
300 <!-- uncomment for sip over secure websocket support -->
301 <!-- You need wss.pem in /usr/local/freeswitch/certs for wss -->
302 <!--<param name="wss-binding" value=":7443"/>-->
303
304
305 <!--<param name="delete-subs-on-register" value="false"/>-->
306
307 <!-- launch a new thread to process each new inbound register when using heavier backends -->
308 <!-- <param name="inbound-reg-in-new-thread" value="true"/> -->
309
310 <!-- enable rtcp on every channel also can be done per leg basis with rtcp_audio_interval_msec variable set to passthru to pass it across a call-->
311 <!--<param name="rtcp-audio-interval-msec" value="5000"/>-->
312 <!--<param name="rtcp-video-interval-msec" value="5000"/>-->
313
314 <!--force suscription expires to a lower value than requested-->
315 <!--<param name="force-subscription-expires" value="60"/>-->
316
317 <!-- add a random deviation to the expires value of the 202 Accepted -->
318 <!--<param name="sip-subscription-max-deviation" value="120"/>-->
319
320 <!-- disable register and transfer which may be undesirable in a public switch -->
321 <!--<param name="disable-transfer" value="true"/>-->
322 <!--<param name="disable-register" value="true"/>-->
323
324 <!--
325 enable-3pcc can be set to either 'true' or 'proxy', true accepts the call
326 right away, proxy waits until the call has been answered then sends accepts
327 -->
328 <!--<param name="enable-3pcc" value="true"/>-->
329
330 <!-- use at your own risk or if you know what this does.-->
331 <!--<param name="NDLB-force-rport" value="true"/>-->
332 <!--
333 Choose the realm challenge key. Default is auto_to if not set.
334
335 auto_from - uses the from field as the value for the sip realm.
336 auto_to - uses the to field as the value for the sip realm.
337 <anyvalue> - you can input any value to use for the sip realm.
338
339 If you want URL dialing to work you'll want to set this to auto_from.
340
341 If you use any other value besides auto_to or auto_from you'll
342 loose the ability to do multiple domains.
343
344 Note: comment out to restore the behavior before 2008-09-29
345 -->
346 <param name="challenge-realm" value="auto_from"/>
347 <!--<param name="disable-rtp-auto-adjust" value="true"/>-->
348 <!-- on inbound calls make the uuid of the session equal to the sip call id of that call -->
349 <!--<param name="inbound-use-callid-as-uuid" value="true"/>-->
350 <!-- on outbound calls set the callid to match the uuid of the session -->
351 <!--<param name="outbound-use-uuid-as-callid" value="true"/>-->
352 <!-- set to false disable this feature -->
353 <!--<param name="rtp-autofix-timing" value="false"/>-->
354
355 <!-- set this param to false if your gateway for some reason hates X- headers that it is supposed to ignore-->
356 <!--<param name="pass-callee-id" value="false"/>-->
357
358 <!-- clear clears them all or supply the name to add or the name
359 prefixed with ~ to remove valid values:
360
361 clear
362 CISCO_SKIP_MARK_BIT_2833
363 SONUS_SEND_INVALID_TIMESTAMP_2833
364
365 -->
366 <!--<param name="auto-rtp-bugs" data="clear"/>-->
367
368 <!-- the following can be used as workaround with bogus SRV/NAPTR records -->
369 <!--<param name="disable-srv" value="false" />-->
370 <!--<param name="disable-naptr" value="false" />-->
371
372 <!-- The following can be used to fine-tune timers within sofia's transport layer
373 Those settings are for advanced users and can safely be left as-is -->
374
375 <!-- Initial retransmission interval (in milliseconds).
376 Set the T1 retransmission interval used by the SIP transaction engine.
377 The T1 is the initial duration used by request retransmission timers A and E (UDP) as well as response retransmission timer G. -->
378 <!-- <param name="timer-T1" value="500" /> -->
379
380 <!-- Transaction timeout (defaults to T1 * 64).
381 Set the T1x64 timeout value used by the SIP transaction engine.
382 The T1x64 is duration used for timers B, F, H, and J (UDP) by the SIP transaction engine.
383 The timeout value T1x64 can be adjusted separately from the initial retransmission interval T1. -->
384 <!-- <param name="timer-T1X64" value="32000" /> -->
385
386
387 <!-- Maximum retransmission interval (in milliseconds).
388 Set the maximum retransmission interval used by the SIP transaction engine.
389 The T2 is the maximum duration used for the timers E (UDP) and G by the SIP transaction engine.
390 Note that the timer A is not capped by T2. Retransmission interval of INVITE requests grows exponentially
391 until the timer B fires. -->
392 <!-- <param name="timer-T2" value="4000" /> -->
393
394 <!--
395 Transaction lifetime (in milliseconds).
396 Set the lifetime for completed transactions used by the SIP transaction engine.
397 A completed transaction is kept around for the duration of T4 in order to catch late responses.
398 The T4 is the maximum duration for the messages to stay in the network and the duration of SIP timer K. -->
399 <!-- <param name="timer-T4" value="4000" /> -->
400
401 <!-- Turn on a jitterbuffer for every call -->
402 <!-- <param name="auto-jitterbuffer-msec" value="60"/> -->
403
404
405 <!-- By default mod_sofia will ignore the codecs in the sdp for hold/unhold operations
406 Set this to true if you want to actually parse the sdp and re-negotiate the codec during hold/unhold.
407 It's probably not what you want so stick with the default unless you really need to change this.
408 -->
409 <!--<param name="renegotiate-codec-on-hold" value="true"/>-->
410
411 </settings>
412</profile>