Plz Help me! How to capture a session events by setInputCallback ?
30 Mar
2011
30 Mar
'11
5:17 a.m.
This script is work, but only for DTMF. function my_cb(s, type, obj, arg) if (arg) then print("type: " .. type .. "\n" .. "arg: " .. arg .. "\n"); else print("type: " .. type .. "\n"); end if (type == "dtmf") then print("digit: [" .. obj['digit'] .. "]\nduration: [" .. obj['duration'] .. "]\n"); else print(obj:serialize("xml")); end return true end blah="w00t"; $ local session = freeswitch.Session("sofia/internal/Dt002%172.16.0.49"); session:answer(); session:execute("enable_heartbeat", 5); session:setInputCallback("my_cb", "blah"); session:streamFile("/tmp/1.wav");
5699
Age (days ago)
5699
Last active (days ago)
0 comments
1 participants
participants (1)
-
Чистяков Иван