conf: add config files to module directories

The idea here is that the config files in the module directories will
serve as the canonical documentation of all module configuration
options.
This commit is contained in:
Ken Rice authored and Travis Cross committed 2012-03-24 04:51:08 +00:00
1 parent f65140661c
commit cac6c262bb
83 files changed
+3108

No files matched your search

@@ -0,0 +1,27 @@
function onInput(s, type, obj, arg)
{
try
{
if(type == "dtmf")
{
console_log("info", "DTMF digit: "+s.name+" ["+obj.digit+"] len ["+obj.duration+"]\n");
}
else if(type == "event" && session.getVariable("vmd_detect") == "TRUE")
{
console_log("info", "Voicemail Detected\n");
}
}
catch(e)
{
console_log("err", e + "\n");
}
return true;
}
session.answer();
session.execute("vmd", "start");
while(session.ready())
{
session.streamFile(argv[0], onInput);
}
@@ -0,0 +1,17 @@
local human_detected = false;
local voicemail_detected = false;
function onInput(session, type, obj)
if type == "dtmf" and obj['digit'] == '1' and human_detected == false then
human_detected = true;
return "break";
end
if type == "event" and voicemail_detected == false then
voicemail_detected = true;
return "break";
end
end
session:setInputCallback("onInput");
session:execute("vmd","start");