mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-01 17:53:49 +00:00
Fix the pin number used in the dial string and switch session:execute for api:execute. Thanks soapee01 for reporting and helping with the bug.
This commit is contained in:
@@ -74,19 +74,13 @@ if ( session:ready() ) then
|
||||
|
||||
--authenticate the user
|
||||
if (pin_number) then
|
||||
--get the pin number from the caller
|
||||
min_digits = string.len(pin_number);
|
||||
max_digits = string.len(pin_number)+1;
|
||||
caller_pin_number = session:playAndGetDigits(min_digits, max_digits, max_tries, digit_timeout, "#", "phrase:voicemail_enter_pass:#", "", "\\d+");
|
||||
min_digits = string.len(pin_number);
|
||||
max_digits = string.len(pin_number)+1;
|
||||
else
|
||||
--get the vm_password
|
||||
min_digits = 1;
|
||||
max_digits = 12;
|
||||
vm_password = session:playAndGetDigits(min_digits, max_digits, max_tries, digit_timeout, "#", "phrase:voicemail_enter_pass:#", "", "\\d+");
|
||||
if (debug["sql"]) then
|
||||
freeswitch.consoleLog("NOTICE", "unique_id ".. unique_id .. " vm_password " .. vm_password .. "\n");
|
||||
end
|
||||
min_digits = 1;
|
||||
max_digits = 12;
|
||||
end
|
||||
caller_pin_number = session:playAndGetDigits(min_digits, max_digits, max_tries, digit_timeout, "#", "phrase:voicemail_enter_pass:#", "", "\\d+");
|
||||
|
||||
--get the dial_string, and extension_uuid
|
||||
sql = "SELECT * FROM v_extensions as e, v_domains as d ";
|
||||
@@ -197,7 +191,7 @@ if ( session:ready() ) then
|
||||
end
|
||||
end
|
||||
--clear the cache
|
||||
session:execute("memcache", "delete directory:"..db_extension.."@"..context);
|
||||
api:execute("memcache", "delete directory:"..db_extension.."@"..context);
|
||||
else
|
||||
session:streamFile("phrase:voicemail_fail_auth:#");
|
||||
session:hangup("NORMAL_CLEARING");
|
||||
|
||||
Reference in New Issue
Block a user