summaryrefslogtreecommitdiff
path: root/misc/freeswitch
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-04-11 10:47:24 +0200
committerPeter Kozak <spag@golwen.net>2013-04-11 10:47:24 +0200
commitf89c54f914741e2aaa6d4910cd33eaa2bd7fedf3 (patch)
tree409e1c901f1975c04d8e4d0a6f61a78413964af8 /misc/freeswitch
parenta1569d8a2c8ea1716aa7ec72954407e422004c90 (diff)
pass number as greeting
Diffstat (limited to 'misc/freeswitch')
-rw-r--r--misc/freeswitch/scripts/dialplan/dialplan.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua
index 31b88fd..a8054ff 100644
--- a/misc/freeswitch/scripts/dialplan/dialplan.lua
+++ b/misc/freeswitch/scripts/dialplan/dialplan.lua
@@ -595,8 +595,6 @@ function Dialplan.voicemail(self, destination)
local voicemail_account = nil;
if common.str.to_i(destination.id) > 0 then
voicemail_account = dialplan.voicemail.Voicemail:new{ log = self.log, database = self.database, domain = self.domain }:find_by_id(destination.id);
- elseif not common.str.blank(destination.number) then
- voicemail_account = dialplan.voicemail.Voicemail:new{ log = self.log, database = self.database, domain = self.domain }:find_by_number(destination.number);
elseif self.caller.auth_account and self.caller.auth_account.class == 'sipaccount' then
voicemail_account = dialplan.voicemail.Voicemail:new{ log = self.log, database = self.database, domain = self.domain }:find_by_sip_account_id(self.caller.auth_account.id);
elseif self.caller.forwarding_number then
@@ -608,7 +606,7 @@ function Dialplan.voicemail(self, destination)
return { continue = false, code = 404, phrase = 'Mailbox not found' }
end
- voicemail_account:leave(self.caller, self.caller.forwarding_number);
+ voicemail_account:leave(self.caller, destination.number, self.caller.forwarding_number);
if self.caller:to_s("voicemail_message_len") == '' then
self.log:info('VOICEMAIL - no message saved');