<div dir="ltr">I have found that freeswitch does not scale well with presence.<div>I've seen it hit a bottleneck at around that same number of subscriptions (10,000). freeswitch's presence is SQL heavy so when you are dealing with that many subscriptions and presence updates it becomes a problem.</div><div>I would recommend using something like Kamailio for presence. You can "extract" presence events from freeswitch and "publish" presence updates to kamailio using freeswitch's esl and kamailio's presence modules.</div><div>I've seen kamailio operate under extremely high volume (~100,000 subscriptions)</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 4:00 PM, Shaun Stokes <span dir="ltr"><<a href="mailto:shaun.stokes@itec-support.co.uk" target="_blank">shaun.stokes@itec-support.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-GB" link="blue" vlink="purple">
<div class="m_1389832833633634885WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">We’re still getting presence delays but it’s isolated to a single SIP profile, appears to be a bottleneck on the number of entries
in the sip_subscriptions table (over 10k), we have second internal SIP profile which has less than 1000 entries and no presence issues.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I’ve looked at a few articles, Kamailio looks like a good solution for presence, would be great if there was a similar module for FreeSWITCH.
Using Kamailio as a SIP proxy to improve presence is one thing, but I imagine we’ll have similar problems with presence using Verto\WebRTC via FreeSWITCH.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> FreeSWITCH-users [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-<wbr>bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Colton Conor<br>
<b>Sent:</b> 26 November 2017 21:47<br>
<b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>></span></p><div><div class="h5"><br>
<b>Subject:</b> Re: [Freeswitch-users] Presence BLF problems on FreeSWITCH 1.6.19<u></u><u></u></div></div><p></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Unfortunately <span class="m_1389832833633634885gmail-m8030056420491874689gmail-il"><span style="font-size:9.5pt;background:white">Freeswitch</span></span><span style="font-size:9.5pt"> does not yet support RFC 4662 aka <span class="m_1389832833633634885gmail-m8030056420491874689gmail-il">BLF</span> Resource
Lists. I would recommend you look at Kamiliio or Asterisk which both support support RFC 4662, and should significantly reduce your BLF load. Info:</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Asterisk does: <a href="https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=30278158" target="_blank">https://wiki.asterisk.<wbr>org/wiki/pages/viewpage.<wbr>action?pageId=30278158</a> They have a good overview
page<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Kamillio does: <a href="https://kamailio.org/docs/modules/3.2.x/modules_k/rls.html" target="_blank">https://kamailio.org/<wbr>docs/modules/3.2.x/modules_k/<wbr>rls.html</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Good info from Grandsteam about why to use this: <a href="http://www.grandstream.com/sites/default/files/Resources/GXP21x0_Eventlist_BLF_Guide.pdf" target="_blank">http://www.grandstream.<wbr>com/sites/default/files/<wbr>Resources/GXP21x0_Eventlist_<wbr>BLF_Guide.pdf</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Same with Polycom: <a href="http://community.polycom.com/polycom/attachments/polycom/VoIP/19112/1/Technical%20Brief%20-%20Busy%20Lamp%20Field.pdf" target="_blank">http://community.<wbr>polycom.com/polycom/<wbr>attachments/polycom/VoIP/<wbr>19112/1/Technical%20Brief%20-%<wbr>20Busy%20Lamp%20Field.pdf</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">How do we make this a feature request for Freeswitch?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Nov 24, 2017 at 4:00 AM, Shaun Stokes <<a href="mailto:shaun.stokes@itec-support.co.uk" target="_blank">shaun.stokes@itec-support.co.<wbr>uk</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Performance using PostgreSQL seems better but possibly too soon to tell, however we now have the ability to analyse the data and have identified that there is one domain that accounts for over 90% of the entries (over 12000, 11000 of which
are presence) in our sip_subscriptions table. All domains use presence but others typically have around 100 entries in sip_subscriptions.<br>
<br>
If the bottleneck was the DB file then PostgreSQL should have solved this, but I'm still concerned by the number of presence events in our sip_subscriptions table. How many presence events does FreeSWITCH support in the sip_subscriptions table? Are there are
any other recommendations to get the best performance out of FreeSWITCH in this scenario?<br>
<br>
We have 32 logical cores (8 physical) but CPU usage rarely goes above 10%.<br>
<br>
Thanks,<br>
Shaun<br>
______________________________<wbr>__________<br>
From: FreeSWITCH-users [<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a>] on behalf of Shaun Stokes [<a href="mailto:shaun.stokes@itec-support.co.uk" target="_blank">shaun.stokes@itec-support.co.<wbr>uk</a>]<br>
Sent: 23 November 2017 09:45<br>
To: FreeSWITCH Users Help<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Subject: Re: [Freeswitch-users] Presence BLF problems on FreeSWITCH 1.6.19<br>
<br>
Thanks, will give that a try and provide some feedback.<br>
______________________________<wbr>__________<br>
From: FreeSWITCH-users [<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a>] on behalf of António Silva [<a href="mailto:asilva@wirelessmundi.com" target="_blank">asilva@wirelessmundi.com</a>]<br>
Sent: 23 November 2017 09:32<br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a><br>
Subject: Re: [Freeswitch-users] Presence BLF problems on FreeSWITCH 1.6.19<br>
<br>
Hi,<br>
<br>
We had the same problem using sqlite files as core db, under heavy load<br>
sqlite backend is not that fast... switching it to postgresql solved the<br>
issue.<br>
<br>
Hope it helps.<br>
<br>
<br>
On 11/23/2017 10:15 AM, Shaun Stokes wrote:<br>
> Does anyone have experience with presence on FreeSWITCH when under load? We've considered offloading presence to a Kamailio proxy but it would great if we could understand the limitations of presence on FreeSWITCH and recommended configuration for best performance
under load.<br>
><br>
> We've been experiencing issues with presence (BLF) intermittently not working or being delayed by 5 minutes or more. The BLF lights may show an extension as available when they're on the phone, as ringing when they're available etc. This problem can only
be re-produced on a system which has been under load but it doesn't occur immediately unless the system has been running for a couple of weeks. This effects multiple SIP profiles in a multi-tenant (multi domain) environment with roughly 800 registrations,
500 registrations on one SIP profile and 300 on another.<br>
><br>
> The FreeSWITCH DB files use a 512MB RAM disk and we've balanced extensions across multiple SIP profiles using separate (not shared) DB files to distribute load.<br>
><br>
> What we've noticed is the internal DB files (i.e. sofia_reg_internal.db) appear to increase exponentially over time after roughly 22MB we often start to run into problems with presence while the system is under load, restarting FreeSWITCH and flushing the
internal DB files clears the problem.<br>
><br>
> Interestingly we didn't have this problem on FreeSWITCH 1.4<br>
><br>
> We've recently adjusted the following settings on our internal SIP profiles and are continuing to monitor:<br>
> force-subscription-expires [900] -> [1800]<br>
> sip-subscription-max-deviation [300] -> [600]<br>
> max-proceeding [1000] -> [5000]<br>
> initial-event-threads [2] -> [4]<br>
><br>
> Here is a snippet of our internal SIP profile configuration:<br>
> nonce-ttl [60]<br>
> outbound-codec-prefs [G722,PCMA,H264]<br>
> pass-rfc2833 [true]<br>
> record-path [/path/freeswitch/recordings]<br>
> record-template [${domain_name}/archive/${<wbr>strftime(%Y)}/${strftime(%b)}/<wbr>${strftime(%d)}/${uuid}.${<wbr>record_ext}]<br>
> multiple-registrations [contact]<br>
> inbound-reg-force-matching-<wbr>username [true]<br>
> inbound-reg-in-new-thread [true]<br>
> initial-event-threads [4]<br>
> local-network-acl [localnet.auto]<br>
> manage-presence [true]<br>
> unregister-on-options-fail [true]<br>
> tls-version [tlsv1.2]<br>
> tls-cert-dir [/path/freeswitch/certs]<br>
> tls-bind-params [transport=tls]<br>
> tls [true]<br>
> stun-enabled [false]<br>
> stun-auto-disable [false]<br>
> sip-trace [no]<br>
> sip-subscription-max-deviation [600]<br>
> sip-port [xxxx]<br>
> sip-ip [x.x.x.x]<br>
> sip-force-expires [900]<br>
> sip-expires-max-deviation [300]<br>
> sip-capture [no]<br>
> rtp-timeout-sec [0]<br>
> rtp-timer-name [soft]<br>
> rtp-ip [x.x.x.x]<br>
> rtp-hold-timeout-sec [0]<br>
> tls-verify-in-subjects []<br>
> tls-verify-depth [2]<br>
> tls-verify-date [true]<br>
> tls-sip-port [xxxx]<br>
> tls-passphrase []<br>
> tls-only [false]<br>
> inbound-codec-prefs [G722,PCMA,H264]<br>
> inbound-codec-negotiation [greedy]<br>
> log-auth-failures [true]<br>
> user-agent-string [FreeSWITCH]<br>
> watchdog-enabled [no]<br>
> watchdog-event-timeout [30000]<br>
> watchdog-step-timeout [30000]<br>
> ext-rtp-ip [x.x.x.x]<br>
> accept-blind-auth [false]<br>
> accept-blind-reg [false]<br>
> aggressive-nat-detection [true]<br>
> apply-inbound-acl [domains]<br>
> apply-nat-acl [nat.auto]<br>
> auth-all-packets [false]<br>
> auth-calls [true]<br>
> challenge-realm [auto_from]<br>
> context [public]<br>
> debug [0]<br>
> dialplan [XML]<br>
> dtmf-duration [2000]<br>
> dtmf-type [rfc2833]<br>
> enable-timer [true]<br>
> ext-sip-ip [x.x.x.x]<br>
> registration-thread-frequency [240]<br>
> rfc2833-pt [101]<br>
> force-subscription-expires [1800]<br>
> forward-unsolicited-mwi-notify [false]<br>
> hold-music [local_stream://default]<br>
> nat-options-ping [true]<br>
> NDLB-force-rport [safe]<br>
> max-proceeding [5000]<br>
><br>
> ______________________________<wbr>______________________________<wbr>__________<br>
> This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
> ______________________________<wbr>______________________________<wbr>__________<br>
><br>
> ______________________________<wbr>______________________________<wbr>_____________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">
http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
--<br>
Saludos / Regards / Cumprimentos<br>
António Silva<br>
<br>
<br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
______________________________<wbr>______________________________<wbr>__________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________<wbr>______________________________<wbr>__________<br>
<br>
______________________________<wbr>______________________________<wbr>__________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________<wbr>______________________________<wbr>__________<br>
<br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
______________________________<wbr>______________________________<wbr>__________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________<wbr>______________________________<wbr>__________<br>
<br>
______________________________<wbr>______________________________<wbr>__________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________<wbr>______________________________<wbr>__________<br>
<br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><br>
______________________________<wbr>______________________________<wbr>__________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________<wbr>______________________________<wbr>__________<u></u><u></u></p>
</div></div></div><div><div class="h5">
<br clear="both">
______________________________<wbr>______________________________<wbr>__________<br>
This message has been checked for all known viruses by MessageLabs Virus Scanning Service.<br>
______________________________<wbr>______________________________<wbr>__________<br>
</div></div></div>
<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>