Advertisement
Borik

Untitled

Jan 29th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local event = event
  2.  
  3. local uuid = event:getHeader("Other-Leg-Unique-ID")
  4. if uuid and uuid ~= "" then
  5.         local freeswitch = freeswitch
  6.         local api = freeswitch.API()
  7.         local recording_leg_uuid = api:executeString("uuid_getvar " .. uuid .. " record_leg_uuid")
  8.         local recording_file_name = api:executeString("uuid_getvar " .. uuid .. " record_file_name")
  9.         if recording_leg_uuid == uuid and recording_file_name and recording_file_name ~= "" and event:getHeader("variable_sofia_profile_name") == "external" then
  10.                 api:executeString("uuid_broadcast " .. uuid .. " stop_record_session::" .. recording_file_name)
  11.         end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement