[Freeswitch-users] Hangup hook on last channel

Alexey Melnichuk alexeymelnichuck at gmail.com
Thu Nov 26 13:37:06 MSK 2015


Suppose I have Lua script which do
  api:executeString("originate {api_hangup_hook='lua 
hook.lua'}user/100,user/101 &echo")

I need execute `lua hook.lua` only once when entire `originate`
was finished.
Problem that hangup_hook called twice (once for each channel).
Is threr any way to know in hangup_hook that this is last one.
Or is there any other way to do this.
My Lua script should be able create several sessions (originate) like

  while ... do
    api:executeString("originate ...")
  end

So I do not think I can create freeswitch.Session.
Also I do not like use `loobpack` and do originate via
loopback to Lua application and manage session there.





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