[Freeswitch-users] Fwd: hook to event or startup script which will hook to events?

Mimiko vbvbrj at gmail.com
Sun Mar 26 21:58:59 MSD 2017


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.



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