Sofia.conf.xml
From FreeSWITCH Wiki
What Sofia Does
Sofia is a FreeSWITCH module (i.e., mod_sofia) that provides SIP connectivity to and from FreeSWITCH in the form of a User Agent.
A "User Agent" ("UA") is an application used for handling a certain network protocol, and a Sofia UA is the same thing but the network protocol in Sofia's case is SIP. Sofia is the general name of any User Agent in FreeSWITCH using the SIP network protocol.
For example, Sofia receives calls sent to FreeSWITCH from other SIP User Agents (UAs), sends calls to other UAs, acts as a client to register FreeSWITCH with other UAs, lets clients register with FreeSWITCH, and connects calls (i.e., to local extensions).
To add a SIP Provider (Sofia User Agent) to your FreeSWITCH, please see SIP Provider Examples and, as directed therein, add the SIP Provider information in a *.xml file stored under conf/sip_profiles/ .
Sofia allows for multiple User Agents
A "User Agent" ("UA") is an application used for running a certain network protocol, and a Sofia UA is the same thing but the protocol in that case is SIP.
When FreeSWITCH starts, it reads the conf/autoload_configs/sofia.conf.xml file. That file contains a "X-PRE-PROCESS" directive which instructs FreeSWITCH to subsequently load and merge any conf/sip_profiles/*.xml files. Each *.xml file so loaded and merged should contain a complete description of one or more SIP Profiles. Each SIP Profile so loaded is part of a "User Agent" or "UA"; in FreeSWITCH terms, UA = User Agent = Sofia Profile = SIP Profile.
Note that the individual UAs so loaded are all merged together by FreeSWITCH and must not interfere with each other: In particular, each UA must have its own unique port on which it accepts connections (the default port for SIP is 5060).
Multiple User Agents (Profiles) and the Dialplan
Why might you want to create multiple User Agents? Here's an example.
In my office, I use a firewall. This means that calls I make to locations outside the firewall must use a STUN server to transverse the NAT in the firewall, while calls within the office don't need to use a STUN server. In order to accommodate these requirements, I've created two different UAs. One of them uses a STUN server and for that matter also connects up to the PSTN through a service provider. The other UA is purely for local SIP calls.
Now I've got two UAs defined by my profiles, each of which can handle a call. When dialing a SIP address or telephone number, which UA is used? That determination is made in the dialplan. One syntax for making a call via Sofia in the dialplan is
sofia/profile_name/destination
So, the task becomes rather straightforward. Dialplans use pattern matching and other tricks to determine how to handle a call. My dialplan examines what I've dialed and then determines what profile to use with that call. If I dial a telephone number, the dialplan selects the UA that connects up to the PSTN. If I dial a SIP address outside the firewall, the dialplan selects that same UA because it uses the STUN server. But if I dial a SIP address that's inside the firewall, the dialplan selects the "local" UA.
To understand how to write dialplans, use pattern matching, etc., see Dialplan
Structure of a Profile
Each profile may contain several different subsections. At the present time there's no XSD or DTD for sofia.conf.xml — and any volunteer who can create one would be very welcome indeed.
Gateway
Each profile can have several gateways:
<gateways> <gateway> elements... </gateway> </gateways>
A gateway has an attribute "name" by which it can be referred. A gateway describes how to use a different UA to reach destinations. For example, the gateway may provide access to the PSTN, or to a private SIP network. The reason for defining a gateway, presumably, is because the gateway requires certain information before it will accept a call from the FS User Agent.
To reach a particular gateway from the dial plan, use
sofia/gateway/<gateway_name>/<dialstring>
The following is a list of param elements that are children of a gateway element:
<!-- /// account username *required* /// --> <param name="username" value="foo"/>
<!--/// auth realm: *optional* same as gateway name, if blank ///--> <!-- realm --> <param name="realm" value="sip.example.com"/>
<!--/// account password *required* ///--> <param name="password" value="a password"/>
<!--/// username to use in from: *optional* same as username, if blank ///--> <param name="from-user" value="fooman"/>
<!--/// replace the INVITE from user with the channel's caller-id ///--> <!--/// this is false by default because outbound calls generally need username in the INVITE ///--> <param name="caller-id-in-from" value="false"/>
<!--/// extension for inbound calls: *optional* Same as username, if blank. To use what's in ${sip_to_user}, set it to the value "auto_to_user" ///-->
<param name="extension" value=""/>
<!--/// proxy host: *optional* same as realm, if blank ///--> <param name="proxy" value="proxy.example.com"/>
<!--/// expire in seconds: *optional* 3600, if blank ///--> <param name="expire-seconds" value="3600"/>
<!-- suppress CNG on this profile or per call with the 'suppress_cng' variable --> <param name="suppress-cng" value="true"/>
<!--/// false: do not register. true: register (default) ///--> <param name="register" value="false"/>
<!-- check gateway availability: *optional* --> <param name="ping" value="15"/>
<!-- *optional* --> <param name="ping-max" value="10"/>
<!-- *optional* --> <param name="ping-min" value="1"/>
<!-- *optional* --> <param name="extension-in-contact" value="1XXX"/>
<!-- *optional* --> <param name="cid-type" value="rpid"/>
Param "register," is used when this profile acts as a client to another UA. By registering, FS informs the other UA of its whereabouts. This is generally used when FS wants the other UA to send FS calls, and the other UA expects this sort of registration. If FS uses the other UA only as a gateway (e.g., to the PSTN), then registration is not generally required.
The latter param, "ping" is used to check gateway availability. By setting this option, FS will send SIP OPTIONS packets to gateway. If gateway responds with 200 or 404, gateway is pronounced up, otherwise down. [N.B. It appears that other error messages can be returned and still result in the gateway being marked as 'up'?] If any call is routed to gateway with state down, FS will generate NETWORK_OUT_OF_ORDER hangup cause. Ping frequency is defined in seconds (value attribute).
Param "extension-in-contact" is used to force what the contact info will be in the registration. If you are having a problem with your gateways registering at gw+username@ip you can use this to get rid of the gw+ if your itps is having a problem routing calls to your server. Replace 1XXX with your username that the ITPS is expecting.
Settings
Settings include other, more general information about the profile, including whether or not STUN is in use. Each profile has its own settings element. Not only is this convenient — it's possible to set up one profile to use STUN and another, with a different gateway or working behind the firewall, not needing STUN — but it's also crucial. That's because each profile defines a SIP User Agent, and each UA must have its own unique "sip-port." By convention, 5060 is the default port, but it's possible to make calls to, e.g., "foo@sip.example.com:5070", and therefore you can define any port you please for each individual profile.
The conf directory contains a complete sample sofia.conf.xml file, along with comments. See SVN examples: Internal, External
Dialplan [dialplan]
The dialplan parameter is very powerful.
In the simplest configuration, it will use the XML dialplan. This means that it will read data from mod_xml_curl XML dialplans (eg, callback to your webserver), or failing that, from the XML files specified in freeswitch.xml dialplan section. (eg, default_context.xml)
<param name="dialplan" value="XML"/>
You can also add enum lookups into the picture (since mod_enum provides dialplan functionality), so enum lookups override the XML dialplan
<param name="dialplan" value="enum,XML"/>
Or reverse the order to enum is only consulted if XML lookup fails
<param name="dialplan" value="XML,enum"/>
It is also possible to specify a specific enum root
<param name="dialplan" value="enum:foo.com,XML"/>
Or use XML on a custom file
<param name="dialplan" value="XML:/tmp/foo.xml,XML,enum"/>
Where it will first check the specific XML file, then hit normal XML which also do a mod_xml_curl lookup assuming you have that configured and working.
media-option
- resume-media-on-hold
When calls are in no media this will bring them back to media when you press the hold button.
<param name="media-option" value="resume-media-on-hold"/>
- bypass-media-after-att-xfer
This will allow a call after an attended transfer go back to bypass media after an attended transfer.
<param name="media-option" value="bypass-media-after-att-xfer"/>
STUN
If you need to use a STUN server, here are common working examples:
ext-rtp-ip
<param name="ext-rtp-ip" value="stun:stun.fwdnet.net"/>
stun.fwdnet.net is a publicly-accessible STUN server.
ext-sip-ip
<param name="ext-sip-ip" value="world_reachable.real.numeric.ip"/>
stun-enabled
Simple traversal of UDP over NATs (STUN), is used to help resolve the problems associated with SIP clients, behind NAT, using private IP address space in their messaging. Use stun when specified (default is true).
<param name="stun-enabled" value="true"/>
stun-auto-disable
Set to true to have the profile determine stun is not useful and turn it off globally
<param name="stun-auto-disable" value="true"/>
User Agent [user-agent-string]
This sets the User-Agent header in all SIP messages sent by your server. By default this could be something like "FreeSWITCH-mod_sofia/1.0.trunk-12805". If you didn't want to advertise detailed version information you could simply set this to "FreeSWITCH" or even "Asterisk PBX" as a joke.
Take care when setting this value as certain characters such as '@' could cause other SIP proxies could reject your messages as invalid.
<param name="user-agent-string" value="FreeSWITCH Rocks!"/>
NATing [apply-nat-acl, aggressive-nat-detection]
When receiving a REGISTER or INVITE, enable NAT mode automatically if IP address in Contact header matches an entry defined in the rfc1918 access list. "acl" is a misnomer in this case because access will not be denied if the user's contact IP doesn't match.
<param name="apply-nat-acl" value="rfc1918"/>
This will enable NAT mode if the network IP/port from which the request was received differs from the IP/Port combination in the SIP Via: header, or if the Via: header contains the received parameter (regardless of what it contains.) Note 2009-04-05: Someone please clarify when this would be useful. It seems to me if someone needed this feature, chances are that things are so broken that they would need to use NDLB-force-rport
<param name="aggressive-nat-detection" value="true"/>
VAD and CNG [vad, suppress-cng]
VAD stands for Voice Activity Detector. FreeSWITCH is capable of detecting speech and can stop transmitting RTP packets when no voice is detected.
- vad
<param name="vad" value="in"/> <param name="vad" value="out"/> <param name="vad" value="both"/>
- suppress-cng
Suppress CNG on this profile or per call with the 'suppress_cng' variable
<param name="suppress-cng" value="true"/>
NDLB
A.K.A. No Device Left Behind
NDLB-force-rport
This will force FreeSWITCH to send SIP responses to the network port from which they were received. Use at your own risk! For more information see NAT Traversal.
<param name="NDLB-force-rport" value="true"/>
NDLB-broken-auth-hash
Used for when phones respond to a challenged ACK with method INVITE in the hash
<param name="NDLB-broken-auth-hash" value="true"/>
NDLB-received-in-nat-reg-contact
add a ;received="<ip>:<port>" to the contact when replying to register for nat handling
<param name="NDLB-received-in-nat-reg-contact" value="true"/>
NDLB-sendrecv-in-session
By default, "a=sendrecv" is only included in the media portion of the SDP. While this is RFC-compliant, it may break functionality for some SIP devices. To also include "a=sendrecv" in the session portion of the SDP, set this parameter to true.
<param name="NDLB-sendrecv-in-session" value="true"/>
NDLB-allow-bad-iananame
- Introduced in rev. 15401, this was enabled by default prior to new param.
Will allow codecs to match respective name even if the given string is not correct.
ie: Linksys and Sipura phones will pass G729a by default instead of G729 as codec string therefore not matching.
If you wish to allow bad IANA names to match respective codec string, add the following param to your sip profile.
<param name="NDLB-allow-bad-iananame" value="true"/>
Challenge Realm [challenge-realm]
Choose the realm challenge key. Default is auto_to if not set.
auto_from - uses the from field as the value for the sip realm. auto_to - uses the to field as the value for the sip realm. <anyvalue> - you can input any value to use for the sip realm.
If you want URL dialing to work you'll want to set this to auto_from.
If you use any other value besides auto_to or auto_from you'll loose the ability to do multiple domains.
Note: comment out to restore the behavior before 2008-09-29
<param name="challenge-realm" value="auto_from"/>
disable-rtp-auto-adjust
<param name="disable-rtp-auto-adjust" value="true"/>
Call ID [inbound-use-callid-as-uuid, outbound-use-uuid-as-callid]
- inbound-use-callid-as-uuid
On inbound calls make the uuid of the session equal to the sip call id of that call
<param name="inbound-use-callid-as-uuid" value="true"/>
- outbound-use-uuid-as-callid
On outbound calls set the callid to match the uuid of the session
<param name="outbound-use-uuid-as-callid" value="true"/>
TLS
tls
TLS: disabled by default, set to "true" to enable
<param name="tls" value="$${internal_ssl_enable}"/>
tls-bind-params
additional bind parameters for TLS
<param name="tls-bind-params" value="transport=tls"/>
tls-sip-port
Port to listen on for TLS requests. (5061 will be used if unspecified)
<param name="tls-sip-port" value="$${internal_tls_port}"/>
tls-cert-dir
Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server)
<param name="tls-cert-dir" value="$${internal_ssl_dir}"/>
tls-version
TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1
<param name="tls-version" value="$${sip_tls_version}"/>
Other (TO DO)
debug
<param name="debug" value="0"/>
shutdown-on-fail
<param name="shutdown-on-fail" value="true"/>
If set to true and the profile fails to load, FreeSWITCH will shut down. This is useful if you are running something like Pacemaker and OpenAIS which manage a pair of FreeSWITCH nodes and automatically monitor, start, stop, restart, and standby-on-fail the nodes. It will ensure that the specific node is not able to be used in a "partially up" situation. This parameter is available as of revision 15854 committed on 12/9/2009.
sip-trace
<param name="sip-trace" value="no"/>
context
dialplan context in which to dump calls to this profiles ip:port
<param name="context" value="public"/>
rfc2833-pt
<param name="rfc2833-pt" value="101"/>
sip-port
port to bind to for sip traffic
<param name="sip-port" value="$${internal_sip_port}"/>
sip-ip
ip address to bind to, DO NOT USE HOSTNAMES ONLY IP ADDRESSES
<param name="sip-ip" value="$${local_ip_v4}"/>
dtmf-duration
<param name="dtmf-duration" value="100"/>
inbound-codec-prefs
This parameter allows to change the allowed inbound codecs per profile.
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
See: Codec Negotiation
outbound-codec-prefs
This parameter allows to change the outbound codecs per profile.
<param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/>
See: Codec Negotiation
codec-prefs
This parameter allows to change both inbound-codec-prefs and outbound-codec-prefs at the same time.
<param name="codec-prefs" value="$${global_codec_prefs}"/>
See: Codec Negotiation
use-rtp-timer obsolete
rtp-timer-name
<param name="rtp-timer-name" value="soft"/>
rtp-ip
ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES
<param name="rtp-ip" value="$${local_ip_v4}"/>
hold-music
<param name="hold-music" value="$${hold_music}"/>
disable-hold
This allows to disable Music On Hold (added in GIT commit e5cc0539ffcbf660637198c698e90c2e30b05c2f, from Fri Apr 30 19:14:39 2010 -0500).
This can be useful when the calling device intends to send its own MOH, but nevertheless sends a REINVITE to FreeSWITCH triggering its MOH.
This can be done from dialplan also with disable_hold channel variable.
<param name="disable-hold" value="true"/>
enable-timer
This enables or disables support for RFC 4028 SIP Session Timers.
<param name="enable-timer" value="false"/>
enable-100rel
This enable support for 100rel (100% reliability - PRACK message as defined in RFC3262) This fixes a problem with SIP where provisional messages like "180 Ringing" are not ACK'd and therefore could be dropped over a poor connection without retransmission. *2009-07-08:* Enabling this may cause FreeSWITCH to crash, see FSCORE-392.
<param name="enable-100rel" value="true"/>
minimum-session-expires
This sets the "Min-SE" value (in seconds) from RFC 4028. This value must not be less than 90 seconds.
<param name="minimum-session-expires" value="120"/>
apply-inbound-acl
set which access control lists, defined in acl.conf.xml, apply to this profile
<param name="apply-inbound-acl" value="domains"/>
apply-register-acl
<param name="apply-register-acl" value="domains"/>
apply-proxy-acl
<param name="apply-proxy-acl" value="myproxies"/>
This allows traffic to be sent to FreeSWITCH via one or more proxy servers.
The proxy server should add a header named X-AUTH-IP containing the IP address of the client. FreeSWITCH trusts the proxy because its IP is listed in the proxy server ACL, and uses the value of the IP in this header as the client's IP for ACL authentication.
dtmf-type
can be one of:
<param name="dtmf-type" value="info"/>
or
<param name="dtmf-type" value="rfc2833"/>
Note: for inband DTMF, Misc. Dialplan Tools start_dtmf must be used in the dialplan.
caller-id type
choose one, can be overridden by inbound call type and/or sip_cid_type channel variable
Remote-Party-ID header:
<param name="caller-id-type" value="rpid"/>
P-*-Identity family of headers:
<param name="caller-id-type" value="pid"/>
neither one:
<param name="caller-id-type" value="none"/>
record-template
<param name="record-template" value="$${base_dir}/recordings/${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
manage-presence
Enable presence.
If you want to share your presence (see dbname and presence-hosts) set this to "true" on the first profile and enable the shared presence database. Then on subsequent profiles that share presence set this variable to "passive" and enable the shared presence database there as well.
<param name="manage-presence" value="true"/>
dbname
Used to share presence info across sofia profiles
Name of the db to use for this profile
<param name="dbname" value="share_presence"/>
presence-hosts
A list of domains that have a shared presence in the database specified in dbname.
<param name="presence-hosts" value="$${domain}"/>
bitpacking
This setting is for AAL2 bitpacking on G726
<param name="bitpacking" value="aal2"/>
max-proceeding
max number of open dialogs in proceeding
<param name="max-proceeding" value="1000"/>
session-timeout
session timers for all call to expire after the specified seconds Then it will send another invite (re-invite). If not specified defaults to 30 minutes. Some gateways may reject values less than 30 minutes.
<param name="session-timeout" value="120"/>
multiple-registrations
Can be 'true' or 'contact'
<param name="multiple-registrations" value="contact"/>
inbound-codec-negotiation
set to 'greedy' if you want your codec list to take precedence
<param name="inbound-codec-negotiation" value="generous"/>
if 'greedy' doesn't work for you, try 'scrooge' which has been known to fix misreported ptime issues with DID providers such as CallCentric.
A rule of thumb is:
- 'generous' permits the remote codec list have prcedence and 'win' the codec negotiation and selection process
- 'greedy' forces a win by the local FreeSWITCH preference list
- 'scrooge' takes 'greedy' a step further, so that the FreeSWITCH wins even when the far side lies about capabilities during the negotiation process
bind-params
if you want to send any special bind params of your own
<param name="bind-params" value="transport=udp"/>
nat-options-ping
with this option set FreeSWITCH will periodically send an OPTIONS packet to all NATed registered endpoints to keep alive connection. If set to True with unregister-on-options-fail the endpoint will be unregistered if no answer on OPTIONS packet.
<param name="nat-options-ping" value="true"/>
unregister-on-options-fail
If set to True with nat-options-ping the endpoint will be unregistered if no answer on OPTIONS packet.
<param name="unregister-on-options-fail" value="true"/>
rtp-rewrite-timestamps
If you don't want to pass through timestamps from 1 RTP stream to another, rtp-rewrite-timestamps is a parameter you can set in a SIP Profile (on a per call basis with rtp_rewrite_timestamps chanvar in a dialplan).
The result is that Freeswitch will regenerate and rewrite the timestamps in all the RTP streams going to an endpoint using this SIP Profile.
This could be necessary to fix audio issues when sending calls to some paranoid and not RFC-compliant gateways (Cirpack is known to require this).
<param name="rtp-rewrite-timestamps" value="true"/>
pass-rfc2833
<param name="pass-rfc2833" value="true"/>
odbc-dsn
If you have ODBC support and a working dsn you can use it instead of SQLite
<param name="odbc-dsn" value="dsn:user:pass"/>
inbound-bypass-media
Uncomment to set all inbound calls to no media mode. It means that the FS server only keeps the SIP messages state, but have the RTP steam go directly from end-point to end-point
<param name="inbound-bypass-media" value="true"/>
inbound-proxy-media
Uncomment to set all inbound calls to proxy media mode. This means the FS keeps both the SIP and RTP traffic on the server but does not interact with the RTP stream.
<param name="inbound-proxy-media" value="true"/>
inbound-late-negotiation
Uncomment to let calls hit the dialplan *before* you decide if the codec is ok
<param name="inbound-late-negotiation" value="true"/>
accept-blind-reg
this lets anything register comment the next line and uncomment one or both of the other 2 lines for call authentication
<param name="accept-blind-reg" value="true"/>
accept-blind-auth
accept any authentication without actually checking (not a good feature for most people)
<param name="accept-blind-auth" value="true"/>
nonce-ttl
TTL for nonce in sip auth
<param name="nonce-ttl" value="60"/>
disable-transcoding
Uncomment if you want to force the outbound leg of a bridge to only offer the codec that the originator is using
<param name="disable-transcoding" value="true"/>
auth-calls
Users in the directory can have "auth-acl" parameters applied to them so as to restrict users access to a predefined ACL or a CIDR.
<param name="auth-calls" value="$${internal_auth_calls}"/>
value can be "false" to disable authentication on this profile.
log-auth-failures
Write log entries ( Warning ) on authentication failures ( Registration & Invite ). useful for users wishing to use fail2ban. note : Required SVN#15654 or higher
<param name="log-auth-failures" value="true"/>
inbound-reg-force-matching-username
Force the user and auth-user to match.
<param name="inbound-reg-force-matching-username" value="true"/>
auth-all-packets
On authed calls, authenticate *all* the packets not just invite
<param name="auth-all-packets" value="false"/>
ext-rtp-ip
This is the IP behind which Freeswitch is seen from the Internet, so if Freeswitch is behind NAT, this is basically the public IP that should be used for RTP.
Possibles values are:
Any variable from vars.xml, ie $${external_rtp_ip}:
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
"specific IP address"
<param name="ext-rtp-ip" value="1.2.3.4"/>
"auto": the guessed IP will be used (guessed by looking in the IP routing table which interface is the default route)
<param name="ext-rtp-ip" value="auto"/>
"auto-nat": Freeswitch will use uPNP or NAT-PMP to discover the public IP address it should use
<param name="ext-rtp-ip" value="auto-nat"/>
"stun:DNS name or IP address": Freeswitch will use the STUN server of your choice to discover the public IP address
<param name="ext-rtp-ip" value="stun:stun.freeswitch.org"/>
"host:DNS name": Freeswitch will resolve the DNS name as the public IP address, so you can use a DynDNS host
<param name="ext-rtp-ip" value="host:mypublicIP.dyndns.org"/>
ext-sip-ip
This is the IP behind which Freeswitch is seen from the Internet, so if Freeswitch is behind NAT, this is basically the public IP that should be used for SIP.
Possibles values are the same than the ones for ext-rtp-ip, and it is usually set to the same value.
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
rtp-timeout-sec
rtp inactivity timeout
<param name="rtp-timeout-sec" value="300"/>
rtp-hold-timeout-sec
<param name="rtp-hold-timeout-sec" value="1800"/>
alias
<param name="alias" value="sip:10.0.1.251:5555"/>
force-register-domain
all inbound registrations will look in this domain for the users. Comment out to use multiple domains
<param name="force-register-domain" value="$${domain}"/>
force-register-db-domain
all inbound reg will stored in the db using this domain. Comment out to use multiple domains
<param name="force-register-db-domain" value="$${domain}"/>
force-subscription-expires
force suscription expires to a lower value than requested
<param name="force-subscription-expires" value="60"/>
disable-transfer
disable transfer which may be undesirable in a public switch
<param name="disable-transfer" value="true"/>
disable-register
disable register which may be undesirable in a public switch
<param name="disable-register" value="true"/>
enable-3pcc
enable-3pcc determines if third party call control is allowed or not. Third party call control is useful in cases where the SIP invite doesn't include a SDP (late media negotiation).
enable-3pcc can be set to either 'true' or 'proxy', true accepts the call right away, proxy waits until the call has been answered then sends accepts
<param name="enable-3pcc" value="true"/>
send-message-query-on-register
Can be set to 'true', 'false' or 'first-only'. If set to 'true' (this is the default behavior), mod_sofia will send a message-query event upon registration. mod_voicemail uses this for counting messages.
<param name="send-message-query-on-register" value="true"/>
If set to 'first-only', only the first REGISTER will trigger the message-query (it requires the UA to increment the NC on subsequent REGISTERs. Some phones, snom for instance, do not do this).
The final effect of the message-query is to cause a NOTIFY MWI message to be sent to the registering ua (it is used to satisfy terminals that expect MWI without subscribing for it).
rtp-autoflush-during-bridge
Controls what happens if FreeSWITCH detects that it's not keeping up with the RTP media (audio) stream on a bridged call. (This situation can happen if the FreeSWITCH server has insufficient CPU time available.)
When set to "true" (the default), FreeSWITCH will notice when more than one RTP packet is waiting to be read in the incoming queue. If this condition persists for more than five seconds, RTP packets will be discarded to "catch up" with the audio stream. For example, if there are always five extra 20 ms packets in the queue, 100 ms of audio latency can be eliminated by discarding the packets. This will cause an audio glitch as some audio is discarded, but will improve the latency by 100 ms for the rest of the call.
If rtp-autoflush-during-bridge is set to false, FreeSWITCH will instead preserve all RTP packets on bridged calls, even if it increases the latency or "lag" that callers hear.
<param name="rtp-autoflush-during-bridge" value="true"/>
rtp-autoflush
Has the same effect as "rtp-autoflush-during-bridge", but affects NON-bridged calls (such as faxes, IVRs and the echo test).
Unlike "rtp-autoflush-during-bridge", the default is false, meaning that high-latency packets on non-bridged calls will not be discarded. This results in smoother audio at the possible expense of increasing audio latency (or "lag").
Setting "rtp-autoflush" to true will discard packets to minimize latency when possible. Doing so may cause errors in DTMF recognition, faxes, and other processes that rely on receiving all packets.
<param name="rtp-autoflush" value="true"/>
sql-in-transactions
If set to true (default), it will instruct the profile to wait for 500 SQL statements to accumulate or 500ms to elapse and execute them in a transaction (to boost performance).
<param name="sql-in-transactions" value="true"/>
Directory of Users
To allow users to register with the server, the user information must be specified in the conf/directory/default/*xml file. To dynamically specify what users can register, use Mod xml curl
Default Configuration File
Reloading
If you've made a change in sofia.conf.xml, there are two ways to get FreeSWITCH to use the new values.
- shutdown and restart FreeSWITCH (or)
- unload and load mod_sofia
If you've only made changes to a particular profile, you may simply (WARNING: will drop all calls associated with this profile):
- sofia profile <profilename> restart reloadxml

