Configure aliases and auto-complete on start up.
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console. What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console. Anytime I restart freeswitch the aliases and auto-complete seem to get reset. Is there a configuration file that I can configure these in so they are loaded on start up? Thank you :)
https://wiki.freeswitch.org/wiki/Mod_commands#alias -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts? ------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
You could configure FS to execute a lua script on startup that adds them. On 27 March 2014 10:16, <bruce@sqls.net> wrote:
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Or write a patch that does the same thing in c :) -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Mar 27, 2014, at 5:26 PM, Steven Ayre <steveayre@gmail.com> wrote:
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote: Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
Well.. Sadly, I haven't any idea how to do that. I was just hoping there was a configuration file that would read in "start up" commands or something similar that could be used. Re-adding a dozen complete's on each restart does kinda suck a little! hmn. Can alias or complete commands be run from a lua script called from the console? ------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/27/2014 9:57:18 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
Or write a patch that does the same thing in c :) -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 27, 2014, at 5:26 PM, Steven Ayre <steveayre@gmail.com> wrote:
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote: Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
Great idea. How do I configure FS to run a script? And, I'm sorry but I'm very very new to both FreeSWITCH and LUA. I just started toying with them about a week ago. Do you know what command I would use inside LUA? Thanks. ------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/27/2014 5:26:39 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote:
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com/ http://www.freeswitchcookbook.com/
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
https://wiki.freeswitch.org/wiki/Mod_lua#Lua_scripts_at_startup https://wiki.freeswitch.org/wiki/Mod_lua#Make_API_calls_directly_from_Lua_co... On 28 March 2014 09:29, <bruce@sqls.net> wrote:
Great idea. How do I configure FS to run a script? And, I'm sorry but I'm very very new to both FreeSWITCH and LUA. I just started toying with them about a week ago. Do you know what command I would use inside LUA? Thanks.
------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/27/2014 5:26:39 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote:
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com/ http://www.freeswitchcookbook.com/
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
My first Linux install on Freeswitch is not going as smooth as I would want. Been using it on Windows previously, without any difficulties. I can't work my way around this error: checking for sqlite3 >= 3.6.20... Package sqlite3 was not found in the pkg-config search path. Perhaps you should add the directory containing `sqlite3.pc' to the PKG_CONFIG_PATH environment variable No package 'sqlite3' found configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them. What am I missing? I've been following instructions on how to install/configure unixODBC on CentOS (running on Rel 6.5) Freeswitch, FusionPBX. Thank you, A.C.
Libraries on Linux are generally split into runtime (the binary part) and development packages (the header files). To compile against a library you need both, but only the runtime part to use it. Try looking for a package such as libsqlite3-dev (name will depend on your platform). It sounds like it isn't installed. There are probably others too... https://wiki.freeswitch.org/wiki/Download_%26_Installation_Guide See the 'Prerequisites' for your platform under the '9 Distribution Information and Installation' section. -Steve On 28 March 2014 15:12, Adelia C. <hexade@hotmail.com> wrote:
My first Linux install on Freeswitch is not going as smooth as I would want. Been using it on Windows previously, without any difficulties.
I can't work my way around this error:
checking for sqlite3 >= 3.6.20... Package sqlite3 was not found in the pkg-config search path. Perhaps you should add the directory containing `sqlite3.pc' to the PKG_CONFIG_PATH environment variable No package 'sqlite3' found configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
What am I missing? I've been following instructions on how to install/configure unixODBC on CentOS (running on Rel 6.5) Freeswitch, FusionPBX.
Thank you, A.C.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thank you both! Worked. A.C. From: steveayre@gmail.com Date: Fri, 28 Mar 2014 15:23:37 -0400 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Freeswitch Install on Linux Libraries on Linux are generally split into runtime (the binary part) and development packages (the header files). To compile against a library you need both, but only the runtime part to use it. Try looking for a package such as libsqlite3-dev (name will depend on your platform). It sounds like it isn't installed. There are probably others too... https://wiki.freeswitch.org/wiki/Download_%26_Installation_Guide See the 'Prerequisites' for your platform under the '9 Distribution Information and Installation' section. -Steve On 28 March 2014 15:12, Adelia C. <hexade@hotmail.com> wrote: My first Linux install on Freeswitch is not going as smooth as I would want. Been using it on Windows previously, without any difficulties. I can't work my way around this error: checking for sqlite3 >= 3.6.20... Package sqlite3 was not found in the pkg-config search path. Perhaps you should add the directory containing `sqlite3.pc' to the PKG_CONFIG_PATH environment variable No package 'sqlite3' found configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them. What am I missing? I've been following instructions on how to install/configure unixODBC on CentOS (running on Rel 6.5) Freeswitch, FusionPBX. Thank you, A.C. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You need to install the sqlite devel package... Yum install sqlite-devel.x86_64 You may also get something like this for libedit, libpcre and a few others... Similar fix for those On 3/28/14 1:12 PM, "Adelia C." <hexade@hotmail.com> wrote:
My first Linux install on Freeswitch is not going as smooth as I would want. Been using it on Windows previously, without any difficulties.
I can't work my way around this error:
checking for sqlite3 >= 3.6.20... Package sqlite3 was not found in the pkg-config search path. Perhaps you should add the directory containing `sqlite3.pc' to the PKG_CONFIG_PATH environment variable No package 'sqlite3' found configure: error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
What am I missing? I've been following instructions on how to install/configure unixODBC on CentOS (running on Rel 6.5) Freeswitch, FusionPBX.
Thank you, A.C.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ken http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org irc.freenode.net #freeswitch Twitter: @FreeSWITCH
Steven thanks for the idea. I was curious if you could tell me how to configure FS to do this? Is there a configuration build into FS where you can add init scripts? Thanks :) ------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/27/2014 5:26:39 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote:
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com/ http://www.freeswitchcookbook.com/
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Maybe this would work? <X-PRE-PROCESS cmd="exec" data="myInit.sh"/> On Thu, Apr 3, 2014 at 1:11 PM, <bruce@sqls.net> wrote:
Steven thanks for the idea. I was curious if you could tell me how to configure FS to do this? Is there a configuration build into FS where you can add init scripts?
Thanks :)
------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/27/2014 5:26:39 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote:
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com/ http://www.freeswitchcookbook.com/
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I sent a mail with that - in case you didn't see it: https://wiki.freeswitch.org/wiki/Mod_lua#Lua_scripts_at_startup
https://wiki.freeswitch.org/wiki/Mod_lua#Make_API_calls_directly_from_Lua_co...
Check the first link. On 3 April 2014 13:11, <bruce@sqls.net> wrote:
Steven thanks for the idea. I was curious if you could tell me how to configure FS to do this? Is there a configuration build into FS where you can add init scripts?
Thanks :)
------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/27/2014 5:26:39 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote:
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com/ http://www.freeswitchcookbook.com/
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Thank you very much Steven! I hadn't seen any message you sent previously! That's perfect and will work great. Thanks everybody for all the hand holding :) ------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: bruce@sqls.net Cc: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 4/3/2014 1:52:37 PM Subject: Re: Re[2]: [Freeswitch-users] Configure aliases and auto-complete on start up.
I sent a mail with that - in case you didn't see it:
https://wiki.freeswitch.org/wiki/Mod_lua#Lua_scripts_at_startup https://wiki.freeswitch.org/wiki/Mod_lua#Make_API_calls_directly_from_Lua_co...
Check the first link.
On 3 April 2014 13:11, <bruce@sqls.net> wrote:
Steven thanks for the idea. I was curious if you could tell me how to configure FS to do this? Is there a configuration build into FS where you can add init scripts?
Thanks :)
------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/27/2014 5:26:39 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
You could configure FS to execute a lua script on startup that adds them.
On 27 March 2014 10:16, <bruce@sqls.net> wrote:
Thanks Brian. I see with alias there's a sticky add option. But I don't see that for the "complete" command. Or maybe it is there and I'm just not seeing it. Is there a way to get "complete" commands to persist through restarts?
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 3/25/2014 4:51:19 PM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
https://wiki.freeswitch.org/wiki/Mod_commands#alias
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com/ http://www.freeswitchcookbook.com/
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Mar 25, 2014, at 11:20 AM, bruce@sqls.net wrote:
Right now I'm building a lua based fax server for fs which includes a handy management script that can be used from the console.
What I've done to make using my management tool easier is created aliases and auto-complete's for it from the fs_cli console.
Anytime I restart freeswitch the aliases and auto-complete seem to get reset.
Is there a configuration file that I can configure these in so they are loaded on start up?
Thank you :)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com/
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com/
Official FreeSWITCH Sites http://www.freeswitch.org/ http://wiki.freeswitch.org/ http://www.cluecon.com/
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org/
This is a perfect project for someone to learn a little C on, We all have to start somewhere. :P -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Apr 3, 2014, at 2:18 PM, bruce@sqls.net wrote:
Thank you very much Steven! I hadn't seen any message you sent previously! That's perfect and will work great.
Thanks everybody for all the hand holding :)
------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: bruce@sqls.net Cc: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 4/3/2014 1:52:37 PM Subject: Re: Re[2]: [Freeswitch-users] Configure aliases and auto-complete on start up.
I sent a mail with that - in case you didn't see it:
https://wiki.freeswitch.org/wiki/Mod_lua#Lua_scripts_at_startup https://wiki.freeswitch.org/wiki/Mod_lua#Make_API_calls_directly_from_Lua_co...
Check the first link.
Well, Brian, you may be right. I was trying to figure out how it worked and figured it probably stored the values in the FS database. So I opened that up and saw the tables and noticed both the complete and aliases database has a "sticky" integer field. So I tried the stickyadd sub-command for complete in fs_cli and it worked and created a record in the complete table with the sticky field set to 1. Great. Then I shut down FS and all the values (even those with sticky = 0) were still in the table. Then I started FS and everything was wiped out. I compared this to the aliases table where only the sticky=0 records got wiped out. So, I'm a bit hazy on C but I tried to hunt down how it works.. It looks like in mod_commands.c the complete and alias commands get registered as console command and that points back to the function switch_console_set_complete/alias in switch_console.c. In that function the code for "stickyadd" is already there for complete. So, the final culprit seems to be switch_core_sqldb.c where it clears/rebuilds the db when FS is started. There's a line in there for the alias table to delete all non-sticky records but the complete table seems to be totally different. There's a section around line 3484 that makes an array of complete, interfaces, and NULL then walks that array and deletes everything in the tables. I think the NULL just causes the for loop to exit out. So, all that code is just for two tables it seems. So, I don't know if there's a reason for that block of code at all. I would think the safest is to just remove complete from the array and replicate a similar line below like the alias table has. But I'm more curious if just taking that whole block out and then creating a line for complete and interfaces below would be even better and more consistent with everything else. Or at the least, remove all the array/loop business since it's a lot of code to loop over 1 item (once complete is removed) :) So, on the safe side, from a fresh git clone here's me learning C Brian. Of course I don't really know if any of this is right and I just starting using freeswitch last week and I haven't actually ran freeswitch with this code... So, well.. try at your own risk I guess, but it looks pretty straight forward to me. diff -u orig-switch_core_sqldb.c switch_core_sqldb.c --- orig-switch_core_sqldb.c 2014-04-05 08:38:09.547441223 -0500 +++ switch_core_sqldb.c 2014-04-05 09:45:58.916440649 -0500 @@ -3483,7 +3483,7 @@ if (switch_test_flag((&runtime), SCF_CLEAR_SQL)) { char sql[512] = ""; - char *tables[] = { "complete", "interfaces", NULL }; + char *tables[] = { "interfaces", NULL }; int i; const char *hostname = switch_core_get_hostname(); @@ -3494,6 +3494,7 @@ } switch_cache_db_execute_sql(sql_manager.dbh, "delete from aliases where sticky=0", NULL); + switch_cache_db_execute_sql(sql_manager.dbh, "delete from complete where sticky=0", NULL); switch_cache_db_execute_sql(sql_manager.dbh, "delete from nat where sticky=0", NULL); switch_cache_db_execute_sql(sql_manager.dbh, "create index alias1 on aliases (alias)", NULL); switch_cache_db_execute_sql(sql_manager.dbh, "create index tasks1 on tasks (hostname,task_id)", NULL); Though, again.. I would question the need for that whole block at the top. ------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 4/4/2014 9:03:08 AM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
This is a perfect project for someone to learn a little C on, We all have to start somewhere. :P -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Apr 3, 2014, at 2:18 PM, bruce@sqls.net wrote:
Thank you very much Steven! I hadn't seen any message you sent previously! That's perfect and will work great.
Thanks everybody for all the hand holding :)
------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: bruce@sqls.net Cc: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 4/3/2014 1:52:37 PM Subject: Re: Re[2]: [Freeswitch-users] Configure aliases and auto-complete on start up.
I sent a mail with that - in case you didn't see it:
https://wiki.freeswitch.org/wiki/Mod_lua#Lua_scripts_at_startup
https://wiki.freeswitch.org/wiki/Mod_lua#Make_API_calls_directly_from_Lua_co...
Check the first link.
AGAIN, JIRA... Now for the 2nd time today there is a fix with no jira to reference. See https://jira.freeswitch.org/browse/FS-5832 On Sat, Apr 5, 2014 at 10:00 AM, <bruce@sqls.net> wrote:
Well, Brian, you may be right.
I was trying to figure out how it worked and figured it probably stored the values in the FS database. So I opened that up and saw the tables and noticed both the complete and aliases database has a "sticky" integer field. So I tried the stickyadd sub-command for complete in fs_cli and it worked and created a record in the complete table with the sticky field set to 1. Great. Then I shut down FS and all the values (even those with sticky = 0) were still in the table. Then I started FS and everything was wiped out. I compared this to the aliases table where only the sticky=0 records got wiped out.
So, I'm a bit hazy on C but I tried to hunt down how it works.. It looks like in mod_commands.c the complete and alias commands get registered as console command and that points back to the function switch_console_set_complete/alias in switch_console.c. In that function the code for "stickyadd" is already there for complete.
So, the final culprit seems to be switch_core_sqldb.c where it clears/rebuilds the db when FS is started. There's a line in there for the alias table to delete all non-sticky records but the complete table seems to be totally different. There's a section around line 3484 that makes an array of complete, interfaces, and NULL then walks that array and deletes everything in the tables. I think the NULL just causes the for loop to exit out. So, all that code is just for two tables it seems.
So, I don't know if there's a reason for that block of code at all. I would think the safest is to just remove complete from the array and replicate a similar line below like the alias table has. But I'm more curious if just taking that whole block out and then creating a line for complete and interfaces below would be even better and more consistent with everything else. Or at the least, remove all the array/loop business since it's a lot of code to loop over 1 item (once complete is removed) :)
So, on the safe side, from a fresh git clone here's me learning C Brian. Of course I don't really know if any of this is right and I just starting using freeswitch last week and I haven't actually ran freeswitch with this code... So, well.. try at your own risk I guess, but it looks pretty straight forward to me.
diff -u orig-switch_core_sqldb.c switch_core_sqldb.c
--- orig-switch_core_sqldb.c 2014-04-05 08:38:09.547441223 -0500 +++ switch_core_sqldb.c 2014-04-05 09:45:58.916440649 -0500 @@ -3483,7 +3483,7 @@
if (switch_test_flag((&runtime), SCF_CLEAR_SQL)) { char sql[512] = ""; - char *tables[] = { "complete", "interfaces", NULL }; + char *tables[] = { "interfaces", NULL }; int i; const char *hostname = switch_core_get_hostname();
@@ -3494,6 +3494,7 @@ }
switch_cache_db_execute_sql(sql_manager.dbh, "delete from aliases where sticky=0", NULL); + switch_cache_db_execute_sql(sql_manager.dbh, "delete from complete where sticky=0", NULL); switch_cache_db_execute_sql(sql_manager.dbh, "delete from nat where sticky=0", NULL); switch_cache_db_execute_sql(sql_manager.dbh, "create index alias1 on aliases (alias)", NULL); switch_cache_db_execute_sql(sql_manager.dbh, "create index tasks1 on tasks (hostname,task_id)", NULL);
Though, again.. I would question the need for that whole block at the top.
------ Original Message ------ From: "Brian West" <brian@freeswitch.org> To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 4/4/2014 9:03:08 AM Subject: Re: [Freeswitch-users] Configure aliases and auto-complete on start up.
This is a perfect project for someone to learn a little C on, We all have to start somewhere. :P -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com
T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
On Apr 3, 2014, at 2:18 PM, bruce@sqls.net wrote:
Thank you very much Steven! I hadn't seen any message you sent previously! That's perfect and will work great.
Thanks everybody for all the hand holding :)
------ Original Message ------ From: "Steven Ayre" <steveayre@gmail.com> To: bruce@sqls.net Cc: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Sent: 4/3/2014 1:52:37 PM Subject: Re: Re[2]: [Freeswitch-users] Configure aliases and auto-complete on start up.
I sent a mail with that - in case you didn't see it:
https://wiki.freeswitch.org/wiki/Mod_lua#Lua_scripts_at_startup
https://wiki.freeswitch.org/wiki/Mod_lua#Make_API_calls_directly_from_Lua_co...
Check the first link.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
participants (7)
-
Adelia C.
-
Anthony Minessale
-
Brian West
-
bruce@sqls.net
-
Ken Rice
-
Russell Treleaven
-
Steven Ayre