[Freeswitch-users] Fwd: hook to event or startup script which will hook to events?
Michael Jerris
mike at jerris.com
Mon Mar 27 06:59:12 MSD 2017
The second one needs to init a whole new lua env for each event. It will
be much heavier.
On Sun, Mar 26, 2017 at 2:02 PM Mimiko <vbvbrj at gmail.com> wrote:
> I've asked this a year ago and did go on with script start-up.
>
> But I'm still wandering:
>
> Did someone compared performance on capturing events using with different
> hook types:
>
> 1) Run start-up scripts and do
> eventconsumer=freeswitch.EventConsumer("CUSTOM","callcenter::info")
> 2) <hook event="CUSTOM" subclass="callcenter::info"
> script="catch-event.lua"/>
>
> In case of first method, the lua script is read once into memory and is in
> executing state all time the FS is running. To reload script you need to
> restart FS.
>
> In case of second method, the lua script is read and executed for every
> event. No need to restart FS if script is changed. But it is read from file
> system every time an event, it is hooked, arise.
>
> If events came rarely, then hook event is better in my opinion. If events
> come lots, then the script should run always. But if events come, for
> example, 10-20 per sec, what will be better method to use from performance
> point of view?
>
> --
> Mimiko desu.
>
> _________________________________________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170327/fd9c5f7f/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list