Commit Graph

51 Commits

Author SHA1 Message Date
Alexey Melnichuk 3a5fc397ba Add. Text class to manage translate texts. 2015-11-30 10:22:55 +03:00
Alexey Melnichuk 10aa126495 Fix. json encode x-headers 2015-11-27 16:29:52 +03:00
Alexey Melnichuk 84f3fde716 Add. `send_mail` wrapper function to freeswitch.email and v_mailto.php.
Fix. Send voicemail when set unknown language/dialect.
2015-11-27 15:47:14 +03:00
Alexey Melnichuk 486004de02 Fix. problem when same session can release task multiple times.
It can be when originate has group dial-string. So it call `api_hangup_hook`
for each channel.
Now we release task in `retry.lua` only if originate success and this is same channel
which execute `exec.lua`.
If originate fail we release task `next.lua`
2015-11-26 17:23:33 +03:00
Alexey Melnichuk f34a2f330a Fix. Add `split` function (required by lazy_settings). 2015-11-24 14:26:21 +03:00
Alexey Melnichuk 871b632d49 Add. Lua part of fax_queue.
To poll active task you can run `luarun fax_queue_poll_once.lua`
2015-11-18 16:27:55 +03:00
markjcrane 71ea6a8328 Change the Database:query to make the fn optional which will make it more backwards compatible with current code. This fixes an issue with recent movement to the database class in call_forward.lua. 2015-11-10 17:04:42 -07:00
FusionPBX 573078e5bb Merge pull request #1174 from moteus/intercept_load_balance
Add. Support intercept FIFO/CallCenter/Enterprise in load balancing mode
2015-11-10 11:55:18 -07:00
Alexey Melnichuk 6711b7aa8b Merge branch 'master' into intercept_load_balance
# Conflicts:
#	resources/install/scripts/intercept_group.lua
2015-11-10 12:30:45 +03:00
Alexey Melnichuk ddaae7eec5 Update follow_me.lua
1. Use `cache` class so now it generates memcache events.
2. Do not use nested if (simplify code)
3. Use local variables.
4. Remove redundant checks.
2015-11-05 18:02:08 +03:00
markjcrane e7530d8bec Add the functions to the path for channel_utils. 2015-11-03 16:44:51 -07:00
markjcrane 758d6b9f53 Add functions to the config require 'resources.functions.config' 2015-11-03 16:41:59 -07:00
FusionPBX 747722da5b Merge pull request #1179 from moteus/call_flow
Fix small bugs and clear code in call_flow.
2015-11-03 03:30:02 -07:00
FusionPBX e008fbd8c2 Merge pull request #1186 from moteus/cache_emit_event
Add. `cache` class emit MEMCACHE events.
2015-11-03 03:19:36 -07:00
Alexey Melnichuk 7187766c11 Update comment. 2015-10-26 12:27:14 +03:00
Alexey Melnichuk fdb6e818a9 Use database class 2015-10-25 10:05:44 +03:00
Alexey Melnichuk fb3fb16002 Merge branch 'master' into show_channels 2015-10-25 10:00:05 +03:00
Alexey Melnichuk 8bbf8d6777 Use local variables. 2015-10-25 09:57:20 +03:00
FusionPBX 14f0eb66a8 Merge pull request #1152 from moteus/database_class
Add. database class
2015-10-24 19:50:43 -06:00
Alexey Melnichuk ac724d46b6 Add. cache `switchname` 2015-10-20 20:29:57 +03:00
Alexey Melnichuk c7c299e050 Fix. Use `api show channels like` did not work on fusion with BDR. 2015-10-20 15:15:42 +03:00
Alexey Melnichuk 8afafe6beb Add. `cache` class emit MEMCACHE events. 2015-10-06 16:01:24 +04:00
Alexey Melnichuk 5cf2e9acd0 Fix small bags and clear code in call_flow.
Move code to turn on/off BLF to separate function.
```Lua
presence_in.turn_lamp( toggle == "false",
  call_flow_feature_code.."@"..domain_name,
  call_flow_uuid
);
```

