freeswitch.Event

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.46.229