diff options
author | Peter Kozak <spag@golwen.net> | 2013-03-01 05:23:45 -0500 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-03-01 05:23:45 -0500 |
commit | 6de79d3edf6dfc0212b417751151bd6c5ab35740 (patch) | |
tree | db896187398933d974577d419cda5937fa70d8b8 | |
parent | b8884e1b15ee25486ed33b7455e5a9a783b136f9 (diff) |
pass call forwarding to CallForwarding class
-rw-r--r-- | misc/freeswitch/scripts/common/sip_account.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/common/sip_account.lua b/misc/freeswitch/scripts/common/sip_account.lua index 5b1ea56..90fa379 100644 --- a/misc/freeswitch/scripts/common/sip_account.lua +++ b/misc/freeswitch/scripts/common/sip_account.lua @@ -16,6 +16,7 @@ function SipAccount.new(self, arg) self.log = arg.log; self.database = arg.database; self.record = arg.record; + self.domain = arg.domain; return object; end @@ -140,3 +141,24 @@ function SipAccount.call_state(self) return state; end + + +function SipAccount.call_forwarding_on(self, service, destination, destination_type, timeout, source) + + if not self.call_forwarding then + require 'common.call_forwarding'; + self.call_forwarding = common.call_forwarding.CallForwarding:new{ log = self.log, database = self.database, parent = self, domain = self.domain }; + end + + return self.call_forwarding:call_forwarding_on(service, destination, destination_type, timeout, source) +end + + +function SipAccount.call_forwarding_off(self, service, source, delete) + if not self.call_forwarding then + require 'common.call_forwarding'; + self.call_forwarding = common.call_forwarding.CallForwarding:new{ log = self.log, database = self.database, parent = self, domain = self.domain }; + end + + return self.call_forwarding:call_forwarding_off(service, source, delete) +end |