This object allows your script to inject an event in FreeSWITCH, which will then be a full member of the FreeSWITCH Event System:
--Create Custom event event = freeswitch.Event("custom", "dial::dial-result") event:addBody("dial_record_id: " .. dial_record_id .. " " .. "call_disposition: " .. Disposition .. " " .. "campaign_number: " .. Campaign .. " " .. "called_number: " .. dial_num .." ") event:fire();
Events sent this way can interact with FreeSWITCH core itself, or with modules, or be consumed by custom modules or applications. See in Chapter 11, ESL - FreeSWITCH Controlled by Events about the role of events in FreeSWITCH.
For a complete example, see the following section.