Close temp file in call_flow_monitor because on Windows it prevent to remove it.
Connect/release to database inside call_flow_monitor loop.
Check successful connection to database in call_flow_monitor loop so monitor did not crash
if connection temporary lost.
2015-10-02 14:02:13 +04:00
Alexey Melnichuk 5fab1a34f7 Add. Support intercept FIFO/CallCenter/Enterprise in load balancing mode.
Change. `intercept.lua` and `intercept_group.lua` merge in one `intercept.lua` file.
Call `intercept.lua` without arguments behave like `intercept_group.lua`.
2015-09-25 15:30:57 +04:00
Alexey Melnichuk e5a0134ec6 Fix. Intercept enterprise ring group.
With enterprise call each outbound channel has its own call_uuid.
But we have to use `intercept` for call_uuid of inbound channel.
2015-09-22 19:33:41 +04:00
Alexey Melnichuk 7191eae559 Fix. `cache.del` method.
Fix. cache.set returns boolean value.
Add. basic self_test
2015-09-15 18:02:46 +04:00
Alexey Melnichuk 6304c470cf Fix. load `file_exists` function 2015-09-10 14:36:30 +04:00
Alexey Melnichuk ebb61f955c Add. database class
```Lua
local Database = require "resources.functions.database"
local dbh = Database.new('system')

--get the domain_uuid
if (domain_uuid == nil) and (domain_name ~= nil) then
  local sql = "SELECT domain_uuid FROM v_domains "
  sql = sql .. "WHERE domain_name='" .. domain_name .. "';"
  domain_uuid = dbh:first_value(sql)
end

local dbh_switch = Database.new('switch') -- check also SQLite file.

local row = dbh_switch:first_row(sql)
if row then
  ...
end
```
2015-09-10 14:29:13 +04:00
Alexey Melnichuk dcc08a2265 Fix. Not found is treat as success for delete operation. 2015-09-09 16:52:52 +04:00
Alexey Melnichuk 528d04b942 Add. Basic log class. 2015-09-09 10:45:49 +04:00
Alexey Melnichuk 4cb99be806 Add. Basic cache class
Fix. When memcache stopped and mod_memcache loaded dialplan did not build from DB.
2015-09-09 10:22:14 +04:00
markjcrane db488b5917 Change require("mime") to require("mime.core"). 2015-08-27 13:27:24 -06:00
markjcrane 601c532013 Change '//' to '/'. This fixes a problem where its calling require when it should call dofile. 2015-08-11 20:25:34 -06:00
Alexey Melnichuk 3e16e69adb Revert "Revert "Change. Use `require "resources.functions.config"` to load co…" 2015-08-11 05:06:33 +03:00
FusionPBX 2a2dd209df Revert "Change. Use `require "resources.functions.config"` to load config file." 2015-08-10 11:50:29 -06:00
FusionPBX 559aa61fbd Merge pull request #1053 from moteus/require_config
Change. Use `require "resources.functions.config"` to load config file.
2015-08-10 11:31:35 -06:00
Alexey Melnichuk d8b2ec5271 Fix. add functions/count.lua to preview commit. 2015-08-10 13:01:49 +04:00
Alexey Melnichuk 703b61636a Change. Use only `require` to load function.
Fix. Remove multiple definition of same function.
2015-08-10 12:43:06 +04:00
markjcrane d8c9c3910f Remove trailing tabs. 2015-07-23 17:50:16 -06:00
markjcrane 32b782d3f0 Prevent nil errors in settings.lua. 2015-07-22 09:42:35 -06:00
Alexey Melnichuk 3da348fff0 Change. Use `require "resources.functions.config"` to load config file.
Change. Move `script_dir` definition into config file.
2015-07-22 13:20:51 +04:00
markjcrane 63c6031da6 Change 'is null' to 'is not null'. 2015-07-10 08:00:08 -03:00
markjcrane c0a6c121f2 Prevent nil from causing problems with functions/settings.lua. 2015-07-08 15:36:33 -03:00
Mark Crane b17c8061c8 Connect to the database before using this function and it will use the database connection. 2015-04-15 03:13:10 +00:00
Mark Crane 3bac48cebb Add the original base64 class I was using as an alternative if mime is not loaded. 2015-04-06 06:25:42 +00:00
Mark Crane 30bb3e211d Improve the speed of base64 encode and decode. 2015-03-31 18:48:00 +00:00
Mark Crane d69df4ba65 Add base64 decode to the IVR Menu. 2015-03-31 00:50:13 +00:00
Mark Crane 73c6cec61c No need for this include again as the scripts_dir is already set by this point. 2015-03-24 07:05:28 +00:00
Mark Crane 5b9e7deeb2 Add lua function settings. 2015-03-02 18:07:06 +00:00
Mark Crane 80c1c9076c Add a general copy function for lua and use it with voicemail forward. 2013-07-11 19:50:09 +00:00