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