[Freeswitch-users] How to execute lua script on register?
poliv78 at yahoo.co.uk
poliv78 at yahoo.co.uk
Tue Dec 30 12:48:41 MSK 2014
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 at freeswitch.org>
> Reply-To: FreeSWITCH Users Help
> <freeswitch-users at lists.freeswitch.org>
> Date: viernes, 26 de diciembre de 2014, 11:30
> To: FreeSWITCH Users Help <freeswitch-users at 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 at yahoo.co.uk" <poliv78 at 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 at 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 at yahoo.co.uk
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at 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 at 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 at yahoo.co.uk
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list