diff options
author | spag <spag@golwen.net> | 2013-02-20 17:56:56 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-02-20 17:56:56 +0100 |
commit | 324201adeff30eaf3a81aacd2f6789ed50658a0b (patch) | |
tree | d8dc76baab0b3cccbeae8f64c850ce59a886b1a5 /misc/freeswitch/scripts/dialplan/dtmf.lua | |
parent | 32fac3575ab52dba1a39925d61465702ee11eb9c (diff) |
digit_duration_min added
Diffstat (limited to 'misc/freeswitch/scripts/dialplan/dtmf.lua')
-rw-r--r-- | misc/freeswitch/scripts/dialplan/dtmf.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/dialplan/dtmf.lua b/misc/freeswitch/scripts/dialplan/dtmf.lua index 4dbd35f..e7d459a 100644 --- a/misc/freeswitch/scripts/dialplan/dtmf.lua +++ b/misc/freeswitch/scripts/dialplan/dtmf.lua @@ -17,12 +17,17 @@ function Dtmf.new(self, arg) self.bleg = arg.bleg self.digit_timeout = arg.digit_timeout or 5; self.router = arg.router; + self.digit_duration_min = arg.digit_duration_min or 500; return object; end function Dtmf.detect(self, caller, sequence, digit, duration, calee) + if not tonumber(duration) or duration < self.digit_duration_min then + return; + end + local timestamp = os.time(); if timestamp - sequence.updated > self.digit_timeout then sequence.digits = digit; |