2
0

internal.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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. <!--max number of receiving requests per second (Default: 1000, 0 - unlimited) -->
  142. <!--<param name="max-recv-requests-per-second" value="0"/> -->
  143. <!--session timers for all call to expire after the specified seconds -->
  144. <!--<param name="session-timeout" value="1800"/>-->
  145. <!-- Can be 'true' or 'contact' -->
  146. <!--<param name="multiple-registrations" value="contact"/>-->
  147. <!--set to 'greedy' if you want your codec list to take precedence -->
  148. <param name="inbound-codec-negotiation" value="generous"/>
  149. <!-- if you want to send any special bind params of your own -->
  150. <!--<param name="bind-params" value="transport=udp"/>-->
  151. <!--<param name="unregister-on-options-fail" value="true"/>-->
  152. <!-- Send an OPTIONS packet to all registered endpoints -->
  153. <!--<param name="all-reg-options-ping" value="true"/>-->
  154. <!-- Send an OPTIONS packet to NATed registered endpoints. Can be 'true' or 'udp-only'. -->
  155. <!--<param name="nat-options-ping" value="true"/>-->
  156. <!--<param name="sip-options-respond-503-on-busy" value="true"/>-->
  157. <!--<param name="sip-messages-respond-200-ok" value="true"/>-->
  158. <!--<param name="sip-subscribe-respond-200-ok" value="true"/>-->
  159. <!-- TLS: disabled by default, set to "true" to enable -->
  160. <param name="tls" value="$${internal_ssl_enable}"/>
  161. <!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
  162. <param name="tls-only" value="false"/>
  163. <!-- additional bind parameters for TLS -->
  164. <param name="tls-bind-params" value="transport=tls"/>
  165. <!-- Port to listen on for TLS requests. (5061 will be used if unspecified) -->
  166. <param name="tls-sip-port" value="$${internal_tls_port}"/>
  167. <!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
  168. <!--<param name="tls-cert-dir" value=""/>-->
  169. <!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
  170. <param name="tls-passphrase" value=""/>
  171. <!-- Verify the date on TLS certificates -->
  172. <param name="tls-verify-date" value="true"/>
  173. <!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
  174. <!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be split with a '|' pipe -->
  175. <param name="tls-verify-policy" value="none"/>
  176. <!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
  177. <param name="tls-verify-depth" value="2"/>
  178. <!-- 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 -->
  179. <param name="tls-verify-in-subjects" value=""/>
  180. <!-- TLS version default: tlsv1,tlsv1.1,tlsv1.2 -->
  181. <param name="tls-version" value="$${sip_tls_version}"/>
  182. <!-- TLS ciphers default: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH -->
  183. <param name="tls-ciphers" value="$${sip_tls_ciphers}"/>
  184. <!--
  185. Connect timeout for outgoing requests using TLS (in milliseconds).
  186. Set the timeout and SIP engine will try again sending an outgoing request
  187. and when possible - using an alternative address (DNS failover).
  188. Default - 0 (disabled)
  189. -->
  190. <!-- <param name="tls-orq-connect-timeout" value="3000" /> -->
  191. <!-- turn on auto-flush during bridge (skip timer sleep when the socket already has data)
  192. (reduces delay on latent connections default true, must be disabled explicitly)-->
  193. <!--<param name="rtp-autoflush-during-bridge" value="false"/>-->
  194. <!--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)-->
  195. <!--<param name="rtp-rewrite-timestamps" value="true"/>-->
  196. <!--<param name="pass-rfc2833" value="true"/>-->
  197. <!--If you have ODBC support and a working dsn you can use it instead of SQLite-->
  198. <!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
  199. <!-- Or, if you have PGSQL support, you can use that -->
  200. <!--<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'" />-->
  201. <!--Uncomment to set all inbound calls to no media mode-->
  202. <!--<param name="inbound-bypass-media" value="true"/>-->
  203. <!--Uncomment to set all inbound calls to proxy media mode-->
  204. <!--<param name="inbound-proxy-media" value="true"/>-->
  205. <!-- Let calls hit the dialplan before selecting codec for the a-leg -->
  206. <param name="inbound-late-negotiation" value="true"/>
  207. <!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
  208. <param name="inbound-zrtp-passthru" value="true"/>
  209. <!-- this lets anything register -->
  210. <!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
  211. <!-- <param name="accept-blind-reg" value="true"/> -->
  212. <!-- accept any authentication without actually checking (not a good feature for most people) -->
  213. <!-- <param name="accept-blind-auth" value="true"/> -->
  214. <!-- suppress CNG on this profile or per call with the 'suppress_cng' variable -->
  215. <!-- <param name="suppress-cng" value="true"/> -->
  216. <!--TTL for nonce in sip auth-->
  217. <param name="nonce-ttl" value="60"/>
  218. <!--Uncomment if you want to force the outbound leg of a bridge to only offer the codec
  219. that the originator is using-->
  220. <!--<param name="disable-transcoding" value="true"/>-->
  221. <!-- Handle 302 Redirect in the dialplan -->
  222. <!--<param name="manual-redirect" value="true"/> -->
  223. <!-- Disable Transfer -->
  224. <!--<param name="disable-transfer" value="true"/> -->
  225. <!-- Disable Register -->
  226. <!--<param name="disable-register" value="true"/> -->
  227. <!-- Used for when phones respond to a challenged ACK with method INVITE in the hash -->
  228. <!--<param name="NDLB-broken-auth-hash" value="true"/>-->
  229. <!-- add a ;received="<ip>:<port>" to the contact when replying to register for nat handling -->
  230. <!--<param name="NDLB-received-in-nat-reg-contact" value="true"/>-->
  231. <param name="auth-calls" value="$${internal_auth_calls}"/>
  232. <!-- Force subscription requests to require authentication -->
  233. <param name="auth-subscriptions" value="true"/>
  234. <!-- Force the user and auth-user to match. -->
  235. <param name="inbound-reg-force-matching-username" value="true"/>
  236. <!-- on authed calls, authenticate *all* the packets not just invite -->
  237. <param name="auth-all-packets" value="false"/>
  238. <!-- external_sip_ip
  239. Used as the public IP address for SDP.
  240. Can be an one of:
  241. ip address - "12.34.56.78"
  242. a stun server lookup - "stun:stun.server.com"
  243. a DNS name - "host:host.server.com"
  244. auto - Use guessed ip.
  245. auto-nat - Use ip learned from NAT-PMP or UPNP
  246. -->
  247. <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
  248. <param name="ext-sip-ip" value="$${external_sip_ip}"/>
  249. <!-- rtp inactivity timeout -->
  250. <param name="rtp-timeout-sec" value="300"/>
  251. <param name="rtp-hold-timeout-sec" value="1800"/>
  252. <!-- VAD choose one (out is a good choice); -->
  253. <!-- <param name="vad" value="in"/> -->
  254. <!-- <param name="vad" value="out"/> -->
  255. <!-- <param name="vad" value="both"/> -->
  256. <!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
  257. <!--
  258. These are enabled to make the default config work better out of the box.
  259. If you need more than ONE domain you'll need to not use these options.
  260. -->
  261. <!--all inbound reg will look in this domain for the users -->
  262. <param name="force-register-domain" value="$${domain}"/>
  263. <!--force the domain in subscriptions to this value -->
  264. <param name="force-subscription-domain" value="$${domain}"/>
  265. <!--all inbound reg will stored in the db using this domain -->
  266. <param name="force-register-db-domain" value="$${domain}"/>
  267. <!-- for sip over websocket support -->
  268. <param name="ws-binding" value=":5066"/>
  269. <!-- for sip over secure websocket support -->
  270. <!-- You need wss.pem in $${certs_dir} for wss or one will be created for you -->
  271. <param name="wss-binding" value=":7443"/>
  272. <!--<param name="delete-subs-on-register" value="false"/>-->
  273. <!-- launch a new thread to process each new inbound register when using heavier backends -->
  274. <!-- <param name="inbound-reg-in-new-thread" value="true"/> -->
  275. <!-- 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-->
  276. <!--<param name="rtcp-audio-interval-msec" value="5000"/>-->
  277. <!--<param name="rtcp-video-interval-msec" value="5000"/>-->
  278. <!--force suscription expires to a lower value than requested-->
  279. <!--<param name="force-subscription-expires" value="60"/>-->
  280. <!-- add a random deviation to the expires value of the 202 Accepted -->
  281. <!--<param name="sip-subscription-max-deviation" value="120"/>-->
  282. <!-- disable register and transfer which may be undesirable in a public switch -->
  283. <!--<param name="disable-transfer" value="true"/>-->
  284. <!--<param name="disable-register" value="true"/>-->
  285. <!--
  286. enable-3pcc can be set to either 'true' or 'proxy', true accepts the call
  287. right away, proxy waits until the call has been answered then sends accepts
  288. -->
  289. <!--<param name="enable-3pcc" value="true"/>-->
  290. <!-- use at your own risk or if you know what this does.-->
  291. <!--<param name="NDLB-force-rport" value="true"/>-->
  292. <!--
  293. Choose the realm challenge key. Default is auto_to if not set.
  294. auto_from - uses the from field as the value for the sip realm.
  295. auto_to - uses the to field as the value for the sip realm.
  296. <anyvalue> - you can input any value to use for the sip realm.
  297. If you want URL dialing to work you'll want to set this to auto_from.
  298. If you use any other value besides auto_to or auto_from you'll
  299. loose the ability to do multiple domains.
  300. Note: comment out to restore the behavior before 2008-09-29
  301. -->
  302. <param name="challenge-realm" value="auto_from"/>
  303. <!--<param name="disable-rtp-auto-adjust" value="true"/>-->
  304. <!-- on inbound calls make the uuid of the session equal to the sip call id of that call -->
  305. <!--<param name="inbound-use-callid-as-uuid" value="true"/>-->
  306. <!-- on outbound calls set the callid to match the uuid of the session -->
  307. <!--<param name="outbound-use-uuid-as-callid" value="true"/>-->
  308. <!-- set to false disable this feature -->
  309. <!--<param name="rtp-autofix-timing" value="false"/>-->
  310. <!-- set this param to false if your gateway for some reason hates X- headers that it is supposed to ignore-->
  311. <!--<param name="pass-callee-id" value="false"/>-->
  312. <!-- clear clears them all or supply the name to add or the name
  313. prefixed with ~ to remove valid values:
  314. clear
  315. CISCO_SKIP_MARK_BIT_2833
  316. SONUS_SEND_INVALID_TIMESTAMP_2833
  317. -->
  318. <!--<param name="auto-rtp-bugs" data="clear"/>-->
  319. <!-- the following can be used as workaround with bogus SRV/NAPTR records -->
  320. <!--<param name="disable-srv" value="false" />-->
  321. <!--<param name="disable-naptr" value="false" />-->
  322. <!-- The following can be used to fine-tune timers within sofia's transport layer
  323. Those settings are for advanced users and can safely be left as-is -->
  324. <!-- Initial retransmission interval (in milliseconds).
  325. Set the T1 retransmission interval used by the SIP transaction engine.
  326. The T1 is the initial duration used by request retransmission timers A and E (UDP) as well as response retransmission timer G. -->
  327. <!-- <param name="timer-T1" value="500" /> -->
  328. <!-- Transaction timeout (defaults to T1 * 64).
  329. Set the T1x64 timeout value used by the SIP transaction engine.
  330. The T1x64 is duration used for timers B, F, H, and J (UDP) by the SIP transaction engine.
  331. The timeout value T1x64 can be adjusted separately from the initial retransmission interval T1. -->
  332. <!-- <param name="timer-T1X64" value="32000" /> -->
  333. <!-- Maximum retransmission interval (in milliseconds).
  334. Set the maximum retransmission interval used by the SIP transaction engine.
  335. The T2 is the maximum duration used for the timers E (UDP) and G by the SIP transaction engine.
  336. Note that the timer A is not capped by T2. Retransmission interval of INVITE requests grows exponentially
  337. until the timer B fires. -->
  338. <!-- <param name="timer-T2" value="4000" /> -->
  339. <!--
  340. Transaction lifetime (in milliseconds).
  341. Set the lifetime for completed transactions used by the SIP transaction engine.
  342. A completed transaction is kept around for the duration of T4 in order to catch late responses.
  343. The T4 is the maximum duration for the messages to stay in the network and the duration of SIP timer K. -->
  344. <!-- <param name="timer-T4" value="4000" /> -->
  345. <!-- Turn on a jitterbuffer for every call -->
  346. <!-- <param name="auto-jitterbuffer-msec" value="60"/> -->
  347. <!-- By default mod_sofia will ignore the codecs in the sdp for hold/unhold operations
  348. Set this to true if you want to actually parse the sdp and re-negotiate the codec during hold/unhold.
  349. It's probably not what you want so stick with the default unless you really need to change this.
  350. -->
  351. <!--<param name="renegotiate-codec-on-hold" value="true"/>-->
  352. <!-- By default mod_sofia will send "100 Trying" in response to a SIP INVITE. Set this to false if
  353. you want to turn off this behavior and manually send the "100 Trying" via the acknowledge_call application.
  354. -->
  355. <!--<param name="auto-invite-100" value="false"/>-->
  356. </settings>
  357. </profile>