Hi! Seems to be mod_verto have no sound with Firefox 34. Even on demo site....
Hi all Is it possible to execute lua script when gateway try to register to know if it successfull or failed? The same question as for internal users. Thanks. -- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk
Are you trying to do monitoring? If you are, there are easier ways to do that On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote:
Hi all
Is it possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users. Thanks.
-- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Sorry for late answer You may put a nagios and do active or even better passive monitoring. That way if someone gets unregistered and shouldnt you will bet an allert. 2014-12-26 3:34 GMT-05:00 <poliv78@yahoo.co.uk>:
Здравствуйте, Luis. Yes, you are right. Can you please tell how to do that? With event socket?
Вы писали 25 декабря 2014 г., 23:24:12:
Are you trying to do monitoring? If you are, there are easier ways to do that On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users. Thanks.
-- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
*-- С уважением, Poliv78 * mailto:poliv78@yahoo.co.uk <poliv78@yahoo.co.uk>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
We monitor registrations (internal and external) via event socket (esl). We subscribe on the register events (all needed data is in there) and then store the results into memcache, grouped by internal/external and successfull/unsuccessfull registers. Then writing a Nagios or a Munin plugin is rather easy with any programming language, as you only need to generate some console output. Best regards Peter On 01/01/15 02:13, Luis Daniel Lucio Quiroz wrote:
Sorry for late answer
You may put a nagios and do active or even better passive monitoring. That way if someone gets unregistered and shouldnt you will bet an allert.
2014-12-26 3:34 GMT-05:00 <poliv78@yahoo.co.uk <mailto:poliv78@yahoo.co.uk>>:
????????????, Luis. Yes, you are right. Can you please tell how to do that? With event socket?
?? ?????? 25 ??????? 2014 ?., 23:24:12:
Are you trying to do monitoring? If you are, there are easier ways to do that On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk <mailto:poliv78@yahoo.co.uk>> wrote: Hi all
Is it possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users. Thanks.
-- ? ?????????, Poliv78 mailto:poliv78@yahoo.co.uk <mailto:poliv78@yahoo.co.uk>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
/-- ? ?????????, Poliv78 /mailto:poliv78@yahoo.co.uk
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- With kind regards Peter Steinbach Telefaks Services GmbH mailto:lists (att) telefaks.de Internet: www.telefaks.de
You could just look at the log for failed attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote:
Hi all
Is it possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users. Thanks.
-- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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 cant fire a script on register... Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk" <poliv78@yahoo.co.uk> wrote:
Здравствуйте, David. Yes I know that, thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible.
Вы писали 25 декабря 2014 г., 23:33:41:
You could just look at the log for failed attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users. Thanks.
-- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Hi, I use the following line in “autoload_configs/lua.conf.xml” to monitor de register state of my gateways: <hook event="CUSTOM" subclass="sofia::gateway_state" script="catch-event-gateway.lua"/> And put in your scripts directory the file catch-event-gateway.lua with the following code to see what happens: freeswitch.consoleLog("notice",”event ==== sofia::gateway_state =====\n") freeswitch.consoleLog("notice"," event\n" .. event:serialize()) Also, for internal users register events, you can try the same code with the following “subclass” events: sofia::register_failure sofia::register sofia::expire sofia::register_attempt sofia::unregister sofia::pre_register Regards JCM From: Ken Rice <krice@freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: viernes, 26 de diciembre de 2014, 11:30 To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] How to execute lua script on register? You cant fire a script on register... Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk" <poliv78@yahoo.co.uk> wrote: Здравствуйте, David. Yes I know that, thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible. Вы писали 25 декабря 2014 г., 23:33:41: You could just look at the log for failed attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all Is it possible to execute lua script when gateway try to register to know if it successfull or failed? The same question as for internal users. Thanks. -- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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 _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon .com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/li stinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershtt p://www.freeswitch.org
Thank you very much and happy new year.
Hi, I use the following line in “autoload_configs/lua.conf.xml” to monitor de register state of my gateways: <hook event="CUSTOM" subclass="sofia::gateway_state" script="catch-event-gateway.lua"/>
And put in your scripts directory the file catch-event-gateway.lua with the following code to see what happens: freeswitch.consoleLog("notice",”event ==== sofia::gateway_state =====\n") freeswitch.consoleLog("notice"," event\n" .. event:serialize())
Also, for internal users register events, you can try the same code with the following “subclass” events: sofia::register_failure sofia::register sofia::expire sofia::register_attempt sofia::unregister sofia::pre_register
Regards JCM
From: Ken Rice <krice@freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: viernes, 26 de diciembre de 2014, 11:30 To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] How to execute lua script on register?
You cant fire a script on register... Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably
On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk" <poliv78@yahoo.co.uk> wrote:
Здравствуйте, David. Yes I know that, thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible.
Вы писали 25 декабря 2014 г., 23:33:41:
You could just look at the log for failed attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users. Thanks.
-- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- С уважением, Poliv78 mailto:poliv78@yahoo.co.uk
Hello guys, Thanks for the tip below. Suppose I want to run a Lua daemon or a NodeJS application to interept and process sofia::register and sofia:unregister subclasses, what do I need to substitute for the script="catch-event-gateway.lua"/> parameter in the "autoload_configs/lua.conf.xml'' (in case of Lua) or the alternation for an ESL application? Much obliged, Abdul Hakeem -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of poliv78@yahoo.co.uk Sent: Tuesday, December 30, 2014 9:49 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] How to execute lua script on register? Thank you very much and happy new year.
Hi, I use the following line in "autoload_configs/lua.conf.xml" to monitor de register state of my gateways: <hook event="CUSTOM" subclass="sofia::gateway_state" script="catch-event-gateway.lua"/>
And put in your scripts directory the file catch-event-gateway.lua with the following code to see what happens: freeswitch.consoleLog("notice","event ==== sofia::gateway_state =====\n") freeswitch.consoleLog("notice"," event\n" .. event:serialize())
Also, for internal users register events, you can try the same code with the following "subclass" events: sofia::register_failure sofia::register sofia::expire sofia::register_attempt sofia::unregister sofia::pre_register
Regards JCM
From: Ken Rice <krice@freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: viernes, 26 de diciembre de 2014, 11:30 To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] How to execute lua script on register?
You cant fire a script on register... Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably
On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk" <poliv78@yahoo.co.uk> wrote:
úÄÒÁ×ÓÔ×ÕÊÔÅ, David. Yes I know that, thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible.
÷Ù ÐÉÓÁÌÉ 25 ÄÅËÁÂÒÑ 2014 Ç., 23:33:41:
You could just look at the log for failed attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users. Thanks.
-- ó Õ×ÁÖÅÎÉÅÍ, Poliv78 mailto:poliv78@yahoo.co.uk
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- ó Õ×ÁÖÅÎÉÅÍ, Poliv78 mailto:poliv78@yahoo.co.uk _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Why would you do this? With any kind of registration load this is going to be horrible for CPU performance... Every time fire this lua script there is no job control is fire and forget, it spawns a new thread and if it hangs there is nothing you can do short of restarting freeswitch. Now, if you look at mod_sofia, you will notice that you can push all the internal data tables to an external database such as PostgreSQL... This allows you to see the state of every registered endpoint. Also if you really want a script to monitor things, simply attach to ESL and only subscribe to the events you want to see. This allows you to use whatever language you want with job control. On 12/29/14, 9:06 PM, "Jaime" <jaimecm@gmail.com> wrote:
Hi, I use the following line in “autoload_configs/lua.conf.xml” to monitor de register state of my gateways: <hook event="CUSTOM" subclass="sofia::gateway_state" script="catch-event-gateway.lua"/>
And put in
your scripts directory the file catch-event-gateway.lua with the following code to see what happens: freeswitch.consoleLog("notice",”event ==== sofia::gateway_state =====\n") freeswitch.consoleLog("notice"," event\n" .. event:serialize())
Also, for internal users register events, you can try
the same code with the following “subclass” events: sofia::register_failure
sofia::register sofia::expire sofia::register_attempt sofia::unregister
sofia::pre_register
Regards JCM From: Ken Rice
<krice@freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: viernes, 26 de diciembre de 2014, 11:30 To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] How to execute lua script on register?
You cant fire a script on register...
Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably
On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk"
<poliv78@yahoo.co.uk> wrote:
Здравствуйте, David. Yes I know that,
thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible.
Вы писали 25
декабря 2014 г., 23:33:41:
You could just look at the log for failed
attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it
possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users.
Thanks.
-- С уважением, Poliv78
mailto:poliv78@yahoo.co.uk
_________________________________________________
________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Offici
al FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cl uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/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
______________________________________________________________
___________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Officia
l FreeSWITCH Sites http://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.clue con .com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/ li stinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-usershtt p://www.freeswitch.org
___________________________
______________________________________________ Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org http://www.freeswitchsolutions.com Official
FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cl uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/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
I agree with Ken, there are better ways to do this. Maybe off topic: I noticed a bug with how the hook event subclass string (in lua.conf) is compared to the event subclass. For example subclass="sofia::register" matches sofia::register, sofia::register_attempt and sofia::register_failure event subclasses. Also something like subclass="ia::register_atte" works (matches sofia::register_attempt) Looks like it's searching for a substring. I should probably open a jira. On 30 December 2014 at 16:40, Ken Rice <krice@freeswitch.org> wrote:
Why would you do this?
With any kind of registration load this is going to be horrible for CPU performance... Every time fire this lua script there is no job control is fire and forget, it spawns a new thread and if it hangs there is nothing you can do short of restarting freeswitch.
Now, if you look at mod_sofia, you will notice that you can push all the internal data tables to an external database such as PostgreSQL... This allows you to see the state of every registered endpoint.
Also if you really want a script to monitor things, simply attach to ESL and only subscribe to the events you want to see. This allows you to use whatever language you want with job control.
On 12/29/14, 9:06 PM, "Jaime" <jaimecm@gmail.com> wrote:
Hi, I use the following line in “autoload_configs/lua.conf.xml” to monitor de register state of my gateways: <hook event="CUSTOM" subclass="sofia::gateway_state" script="catch-event-gateway.lua"/>
And put in
your scripts directory the file catch-event-gateway.lua with the following code to see what happens: freeswitch.consoleLog("notice",”event ==== sofia::gateway_state =====\n") freeswitch.consoleLog("notice"," event\n" .. event:serialize())
Also, for internal users register events, you can try
the same code with the following “subclass” events: sofia::register_failure
sofia::register sofia::expire sofia::register_attempt sofia::unregister
sofia::pre_register
Regards JCM
From: Ken Rice
<krice@freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: viernes, 26 de diciembre de 2014, 11:30 To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] How to execute lua script on register?
You cant fire a script on register...
Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably
On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk"
<poliv78@yahoo.co.uk> wrote:
Здравствуйте, David. Yes I know that,
thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible.
Вы писали 25
декабря 2014 г., 23:33:41:
You could just look at the log for failed
attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it
possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users.
Thanks.
-- С уважением, Poliv78
mailto:poliv78@yahoo.co.uk
_________________________________________________
________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Offici
al FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cl uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/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
______________________________________________________________
___________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Officia
l FreeSWITCH Sites http://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.clue con .com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/ li stinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-usershtt p://www.freeswitch.org
___________________________
______________________________________________ Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org http://www.freeswitchsolutions.com
Official
FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cl uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- Dušan Dragić
Yep you should open a jira on this.... On 12/31/14, 10:23 AM, "Dušan Dragić" <dragic.dusan@gmail.com> wrote:
I agree with Ken, there are better ways to do this.
Maybe off topic: I
noticed a bug with how the hook event subclass string (in lua.conf) is compared to the event subclass. For example subclass="sofia::register" matches sofia::register, sofia::register_attempt and sofia::register_failure event subclasses. Also something like subclass="ia::register_atte" works (matches sofia::register_attempt)
Looks like it's searching for a substring.
I should probably open a jira.
On 30 December 2014 at 16:40, Ken Rice
<krice@freeswitch.org> wrote: Why would you do this?
With any kind of registration load this is going to be horrible for CPU performance... Every time fire this lua script there is no job control is fire and forget, it spawns a new thread and if it hangs there is nothing you can do short of restarting freeswitch.
Now, if you look at mod_sofia, you will notice that you can push all the internal data tables to an external database such as PostgreSQL... This allows you to see the state of every registered endpoint.
Also if you really want a script to monitor things, simply attach to ESL and only subscribe to the events you want to see. This allows you to use whatever language you want with job control.
On 12/29/14, 9:06 PM, "Jaime" <jaimecm@gmail.com> wrote:
Hi, I use the following line in “autoload_configs/lua.conf.xml” to monitor de register state of my gateways: <hook event="CUSTOM" subclass="sofia::gateway_state"
script="catch-event-gateway.lua"/>
And put in
your scripts directory the file catch-event-gateway.lua with the following code to see what happens: freeswitch.consoleLog("notice",”event ====
sofia::gateway_state =====\n") freeswitch.consoleLog("notice"," event\n"
.. event:serialize())
Also, for internal users register events, you can try
the same code with the following “subclass” events:
sofia::register_failure
sofia::register sofia::expire
sofia::register_attempt sofia::unregister
sofia::pre_register
Regards JCM
From: Ken Rice
<krice@freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: viernes, 26 de diciembre de 2014, 11:30 To: FreeSWITCH Users Help
<freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] How
to execute lua script on register?
You cant fire a script on register...
Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably
On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk"
<poliv78@yahoo.co.uk> wrote:
Здравствуйте, David. Yes I know that,
thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible.
Вы писали 25
декабря 2014 г., 23:33:41:
You could just look at the log for failed
attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it
possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users.
Thanks.
-- С уважением, Poliv78
mailto:poliv78@yahoo.co.uk
_________________________________________________
________________________ Professional FreeSWITCH Consulting
Services:
consulting@freeswitch.org http://www.freeswitchsolutions.com
Offici
al FreeSWITCH
http://confluence.freeswitch.org http://www.cl
uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman
/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt
ions/freeswitch-users
--
Ken
http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
irc
.freenode.net #freeswitch Twitter: @FreeSWITCH
______________________________________________________________
___________ Professional FreeSWITCH Consulting
Services:
consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Officia
l FreeSWITCH Sites
http://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.clue
con .com
FreeSWITCH-users mailing
list
FreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/>> li stinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt
ions/freeswitch-usershtt p://www.freeswitch.org
___________________________
______________________________________________ Professional FreeSWITCH
Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official
FreeSWITCH Sites
http://www.freeswitch.org http://confluence.freeswitch.org
uecon.com
FreeSWITCH-users mailing
list
FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman
/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt
ions/freeswitch-users
-- Ken http://www.FreeSWITCH.org
http://www.ClueCon.com http://www.OSTAG.org irc.freenode.net #freeswitch
Twitter: @FreeSWITCH
_________________________________________________________________________> Professional FreeSWITCH Consulting Services: consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org http://confluence.freeswitch.org
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
-- Dušan
Dragić
______________________________________________________________________
___ Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org http://www.freeswitchsolutions.com Official
FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cl uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/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
FS-7121 .. the problem isn't in mod_lua *** Happy New Year! On 31 December 2014 at 17:50, Ken Rice <krice@freeswitch.org> wrote:
Yep you should open a jira on this....
On 12/31/14, 10:23 AM, "Dušan Dragić" <dragic.dusan@gmail.com> wrote:
I agree with Ken, there are better ways to do this.
Maybe off topic: I
noticed a bug with how the hook event subclass string (in lua.conf) is compared to the event subclass. For example subclass="sofia::register" matches sofia::register, sofia::register_attempt and sofia::register_failure event subclasses. Also something like subclass="ia::register_atte" works (matches sofia::register_attempt)
Looks like it's searching for a substring.
I should probably open a jira.
On 30 December 2014 at 16:40, Ken Rice
<krice@freeswitch.org> wrote: Why would you do this?
With any kind of registration load this is going to be horrible for CPU performance... Every time fire this lua script there is no job control is fire and forget, it spawns a new thread and if it hangs there is nothing you can do short of restarting freeswitch.
Now, if you look at mod_sofia, you will notice that you can push all the internal data tables to an external database such as PostgreSQL... This allows you to see the state of every registered endpoint.
Also if you really want a script to monitor things, simply attach to ESL and only subscribe to the events you want to see. This allows you to use whatever language you want with job control.
On 12/29/14, 9:06 PM, "Jaime" <jaimecm@gmail.com> wrote:
Hi, I use the following line in “autoload_configs/lua.conf.xml” to monitor de register state of my gateways: <hook event="CUSTOM" subclass="sofia::gateway_state"
script="catch-event-gateway.lua"/>
And put in
your scripts directory the file catch-event-gateway.lua with the following code to see what happens: freeswitch.consoleLog("notice",”event ====
sofia::gateway_state =====\n") freeswitch.consoleLog("notice"," event\n"
.. event:serialize())
Also, for internal users register events, you can try
the same code with the following “subclass” events:
sofia::register_failure
sofia::register sofia::expire
sofia::register_attempt sofia::unregister
sofia::pre_register
Regards JCM
From: Ken Rice
<krice@freeswitch.org> Reply-To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Date: viernes, 26 de diciembre de 2014, 11:30 To: FreeSWITCH Users Help
<freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] How
to execute lua script on register?
You cant fire a script on register...
Your options are ESL to monitor it (which you can write in lua) or luarun and have a lua script constantly running processing register events... The external script would probably
On 12/26/14 2:39 AM, "poliv78@yahoo.co.uk"
<poliv78@yahoo.co.uk> wrote:
Здравствуйте, David. Yes I know that,
thanks. But I want to monitor all registrations. Simply put in database fail or success. I know I can use ESL for that. But lua is more handy here and I would like to know if it's possible.
Вы писали 25
декабря 2014 г., 23:33:41:
You could just look at the log for failed
attempts. On Dec 25, 2014 1:21 PM, <poliv78@yahoo.co.uk> wrote: Hi all
Is it
possible to execute lua script when gateway try to register to know if it successfull or failed?
The same question as for internal users.
Thanks.
-- С уважением, Poliv78
mailto:poliv78@yahoo.co.uk
_________________________________________________
________________________ Professional FreeSWITCH Consulting
Services:
consulting@freeswitch.org http://www.freeswitchsolutions.com
Offici
al FreeSWITCH
http://confluence.freeswitch.org http://www.cl
uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman
/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt
ions/freeswitch-users
--
Ken
http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
irc
.freenode.net #freeswitch Twitter: @FreeSWITCH
______________________________________________________________
___________ Professional FreeSWITCH Consulting
Services:
consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Officia
l FreeSWITCH Sites
http://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.clue
con .com
FreeSWITCH-users mailing
list
FreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/>> li stinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt
ions/freeswitch-usershtt p://www.freeswitch.org
___________________________
______________________________________________ Professional FreeSWITCH
Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official
FreeSWITCH Sites
http://www.freeswitch.org http://confluence.freeswitch.org
uecon.com
FreeSWITCH-users mailing
list
FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman
/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt
ions/freeswitch-users
-- Ken http://www.FreeSWITCH.org
http://www.ClueCon.com http://www.OSTAG.org irc.freenode.net #freeswitch
Twitter: @FreeSWITCH
_________________________________________________________________________> Professional FreeSWITCH Consulting Services: consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org http://confluence.freeswitch.org
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
-- Dušan
Dragić
______________________________________________________________________
___ Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org http://www.freeswitchsolutions.com
Official
FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cl uecon.com
FreeSWITCH-users mailing
list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- Dušan Dragić
participants (9)
-
Abdul Hakeem
-
David Villasmil Govea
-
Dušan Dragić
-
Igor Olhovskiy
-
Jaime
-
Ken Rice
-
Luis Daniel Lucio Quiroz
-
Peter Steinbach
-
poliv78@yahoo.co.uk