freeswitch中lua脚本支持的函数有哪些?

static swig_lua_method swig_CoreSession_methods[]= {
    { "insertFile", _wrap_CoreSession_insertFile},
    { "answer", _wrap_CoreSession_answer},
    { "print", _wrap_CoreSession_print},
    { "preAnswer", _wrap_CoreSession_preAnswer},
    { "hangup", _wrap_CoreSession_hangup},
    { "hangupState", _wrap_CoreSession_hangupState},
    { "setVariable", _wrap_CoreSession_setVariable},
    { "setPrivate", _wrap_CoreSession_setPrivate},
    { "getPrivate", _wrap_CoreSession_getPrivate},
    { "getVariable", _wrap_CoreSession_getVariable},
    { "process_callback_result", _wrap_CoreSession_process_callback_result},
    { "say", _wrap_CoreSession_say},
    { "sayPhrase", _wrap_CoreSession_sayPhrase},
    { "hangupCause", _wrap_CoreSession_hangupCause},
    { "getState", _wrap_CoreSession_getState},
    { "recordFile", _wrap_CoreSession_recordFile},
    { "originate", _wrap_CoreSession_originate},
    { "destroy", _wrap_CoreSession_destroy},
    { "setDTMFCallback", _wrap_CoreSession_setDTMFCallback},
    { "speak", _wrap_CoreSession_speak},
    { "set_tts_parms", _wrap_CoreSession_set_tts_parms},
    { "set_tts_params", _wrap_CoreSession_set_tts_params},
    { "collectDigits", _wrap_CoreSession_collectDigits},
    { "getDigits", _wrap_CoreSession_getDigits},
    { "transfer", _wrap_CoreSession_transfer},
    { "read", _wrap_CoreSession_read},
    { "detectSpeech", _wrap_CoreSession_detectSpeech},
    { "playAndGetDigits", _wrap_CoreSession_playAndGetDigits},
    { "playAndDetectSpeech", _wrap_CoreSession_playAndDetectSpeech},
    { "streamFile", _wrap_CoreSession_streamFile},
    { "sleep", _wrap_CoreSession_sleep},
    { "flushEvents", _wrap_CoreSession_flushEvents},
    { "flushDigits", _wrap_CoreSession_flushDigits},
    { "setAutoHangup", _wrap_CoreSession_setAutoHangup},
    { "setHangupHook", _wrap_CoreSession_setHangupHook},
    { "ready", _wrap_CoreSession_ready},
    { "bridged", _wrap_CoreSession_bridged},
    { "answered", _wrap_CoreSession_answered},
    { "mediaReady", _wrap_CoreSession_mediaReady},
    { "waitForAnswer", _wrap_CoreSession_waitForAnswer},
    { "execute", _wrap_CoreSession_execute},
    { "sendEvent", _wrap_CoreSession_sendEvent},
    { "setEventData", _wrap_CoreSession_setEventData},
    { "getXMLCDR", _wrap_CoreSession_getXMLCDR},
    { "begin_allow_threads", _wrap_CoreSession_begin_allow_threads},
    { "end_allow_threads", _wrap_CoreSession_end_allow_threads},
    { "get_uuid", _wrap_CoreSession_get_uuid},
    { "get_cb_args", _wrap_CoreSession_get_cb_args},
    { "check_hangup_hook", _wrap_CoreSession_check_hangup_hook},
    { "run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback},
    { "consoleLog", _wrap_CoreSession_consoleLog},
    { "consoleLog2", _wrap_CoreSession_consoleLog2},
    {0,0}
};

第一列就是函数名,可以直接在lua脚本中调用。

如 session:getVariable("uuid");

代码位于:src\mod\languages\mod_lua\mod_lua_wrap.cpp

这些函数的具体实现在:\src\switch_cpp.cpp

你可能感兴趣的:(lua,开发语言,freeswitch)