[Freeswitch-docs] FreeSWITCH 1.8 New Configs

Mario G mario_fs at mgtech.com
Thu Feb 18 01:32:24 MSK 2016


Some reasons this should not be done for OS X (or any other distort IMHO):

1. Setting up FreeSWITCH to run all the time is something the install should not do by default since people want to test and configure before auto starting is needed. They won’t want to auto starting until they are ready.

2. I have been doing FreeSwitch since OS X 10.6 and what I am very concerned about is that Apple changes things, it’s easier to update the wiki than wind up with a broken install having to wait on fixes. 

3. OS X users don’t have to use launchd if they want to use the simpler less complex login option I documented.

I won’t use any FS supplied lunchd because I don’t start freeswitch from the plist. I start using a script which has huge advantages, it’s in the wiki. You are opening a can of worms adding launchd to the install for OS X. For OS X please leave this one out. Forget about over-thinking the problem, there is no problem to fix in this case. 

I am not sure what the thinking is on where config goes, but right now I can copy FreeSwitch and it’s associated config files in a single folder. Makes it easy to backout, test, etc. I don’t care how they are organized but I hope they are all within the freeswitch directly as they are now.



> On Feb 17, 2016, at 11:47 AM, Sergey Safarov <s.safarov at gmail.com> wrote:
> 
> Hello Mario
> I has find that my mac has over 17000 plist files. launchd is widely used in macs. As example
> safarov-mac:~ root# find / -name "*.plist" | wc -l
> find: /dev/fd/3: Not a directory
> find: /dev/fd/4: Not a directory
>    17849
> 
> safarov-mac:~ root# uname -a
> Darwin safarov-mac.home 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 19:41:34 PDT 2015; root:xnu-3247.1.106~5/RELEASE_X86_64 x86_64
> 
> "Not sure why you need to add this to FreeSwitch config/install for OS X but I documented auto startup for OS X here:"
> I am speak about how to use system launch daemons to manages FS modules. It is more wide then simple run process in MacOS.
> 
> "And for OS X config should all be in one place as it is now. Otherwise there could be permissions problems, etc."
> If FS files owner is freeswitch user and freeswitch user has permission to read/write/execute permission on files, then what permission problem may be exist? What is mean "one place"? FS config files is stored in separate files and this files is merged to one by preprocessor. I think will be helpfull to preproces config files for each section (configuration, directory, dialplan) separately. What is wrong?
> 
> To Bote.
> "Agreed. There is danger in over-thinking the problem."
> 
> I known systemd. It easy to do it.
> Think implementation this for launchd is will be similar.  
> 
> Sergey
> 
> 
> 
>  
> 
> On Wed, Feb 17, 2016 at 8:02 PM, Mario G <mario_fs at mgtech.com <mailto:mario_fs at mgtech.com>> wrote:
> Not sure why you need to add this to FreeSwitch config/install for OS X but I documented auto startup for OS X here:
> https://freeswitch.org/confluence/display/FREESWITCH/Customization+on+OS+X#CustomizationonOSX-AutomaticStartupandShutdown <https://freeswitch.org/confluence/display/FREESWITCH/Customization+on+OS+X#CustomizationonOSX-AutomaticStartupandShutdown>
> 
> And for OS X config should all be in one place as it is now. Otherwise there could be permissions problems, etc.
> 
> 
> 
>> On Feb 17, 2016, at 6:53 AM, Sergey Safarov <s.safarov at gmail.com <mailto:s.safarov at gmail.com>> wrote:
>> 
>> Oops. Systemd error  :o)
>> 
>> I made smal search and find:
>> 1) MacOS systemd alternative - launchd
>> 2) BSD systemd alternative - relaunchd
>> 3) Windows systemd alternative - SCM
>> 
>> launchd (MacOS) <https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html>
>> DEPENDENCIES
>>      Unlike many bootstrapping daemons, launchd has no explicit dependency model.  Interdependencies are
>>      expected to be solved through the use of IPC.  It is therefore in the best interest of a job developer
>>      who expects dependents to define all of the sockets in the configuration file. This has the added bene-fit benefit
>>      fit of making it possible to start the job based on demand instead of immediate
>> Please read "The launchd Startup Process <https://wiki.afp548.com/index.php/Launch_Daemons/Agents_in_OS_X#The_launchd_Startup_Process>" and "How to communicate with a LaunchAgent via Unix Sockets? <https://wiki.afp548.com/index.php/Launch_Daemons/Agents_in_OS_X#The_launchd_Startup_Process>"
>> 
>> relaunchd(BSD) <https://github.com/mheily/relaunchd>
>> This tool is not installed to FreeBSD in default configuration. But may be installed and used like launchd in MacOS.
>> 
>> SCM(Windows) <https://technet.microsoft.com/ru-ru/library/aa998749(v=exchg.65).aspx>
>> DependOnService - Lists the names of Windows services on which this service depends. SCM must start these services before it starts this service. This value can be an empty string if the service has no dependencies.
>> One more link <http://support.voiceelements.com/index.php?title=How_to_Add_Service_Dependencies>
>> 
>> PS. About changes I will write late.
>> 
>> 
>> 
>> 
>> On Wed, Feb 17, 2016 at 4:28 PM, Brian West <brian at freeswitch.org <mailto:brian at freeswitch.org>> wrote:
>> Now you're thinking linux only, now apply your mindset to Mac, Windows, *BSD, have you reviewed the changes I've made last week to the sample configs in the fsconfig18 repo?
>> 
>> On Wed, Feb 17, 2016 at 4:12 AM, Sergey Safarov <s.safarov at gmail.com <mailto:s.safarov at gmail.com>> wrote:
>> Hello FSs
>> At present time FS config file is solid. Loaded ones at startup for all modules. Also module loading is executed as modules listed in modules.conf
>> 
>> I think FS get more flexibility if config files will be spited of pisses for each module and modules will be loaded using systemd.
>> Example:
>> 1) freeswitch.service contain strings "Requires=freeswitch-config.service freeswitch-directory.service freeswitch-dialplan.service"
>> 2) freeswitch-config.service contains string "Wants= freeswitch-mod-sofia.service freeswitch-mod-dptools.service freeswitch-mod-lua.service"
>> 3) freeswitch-mod-*.service unit files contains strings "ExecStart=/usr/bin/freeswitch -x 'load <mod_module>'". Where <mod_module> is name of module
>> 4)  freeswitch-directory.service  contains string like ExecStart=/usr/bin/freeswitch -x 'load directory'"
>> 
>> This case of loading FS has following features:
>> 1) management of module dependency and module loading order via systemd;
>> 2) allow at preprocessor level abbility to implement construction like "if module loaded; then else; fi" and "case where". This allow dialplan will be polymorphic for FS configuration;
>>  
>>  
>> 
>> 
>>  
>> 
>> On Mon, Dec 7, 2015 at 7:57 PM, Brian West <brian at freeswitch.org <mailto:brian at freeswitch.org>> wrote:
>> FreeSWITCHers,
>> 
>> FS-8609 is raised to get a rough outline of a completely new config sample that will be used in 1.8, So we are reaching out to the community for input and direction, I have also created a hipchat room FS-8609 on hipchat.freeswitch.org <http://hipchat.freeswitch.org/> if you wish to join in.  Lets start the discussion on this topic.
>> 
>> Thanks,
>> 
>> -- 
>> Brian West
>> brian at freeswitch.org <mailto:brian at freeswitch.org>
>> 
>> Twitter: @FreeSWITCH , @briankwest
>> http://www.freeswitchbook.com <http://www.freeswitchbook.com/>
>> http://www.freeswitchcookbook.com <http://www.freeswitchcookbook.com/>
>> Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch>
>> T:+19184209001 <tel:%2B19184209001> | F:+19184209002 <tel:%2B19184209002> | M:+1918424WEST (9378)
>> iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest
>> 
>> 
>> _______________________________________________
>> Freeswitch-docs mailing list
>> Freeswitch-docs at lists.freeswitch.org <mailto:Freeswitch-docs at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs <http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs>
>> 
>> 
>> 
>> _______________________________________________
>> Freeswitch-docs mailing list
>> Freeswitch-docs at lists.freeswitch.org <mailto:Freeswitch-docs at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs <http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs>
>> 
>> 
>> 
>> 
>> -- 
>> Brian West
>> brian at freeswitch.org <mailto:brian at freeswitch.org>
>> 
>> Twitter: @FreeSWITCH , @briankwest
>> http://www.freeswitchbook.com <http://www.freeswitchbook.com/>
>> http://www.freeswitchcookbook.com <http://www.freeswitchcookbook.com/>
>> Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch>
>> T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378)
>> iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest
>> 
>> 
>> _______________________________________________
>> Freeswitch-docs mailing list
>> Freeswitch-docs at lists.freeswitch.org <mailto:Freeswitch-docs at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs <http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs>
>> 
>> 
>> _______________________________________________
>> Freeswitch-docs mailing list
>> Freeswitch-docs at lists.freeswitch.org <mailto:Freeswitch-docs at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs <http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs>
> 
> 
> _______________________________________________
> Freeswitch-docs mailing list
> Freeswitch-docs at lists.freeswitch.org <mailto:Freeswitch-docs at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs <http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs>
> 
> 
> _______________________________________________
> Freeswitch-docs mailing list
> Freeswitch-docs at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-docs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-docs/attachments/20160217/2d24b0f4/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the Freeswitch-docs mailing list