internal.xml 21 KB

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