Using event consumer immediately after session:hangup -- uuid = session.uuid session:hangup for e in (function() return con:pop(1) end) do -- psudo code -- if e.uuid == uuid and e.event_type == reporting then .... end note this is not safe since you may miss the event before you do con:pop, then maybe you can try non-blocking con:pop() ... not tested, just an idea. Anyway, doing inline bill is not recommended. 2010/3/15 Aloysius Lloyd <lloyd.aloysius@gmail.com>:
Hi All, I have the following simple Lua script answer a inbound call then dial another number and bridge the call. Is there any way to get the call duration or billing sec using the session:getVariable( );
-- answer the call session:answer(); -- sleep a second session:sleep(1000); -- Initiate an outbound call obSession = freeswitch.Session("sofia/gateway/voipms/14165555555",session) obSession:execute("sched_hangup","+60 alloted_timeout"); -- bride the call freeswitch.bridge(session, obSession); -- hangup session:hangup();
Thank you Lloyd _______________________________________________ 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