Commit Graph

1238 Commits

Author SHA1 Message Date
FusionPBX 2373b38630 Update play_greeting.lua
Voicemail greeting will not play after being transferred from IVR #1749. Replace session:streamFile( with session:execute("playback", fixes this problem.
2016-07-15 08:43:53 -06:00
Alexey Melnichuk 10f460cfd2 Fix. Lua can not generate non CUSTOM event with subclass. (#1756)
There 2 way.
First one generate `MEMCACHE` event without subclass
Second generate `CUSTOM` event with subclass e.g. `fusion::memcache`
2016-07-14 11:33:54 -06:00
Alexey Melnichuk 1834be5042 Add. Support `onInterval` method to EventConsumer class (#1747)
* Add. Support `onInterval` method to EventConsumer class

Usage
```Lua
-- execute action each 30 sec
events:onInterval(30*1000, function() end)

-- execute action once after 5 min
events:onIntervalOnce(5*60*1000, function() end)
```

* Fix. Remove timers

* Fix. Reset timer before callback

It allows stop timer inside callback.
Also it produce more accurate interval invocation
if callback take quite a long time.
E.g. Interval = 10 sec and callback took 5 sec then
if we reset timer after this callback then gap between
invocation will be 15 sec.

* Add. Timers now have TimeEvent class type.

Add. `reset` method to IntervalTimer class.

```Lua
events:onIntervalOnce(1000, function(self, timer)
  -- timer has type TimeEvent

  -- restart timer so it will be invoke again
  timer:restart()

  -- or reset new interval
  -- timer:reset(5000)
end)
```

* Fix. Typo in variable name
2016-07-13 09:43:51 -06:00
Alexey Melnichuk 9da40dc7b1 Fix. Fusion set rate=48000 to all streams. (#1746) 2016-07-12 08:09:54 -06:00
Mafoo 9bc0fded96 BugFix-Add PROJECT_PATH for lua (#1740)
added project_path for lua to use where it needs to build urls
2016-07-08 13:12:37 -06:00
Alexey Melnichuk a52e9c3626 Add. EventConsumer class. (#1741)
Rewrite MWI and CallFlow subscribe handlers based on EventConsumer class.
Also on my test VirtualBox/Debian system Lua function `os.clock` produce
very strange result(delta ~0.015 for 1 second) so I switch to `os.time`.
Now to to stop this background Lua scripts it possible send CUSTOM event
with subclass `fusion::XXX::shutdown`. Where XXX is `mwi` or `flow`.

Usage of EventConsumer class
```Lua
-- create new object with timeout one minute
local events = EventConsumer.new(60000)

-- bind to some FS event
events:bind("SHUTDOW", function(self, name, event) ... end)

-- bind to another FS event with subclass
events:bind("CUSTOM::fusion::mwi::shutdown", function(self, name, event) ... end)

-- handle timeout event
events:on("TIMEOUT", function(self, name) ... end)

--run event loop
events:run()
```
2016-07-08 13:10:43 -06:00
FusionPBX 1a76484b5f Update local_stream.conf.lua
Set a default rate for chime list if one is not provided.
2016-07-06 16:27:22 -06:00
FusionPBX 0f84dbc9cd Update page.lua
Update page.lua add support for rtp_secure_media=true.
2016-07-06 14:48:00 -06:00
Alexey Melnichuk 79cdf70ebd Add. Support multiple events. (#1736)
Now subscriber stops and remove pid files when FS shutdown.
So if you use Status->Services you will see correct status.
2016-07-06 12:37:16 -06:00
Alexey Melnichuk 9e5ce425b5 Fix. `call_flow_monitor` use new field call_flow_alternate_label instead old `call_flow_anti_label` (#1730) 2016-07-04 09:32:22 -06:00
Alexey Melnichuk dc3575c05c Fix. Send message count in each MWI notify. (#1728)
* move send event code to separate function
* move get message count to separate function
2016-07-01 10:08:55 -06:00
FusionPBX 35149d0ff3 Update page.lua
Add leading zero support to page.lua.
2016-06-30 15:08:14 -06:00
FusionPBX 2b9311031d Update local_stream.conf.lua
Add a more generic query to make this code compatible with MySQL/Mariadb.
2016-06-30 10:03:32 -06:00
Alexey Melnichuk ba857b6acf Add. Event handler to support MWI. (#1720)
* Add. Event handler to support MWI.

* Fix. store cache only when get data from memcache

* Change. Use UUID as PID.
2016-06-30 09:55:37 -06:00
Alexey Melnichuk a6a6a1aaac Fix. `event_socket_mkdir` for Windows system. (#1724) 2016-06-30 08:11:52 -06:00
FusionPBX 3ca2b832ca Update local_stream.conf.lua
Changes to the conditions that build the name to make sure it builds it correctly.
2016-06-30 01:40:48 -06:00
FusionPBX 4bbf0983bf Update local_stream.conf.lua
Use the name/rate for global music on hold or domain_name/name/rate for local. If configuring as a default leave the /rate off the end of the string.
2016-06-30 01:18:17 -06:00
FusionPBX 05ff231f9a Update local_stream.conf.lua
Remove the default stream will handle it another way.
2016-06-29 17:19:21 -06:00
FusionPBX d884a18cc0 Update local_stream.conf.lua
Use UUID for the name of the stream. Add a default to handle systems using default.
2016-06-29 16:25:17 -06:00
FusionPBX 0354e137ea Update local_stream.conf.lua
Check if row.music_on_hold_timer_name is empty.
2016-06-28 12:24:31 -06:00
Alexey Melnichuk 873c7ad0a2 Change. remove CC configuration dependencies from mod_commands. (#1711) 2016-06-27 07:52:29 -06:00
Alexey Melnichuk ebfa71298d Add. option to store setting in memcache. (#1707) 2016-06-26 11:43:32 -06:00
Alexey Melnichuk 5a58cf1436 Fix. Set default values for max length settings (#1706) 2016-06-26 11:42:33 -06:00
Alexey Melnichuk c0739c4d40 Fix. Load required libraries in voicemail. (#1705) 2016-06-26 09:03:21 -06:00
FusionPBX c3463392eb Update ivr.conf.lua
If the IVR Menu recordings are base64 don't update the path.
2016-06-24 18:40:14 -06:00
markjcrane 4757123d4b Get the settings.recordings.storage_type for the ivr menu using xml handler. 2016-06-24 14:55:16 -06:00
Alexey Melnichuk 0a0383db9a Add. Handler for SUBSCRIBE method for call flow application. (#1701)
* Add. Handler for SUBSCRIBE method for call flow application.

Usage:
1. Run form fs_cli `luarun call_flow_subscribe`
2. Create new call flow extension and set feature code to `flow+<EXTENSION>`(e.g. `flow+401`).
3. Set on the phone BLF key to `flow+401`

This code based on `mod_valet_parking`.

* Add. prevent running 2 copy of script.

Remove some unused vars and simplify implementation.

* Fix. Use correct protocol for send event.

* Fix. Do escape SQL arguments

* Fix. escape `+` sign in call flow extension.
2016-06-24 10:32:19 -06:00
Mafoo f88691618e Enhance-make voicemail length configurable (#1702)
allow the voicemail max_lengths to be configured from domain/default
settings
2016-06-24 10:28:47 -06:00
FusionPBX 23fb7118a6 Update local_stream.conf.lua
Music on hold set the default timer name to 'soft'.
2016-06-23 16:42:12 -06:00
markjcrane af0c7cfe6a Uncomment two lines to restore the debug check. 2016-06-23 15:46:59 -06:00
markjcrane f9d191c520 Add full path to the music on hold chime list. 2016-06-23 15:29:14 -06:00
markjcrane 8e8454ff19 Update music_on_hold_timer to timer_name. 2016-06-23 13:35:53 -06:00
markjcrane ef43f49b9e Add sip_h_X- prefix to the accountcode in pin_number.lua. 2016-06-22 15:05:33 -06:00
markjcrane 4b17d5dac2 Add domain_uuid check to pin_number.lua. 2016-06-22 13:52:43 -06:00
markjcrane dfb6489334 Remove some trailing spaces and update the copyright year in pin_number.lua. 2016-06-21 19:37:25 -06:00
markjcrane 5db79b687c Add database support to pin_number.lua. 2016-06-21 19:34:17 -06:00
markjcrane 2955b8447e Increase the voicemail greeting length that is allowed to 90 seconds. 2016-06-21 18:35:05 -06:00
markjcrane 07c038308f Correct the variable name. 2016-06-13 19:06:59 -06:00
markjcrane 2e0de74055 Replace the variable with the path to the sounds directory. 2016-06-13 19:04:23 -06:00
markjcrane 787502ea48 Rename local_stream.lua to local_stream.conf.lua. 2016-06-13 18:50:41 -06:00
markjcrane 366bf5fbea Add local_stream.lua to xml_handler. 2016-06-13 18:30:32 -06:00
FusionPBX 3ad7fe027c Update call_flow.lua
Call flow feature code update to play the right audio file.
2016-06-12 14:14:52 -06:00
FusionPBX a66324a242 Update call_flow.lua
Inside call_flow.lua rename anti to alternate.
2016-06-12 14:02:57 -06:00
FusionPBX dcb9a655cd Update call_flow.lua
Rename the variables in call_flow.lua to match. New variables call_flow_sound and call_flow_alternate_sound.
2016-06-11 10:02:31 -06:00
Alexey Melnichuk 6095609c5a Add. Support sound prompts on call flow. (#1645)
This file uses new way to load recordings from DB.
2016-06-11 07:33:16 -06:00
Chris Black 96e1ad2cf4 Add ability for directory to use mod_flite or mod_cepstral (#1644) 2016-06-10 16:07:11 -06:00
Alexey Melnichuk 644996b1f7 Add. Support `bridge` mode to call forward from Lua. (#1631) 2016-06-08 07:33:55 -06:00
Chris Black 4a4a613902 remove SMS (#1612) 2016-05-24 12:57:46 -06:00
Chris Black 2d05685103 Add support for twilio (#1610)
added support for twilio and made it a bit easier to add support for
other carriers as well.
2016-05-24 02:02:36 -06:00
Chris Black a8d5033953 Flowroute SMS (#1603)
* Fix Yealink provisioning for contacts/groups

Fix the Yealink provision templates to allow for directory_extensions,
groups and users.

* Fix group_uuid and user_uuid messup

* Yealink directory and provisioning changes

Includes the changes from PR 1582 with some fixes to the SQL.

Also merged all the directory_* options into ONE directory.xml

Will need to call the it with any of these:

http://mydomain/app/provision/?file=directory.xml&contacts=groups

http://mydomain/app/provision/?file=directory.xml&contacts=users

http://mydomain/app/provision/?file=directory.xml&contacts=extensions

http://mydomain/app/provision/?file=directory.xml&contacts=all

* Flow route SMS
2016-05-19 12:09:49 -06:00
Alexey Melnichuk 6df1dae2a9 Fix. Use correct database for Call Center while FS load. (#1597)
Problem that `mod_commands` may load after than `mod_callcenter` and there no function `global_getvar`
So current code just create database with name `INVALID COMMAND!.db`.
2016-05-13 08:03:48 -06:00
FusionPBX edfe01b0c5 Update intercept.lua
Account for core.db in intercept.lua
2016-05-12 23:06:45 -06:00
markjcrane 6ba188dc5e Commented out the new database handle --local dbh = Database.new('switch') as it has a bug when freeswitch is using the DSN with the PostgreSQL driver. This change works around this problem by using the original database handler. 2016-05-12 20:43:57 -06:00
FusionPBX 06f6f1302e Merge pull request #1553 from moteus/intercept_direction
Add. optional intercept only inbound/outbound calls.
2016-04-18 22:54:03 -06:00
FusionPBX 4230d3b414 Merge pull request #1450 from daniel-lucio/patch-3
Wrong variable in freeswitch.email
2016-04-18 21:20:44 -06:00
Alexey Melnichuk 15fbc21b4d Add. optional intercept only inbound/outbound calls.
Note.
  * `inbound` is call to some extension
  * `outbound` is call from some extension to external number.

Currently there no way to find call from extension to extension as `outbound`
2016-04-18 16:06:27 +03:00
markjcrane 8b5e166eda Remove contact_email from v_contacts table as this was replaced by the v_contact_emails table. 2016-04-14 10:40:25 -06:00
Alexey Melnichuk 1fea16de71 Fix. send fax file as PDF in response message 2016-04-05 13:48:50 +03:00
markjcrane 4ac03a8d1a Add a missing permission on backup. 2016-04-04 19:51:22 -06:00
markjcrane 11f4fea479 Change expire["sofia_conf"] to expire["sofia"] and expire["acl_conf"] to expire["acl"]. Then add a default value to prevent nil errors when the conf.lua script has not been updated. 2016-04-02 08:32:43 -06:00
markjcrane 5f5ae59c41 Remove the the condition on the direct dial. 2016-03-29 20:57:47 -06:00
markjcrane 0e73d0d3dc Rollback changes to is_local.lua determined that switching to regex would lower perfomance adding an 'or' with a search for prefix would perform better. 2016-03-27 20:44:14 -06:00
markjcrane abef8c5d3c A global domain is optional. Using public context instead. 2016-03-27 04:46:01 -06:00
FusionPBX b03d978bb0 Merge pull request #1512 from schraegervogel/master
initialize call_context
2016-03-27 04:25:22 -06:00
FusionPBX 5906618ff3 Merge pull request #1510 from moteus/databas_role
Add. `role` to be able select database backend in constructor.
2016-03-25 15:52:47 -06:00
schraegervogel 39754a505e initialize call_context
If you use xml_locate dialplan from fs_cli, you get an error, to prevent this I intialized call_context with the "domain"-var
2016-03-25 17:28:10 +01:00
Alexey Melnichuk 423e0ab503 Add. `role` to be able select database backend in constructor.
To configure use `database.backend` option
It can be a string value like `database.backend = 'native'`.
So it will always use same backend.
Or it can be a table value like
```Lua
database.backend = {
  main   = 'native';
  base64 = '';
}
```
Role `database.backend.main` is predefined and it equal to `native` if not set.
If there no role when Database class creates or role unknown role `main` is used
```Lua
dbh = Database.new('system') -- uses role `main`
dbh = Database.new('system', 'main') -- same as previews
dbh = Database.new('system', 'base64') -- uses role `base64`
dbh = Database.new('system', 'test')   -- uses role `main`
```
2016-03-25 10:04:48 +03:00
FusionPBX c5e804cb3c Update acl.conf.lua
Change expire acl.conf to acl_conf
2016-03-25 01:00:43 -06:00
markjcrane 66e01ef9dc Change to the new context require renaming two variables to be consistent and to prevent a problem. 2016-03-24 23:08:23 -06:00
markjcrane e1b6087e04 Use regex with is_local. 2016-03-24 18:43:51 -06:00
markjcrane 785071cde6 In the IVR Menu make sure direct dial checks if the destination is an extension before sending the call to it. 2016-03-23 12:49:32 -06:00
markjcrane db3c649aaf Update the disa.lua to prevent errors when caller hangs up before the destination is called. 2016-03-23 11:42:20 -06:00
markjcrane 8a0331925a Fix a spelling mistake in xml handler ivr.conf.lua. 2016-03-20 00:49:21 -06:00
markjcrane 57e212ff42 Fix direct dial for IVR using the xml handler. 2016-03-19 18:13:49 -06:00
markjcrane ed2898aa33 Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2016-03-11 14:21:28 -07:00
markjcrane 8588a4caea Get the domain_name from the array. 2016-03-11 14:21:08 -07:00
FusionPBX 93c4c56da2 Merge pull request #1461 from mafoo/BugFix-ring_groups
corrected function definition
2016-03-11 13:25:20 -07:00
FusionPBX c6a68388a1 Merge pull request #1479 from mafoo/WhitespaceClean-resources/install/scripts
WhitespaceClean-resources/install/scripts
2016-03-11 13:20:17 -07:00
markjcrane 3898a18f42 Prevent custom sip port from breaking provision.lua and add prevent nil concatenation errors. 2016-03-11 10:31:11 -07:00
mafoo b7555579bf WhitespaceClean-resources/install/scripts
whitespace pass over files
for reference regex that was used s/[ \t]+(\r?\n)/\1/
2016-03-11 13:21:52 +00:00
markjcrane 11c2176a15 The last two changes to xml handler dialplan.lua did not work well with global dialplans. Removed some of the changes to fix the regression. 2016-03-11 00:58:52 -07:00
markjcrane ad7e9336dd Add missing call_direction for ring group destinations. 2016-03-10 18:10:49 -07:00
markjcrane 56c3bde940 Use a more efficient way to get the domain name for xml handler - dialplan. 2016-03-10 08:18:46 -07:00
markjcrane 39b38738d8 Increase efficiency xml handler section dialplan. 2016-03-09 13:09:25 -07:00
mafoo 49fe51710c corrected function definition
fixed bug introduced on 2/1/2016 in destination.lua
fixed bug introduced on 2/1/2016 in ring_member.lua
2016-03-09 17:54:44 +00:00
markjcrane 47ea47710c Fix the phrases_dir if statement. If the phrases_dir is not null then need to include xml from the file system. 2016-03-07 10:30:29 -07:00
markjcrane 010a237c09 Handle the phrases_dir nil in a more flexible way. 2016-03-04 15:51:10 -07:00
markjcrane 7cbb32dcd3 Ensure the phrases_dir is not nil. 2016-03-04 15:08:58 -07:00
markjcrane fb8046accb Prevent a nil error for xml handler languages. 2016-03-04 12:35:37 -07:00
markjcrane 49c3b3e991 Add ring_member.lua to app/ring_groups/resources/scripts/ring_member.lua. 2016-02-29 18:52:04 -07:00
Alexey Melnichuk 7e1481b747 Fix. FreeSWITCH also breaks loop if return string value which contain number.
```Lua
dbh:query(sql, function()
  return "1" -- breaks loop
end)
2016-02-26 14:17:28 +03:00
Alexey Melnichuk ebfcdc38be Fix. LuaSQL db backend breaks loop only on positive numbers. 2016-02-26 13:57:32 +03:00
Alexey Melnichuk c96a5bee48 Fix. ODBC db backend should breaks loop only when callback returns number ~= 0
```Lua
dbh:query(sql, function(row)
  -- return 0     -- should not break loop
  -- return true  -- should not break loop
  return 1 -- should break loop
end)
```
2016-02-26 13:52:27 +03:00
FusionPBX d111ae4630 Merge pull request #1443 from moteus/database_backend
Database backend
2016-02-25 08:39:07 -07:00
Luis Daniel Lucio Quiroz 1b95a5eff4 Wrong variable in freeswitch.email
https://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.email   

same as my other pull request
2016-02-24 19:59:54 -05:00
Alexey Melnichuk f498e84716 Fix. Add `#` to caller ID name when call from IVR 2016-02-24 16:28:38 +03:00
Alexey Melnichuk 65e014d73e Move scripts to separate dirs. 2016-02-24 14:44:50 +03:00
markjcrane de53ae149e Fix a spelling mistake in the log message in dialplan.lua. 2016-02-22 13:17:04 -07:00
Alexey Melnichuk e784cb3d6f Fix. `unpack` moved to `table` in Lua 5.2 2016-02-20 15:22:28 +03:00
Alexey Melnichuk a33230db15 Fix. `connected` method on LuaSQL backend. 2016-02-20 15:20:38 +03:00
Alexey Melnichuk 5afec68fb1 Add. Support multiple database backends.
```Lua
local Database = require 'resources.functions.database'

-- Default backend configured via xml_handler.db_backend = 'native'
dbh = Database.new("system")

-- To use other backends you can use
dbh = Database.backend.luasql("system")
```
2016-02-19 17:03:45 +03:00
FusionPBX 80758e8826 Merge pull request #1441 from moteus/page_caller_id_name
Fix. set caller id name in `page` application
2016-02-19 00:56:19 -07:00
markjcrane acce2040ab Company directory allow only setting the first or last name. 2016-02-16 13:05:25 -07:00
Alexey Melnichuk 7b20358284 Fix. set caller id name in `page` application 2016-02-16 13:36:14 +03:00
markjcrane bbd05a9c2d Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2016-02-10 13:49:46 -07:00
markjcrane d61c7815f9 Prevent nil from crashing the lua script. 2016-02-10 13:49:31 -07:00
Alexey Melnichuk c31047470d Fix. Declare vars in correct scope. 2016-02-05 10:20:09 +03:00
Alexey Melnichuk 1bafdba135 Update log. 2016-02-04 20:00:12 +03:00
Alexey Melnichuk 9a70297909 Fix. Infinity loop. IVR ignores `max_failures`. 2016-02-04 19:42:42 +03:00
Alexey Melnichuk 5512276370 Fix. Allow multiple actions in IVR 2016-02-04 19:05:24 +03:00
Alexey Melnichuk 3327ecae91 Use logger class. 2016-02-04 16:05:35 +03:00
Alexey Melnichuk 883b73f6ac Simplify code 2016-02-04 13:20:30 +03:00
Alexey Melnichuk 2ad2448346 Merge remote-tracking branch 'upstream/master' into ivr_menu 2016-02-04 12:14:27 +03:00
FusionPBX 6e3792bf05 Merge pull request #1420 from moteus/fix_partial_dialplan
Fix. Do not build context if there error.
2016-02-03 21:32:15 -07:00
markjcrane f525d2bbda Remove trailing whitespaces. 2016-02-03 19:03:16 -07:00
markjcrane 578d279315 Include the mkdir function for the IVR Menu. 2016-02-03 10:43:22 -07:00
markjcrane 4bb748a300 Base64 - Make sure the directory structure exists. 2016-02-03 10:01:43 -07:00
FusionPBX ea4d3ba86a Merge pull request #1421 from moteus/cache_support
Fix. cache.support always returns `false`
2016-02-03 08:31:27 -07:00
Alexey Melnichuk 9c51243035 Fix. Can not pick any options after IVR play `streamfile.lua`
Rewrite ivr functions to easy read code.
2016-02-03 16:53:22 +03:00
Alexey Melnichuk 1f5269720f Fix. Use domain name in streamfile.lua.
Fix. Unset input callback after play file done.
2016-02-03 15:20:50 +03:00
Alexey Melnichuk a77e6ec87f Fix. cache.support always returns `false` 2016-02-02 19:54:23 +03:00
Alexey Melnichuk 48b3aa2917 Add. debug message to log. 2016-02-02 19:32:27 +03:00
Alexey Melnichuk 057d487ee7 Fix. Do not build context if there error. 2016-02-02 19:08:19 +03:00
markjcrane be2c690a1d Call center used with xml handler does not have access to the session. Remove session and replace it with api global_getvar as session is not always available. 2016-02-01 11:16:23 -07:00
markjcrane 9ec2da1b7e LUA function format_ringback the session:getVariable must have quotes around the 'hold_music' string. Next check to see if the ringback is nil or an empty string first before trying to use 'match'. 2016-01-31 10:10:08 -07:00
FusionPBX 012655ab23 Merge pull request #1415 from mafoo/Enhance-ringback
Enhance ringback
2016-01-29 07:24:14 -07:00
mafoo 02566294cb converted callcenter to use common function 2016-01-29 11:26:21 +00:00
mafoo ef31b4082d Converted uses of ringback to common function 2016-01-28 15:51:50 +00:00
markjcrane 495bafd3f5 Remove the recordings_dir with automatic domain_name and add domain_name in a few places where it was missing. 2016-01-25 16:53:09 -07:00
markjcrane 7d375d05de Add recording file handling to the ivr xml handler. 2016-01-25 16:32:27 -07:00
markjcrane a018674597 Add domain name to the recordings path in ivr_menu.lua. 2016-01-25 16:31:04 -07:00
markjcrane 19945b5095 Change the comment in check_password.lua. 2016-01-22 12:24:18 -07:00
Alexey Melnichuk e4e6fe92a9 Fix. Do not prompt password if there no mailbox. 2016-01-22 11:37:34 +03:00
FusionPBX fad8343802 Merge pull request #1387 from mafoo/BugFix-Languages
BugFixes in languages.lua
2016-01-15 21:42:48 -07:00
Matthew Vale 0111fff25b BugFixes in languages.lua
removed extra ;'s
fix file_handle:close to be inside the if null check
2016-01-15 10:35:19 +00:00
Alexey Melnichuk 49a6a760dd Change. Move `fax_queue_*` scripts to `app/fax/resources/scripts` 2016-01-13 10:22:32 +03:00
markjcrane 06932b85f7 Show when we are clearing the cache for *78 or *79. 2016-01-12 19:34:57 -07:00
markjcrane 2a04a88b69 Add dsn_callcenter and improve the indentation. 2016-01-12 01:48:11 -07:00
markjcrane 1a49780757 Fix the FAX retry email. 2016-01-05 13:19:02 -07:00
markjcrane b9eae2a150 Another adjustment to the xml. 2016-01-04 19:33:02 -07:00
markjcrane 8ee96d3136 A few more xml adjustments for the IVR Menu and add a desription attribute for each IVR option. 2016-01-04 19:29:39 -07:00
markjcrane 23460f69c5 Fix a small bug with the ivr. 2016-01-04 19:19:39 -07:00
markjcrane 7885323d37 Update the ivr menu to use memcache with the uuid as part of the key. 2016-01-04 19:09:29 -07:00
markjcrane 499c3c8928 Continue work to make IVR menu work from XML handler. 2016-01-04 19:05:31 -07:00
markjcrane 8d604061f5 Rename ivr.lua to ivr.conf.lua. 2016-01-04 19:03:28 -07:00
markjcrane 85e28ae838 Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2016-01-04 17:16:27 -07:00
markjcrane aac6d4ff96 Using phrase uuid instead of the phrase name reason is this prevents the phrase from breaking when the phrase name is changed. 2016-01-04 17:16:14 -07:00
FusionPBX f208e06a9d Revert "cherry picked changes from 4.0 branch" 2016-01-04 13:13:48 -07:00
markjcrane 9054881d5a FusionPBX source coding standard uses tabs instead of spaces for indentation. 2016-01-04 13:04:51 -07:00
markjcrane e823b991d1 Update destination.lua some preparation to extend it further. 2016-01-04 12:56:50 -07:00
Alexey Melnichuk f50a535e02 Fix. Definition of `uuid` function in destination.lua. 2016-01-04 09:56:06 +03:00
markjcrane 8c52b1167f Change lang_path to phrases_dir in languages.lua. 2016-01-03 00:42:40 -07:00
markjcrane 16ca1ebb99 Rename ring_member.lua to destination.lua. 2016-01-02 16:38:59 -07:00
markjcrane 5f3cc182fe Move ring_member.lua to ring_groups/resources/scripts/ring_member.lua. 2016-01-02 13:21:34 -07:00
markjcrane 98355e8084 Improve ring_member.lua with consistent indentation, notes, and more if session:ready to prevent errors. 2016-01-02 13:09:28 -07:00
Matthew Vale 4fdb6e9916 cherry picked changes from 4.0 branch 2015-12-31 10:11:31 +00:00
markjcrane 7cc88761aa Add record_ext to the recordings.lua. 2015-12-23 12:02:14 -07:00
markjcrane 91a0f1370e Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2015-12-22 21:30:55 -07:00
markjcrane d8ca3245c5 AND r.enabled = 'true' shows up on two lines change one to m.enabled and then add m.enabled to the second query. 2015-12-22 21:30:36 -07:00
FusionPBX e060e53783 Merge pull request #1341 from moteus/directory_acl_directory
Fix. Generate XML for mod_directory.
2015-12-22 20:54:25 -07:00
Alexey Melnichuk 639426f1d2 Fix. Remove unused code. 2015-12-22 17:19:14 +03:00
markjcrane 56499a6cc3 Fix the ring back on the XML handler -> callcenter.conf.lua. 2015-12-21 23:31:46 -07:00
Alexey Melnichuk d1c07df479 Fix. Generate XML for mod_directory.
Fix. Generate XML for ACL only for ext which contain `cidr` attr.
Fix. Do not generate entire XML with all ext when sofia request gateways
2015-12-21 17:17:06 +03:00
markjcrane 80d0a7bdc4 Add all domain users to XML handler.directory.domain. 2015-12-20 01:01:52 -07:00
FusionPBX 538cec5669 Merge pull request #1334 from kpabijanskas/master
XML Handler incorrectly handling 'date-time' time conditions
2015-12-18 08:47:47 -07:00
markjcrane 2a5c69f18f Add 'to' variable to the first two parameters for freeswitch.email. 2015-12-15 21:10:18 -07:00
Karolis Pabijanskas 03f5396e56 This pull requests fixes XML Handler support for 'date-time' time codition. With this, date-time gets rendered as:
<condition date-time="2015-12-15 15:00~2015-12-16 15:00">

 Without this, the time condition WOULD get redered as:
 <condition field="date-time" expression="2015-12-15 15:00~2015-12-16 15:00">

 which is incorrect and would always match false in FreeSWITCH.

 FreeSWITCH docs for this are here: https://freeswitch.org/confluence/display/FREESWITCH/Time+of+Day+and+Holiday+Routing#TimeofDayandHolidayRouting-Variables

 All other time condition variables documented seem to be included in FusionPBX'es XML Handler.
2015-12-15 16:31:27 +00:00
FusionPBX 3df36af619 Merge pull request #1294 from moteus/fax_queue_mail_template
Add. mail templates for fax server responses.
2015-12-09 16:28:35 -08:00
FusionPBX 60928c5b3d Merge pull request #1303 from blackc2004/patch-19
Update directory.lua
2015-12-09 15:02:48 -08:00
blackc2004 0778fd2d2e Update index.lua 2015-12-09 14:04:59 -08:00
blackc2004 b64a94fdc6 Update directory.lua 2015-12-09 14:03:17 -08:00
Alexey Melnichuk 9e001af711 Fix. Use task db connection to build template. 2015-12-09 14:56:02 +03:00
Alexey Melnichuk c5e2441161 Add. mail templates for fax server responses. 2015-12-09 12:43:40 +03:00
markjcrane 595609e267 Prevent the conference alone sound from playing twice. 2015-12-07 16:30:03 -07:00
markjcrane ff8b838b5e After removing domain name from the default recordings dir path need to add the domain name every where the recordings directory is currently used. 2015-12-06 13:37:35 -07:00
Alexey Melnichuk 3bb00589dd Fix. send_mail without file. 2015-12-04 16:18:53 +03:00
markjcrane 3c9bac53ed Seperate Cisco 7940/7960 from Cisco SPA so that both can work with check-sync for reboot and reprovision. 2015-12-01 21:12:52 -07:00
markjcrane b2d4749559 Add check-sync support for Linksys SPA. 2015-12-01 20:48:47 -07:00
FusionPBX af49c46a6c Merge pull request #1273 from moteus/fax_queue
Add. `Tasks.send_mail_task` function to send task reply.
2015-12-01 11:01:32 -07:00
Alexey Melnichuk 019597362f Remove unused code. 2015-12-01 16:24:53 +03:00
Alexey Melnichuk 119758ed77 Add. `Tasks.send_mail_task` function to send task reply. 2015-12-01 15:46:52 +03:00
Alexey Melnichuk 62e88176c6 Fix. Remove global variable. 2015-12-01 14:35:17 +03:00
FusionPBX a074c65bed Merge pull request #1267 from moteus/fax_queue
Add. Send reply message after fax task done.
2015-11-30 11:05:19 -07:00
Alexey Melnichuk aec2777f62 Fix. Send mail when fail create outbound channel. 2015-11-30 12:08:26 +03:00
Alexey Melnichuk c9be5948c0 Add. Send reply message after fax task done. 2015-11-30 11:57:09 +03:00
Alexey Melnichuk 3a5fc397ba Add. Text class to manage translate texts. 2015-11-30 10:22:55 +03:00
Alexey Melnichuk 46aa5f8049 Change. Move fax_queue to app/fax. 2015-11-28 11:40:54 +03:00
markjcrane e0ff445922 Rename the config.php file and a few minor adjustments to install_fusionpbx. 2015-11-27 19:03:25 -07: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 990dd7b9ed Add. log session uuid 2015-11-26 17:41:48 +03:00
Alexey Melnichuk 5bc286d5e2 Fix. Remove task in next.lua (Fix preview commit) 2015-11-26 17:30:56 +03:00
Alexey Melnichuk a485be3883 Fix. Remove task in next.lua 2015-11-26 17:25:15 +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
markjcrane 331778e36c Correct the primary key of v_fax_tasks table. Coding standards require primary key to remove v_ prefix, singular form and add a _uuid postfix. Result is task_uuid has been changed to fax_task_uuid. 2015-11-25 08:51:54 -07:00
FusionPBX 8bcf55b5fc Merge pull request #1251 from moteus/fax_queue
Fax queue
2015-11-25 07:37:28 -08:00
Alexey Melnichuk 4814d20dce Fix. cleanup old tasks. 2015-11-25 13:21:02 +03:00
Alexey Melnichuk b806a92cd1 Fix. Log output in retry.lua 2015-11-25 12:42:56 +03:00
Alexey Melnichuk 3f6b772420 Add. option to work with broken `affected_rows` FS 1.4 2015-11-24 18:49:21 +03:00
Alexey Melnichuk f34a2f330a Fix. Add `split` function (required by lazy_settings). 2015-11-24 14:26:21 +03:00
markjcrane 7749088fd8 Clear the dial_string variable so that it to prevent duplicate destinations. 2015-11-22 19:07:56 -07:00
Alexey Melnichuk 5e0947813c Add. Supports MySQL/SQLite to fax queue. 2015-11-20 10:38:51 +03:00
Alexey Melnichuk 6f46b72dc8 Add. Basic fax_queue_monitor script.
To start
 From cli: `luarun fax_queue_monitor.lua`
 Autostart with FS: Add `<param name="startup-script" value="fax_queue_monitor.lua"/>` to `lua.conf.xml`
 From shell: call from `script_dir` `lua fax_queue_monitor.lua` (require installed Lua and some additional libraries).

To stop
  remove `fax_queue.tmp` file from `script_dir/run`
2015-11-19 13:19:59 +03:00
Alexey Melnichuk 2b0aa44673 Remove some log. 2015-11-18 16:41:13 +03:00
Alexey Melnichuk 86b479e520 Rome some comments. 2015-11-18 16:32:00 +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 44ec8d5942 Add voicemail record-silence-threshold variable and change the default threshold from 30 to 300. 2015-11-16 16:59:11 -07:00
Alexey Melnichuk 3de12d6d1d Fix. Call intercept - a scenario where an outgoing call can be intercepted
This is same changes as in #1209.
2015-11-12 14:11:05 +03:00
FusionPBX cd6a52b1af Merge pull request #1229 from moteus/ivr_menu_exec_without_args
Fix. IVR menu option without arguments.
2015-11-10 18:12:03 -07:00
markjcrane 7bb50d03a0 New database class was implemented in call_forward.lua when using first_value must change select * from with the specific value desired. 2015-11-10 17:26:39 -07: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
markjcrane 6cc9040787 Change enquote to quote. 2015-11-10 13:37:25 -07:00
Alexey Melnichuk b285e636cc Fix. Intercept can find wrong channel. 2015-11-10 22:41:34 +03: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 78acf51737 Fix. function name 2015-11-10 20:49:46 +03:00
Alexey Melnichuk 9f88d17e70 Fix. always escape quote. 2015-11-10 19:33:01 +03:00
Alexey Melnichuk 455a1a088f Fix. hungup_rx.lua works on Windows
1. Command should use only double quotes.
2. Application should not be quoted (I am not sure may be it is bug in FS `system` command).

So I use double quote on Windows and single quote on other system.
Also I quote strings only if they contain spaces.
To escape quote in string i just double it.
`you got "some text"` become to `you got ""some text"""`
2015-11-10 19:29:06 +03:00
Alexey Melnichuk 5052d1dce2 Fix. IVR menu option without arguments. 2015-11-10 17:56:40 +03: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
markjcrane 53702b1973 Fix a problem where the ring group is only calling one external number when there are multiple to call. 2015-11-09 18:42:29 -07:00
Alexey Melnichuk 0e5b10d265 Update. call_forward.lua script
Fix. Set outbound caller id
Remove. Nested if
Use. cache class
Use. database class
2015-11-09 16:55:35 +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
Matthew Vale b073d792d5 fix to use phrases_dir
changed phrases_dir to be dealt with inside app_defaults.php so it is retrieved once like the other paths
2015-11-03 11:16:05 +00: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
FusionPBX 5ca779d08c Merge pull request #1202 from moteus/show_channels
Fix. Use `api show channels like` did not work on fusion with BDR.
2015-11-03 03:13:27 -07:00
Matthew Vale 35762486e1 reverted so branch is consistent for patch 2015-11-02 17:32:43 +00:00
Matthew Vale fee216cc13 changed phrases_dir to be dealt with inside app_defaults.php so it is retrieved once like the other paths 2015-11-02 09:53:42 +00:00
Matthew Vale 8793159dad Fix. use settings for the phrases path rather than assuming 2015-10-30 16:16:56 +00:00
FusionPBX a555722874 Merge pull request #1214 from blackc2004/patch-10
Update directory.lua
2015-10-30 09:31:06 -06:00
Alexey Melnichuk ec162d4238 Fix. Get DTMF in IVR when using phrases. 2015-10-30 17:33:26 +03:00
markjcrane 1c6f58ca03 MWI only turn on the light for new messages. 2015-10-29 17:34:39 -06:00
blackc2004 f8388cc8f4 Update directory.lua 2015-10-29 12:26:06 -07:00
FusionPBX 4fc11ee492 Merge pull request #1209 from badcrc/master
Fix. Call intercept - a scenario where an outgoing call can be intercepted
2015-10-26 12:02:41 -06:00
koldoa 398fd08149 This fixed a scenario where an outgoing call can be picked up if the callee returns a 183 session progress with sdp 2015-10-26 17:17:02 +01: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
Alexey Melnichuk c55de4769c Merge branch 'master' into intercept_load_balance
# Conflicts:
#	resources/install/scripts/resources/functions/database.lua
2015-10-25 09:34:19 +03:00
markjcrane bf3c374e13 Play the message number first then the caller id number. 2015-10-24 21:12:43 -06:00
markjcrane 8f67f2c4c1 Add vm_say_caller_id_number option for true or false. 2015-10-24 21:00:22 -06:00
markjcrane 99fb9dca10 Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2015-10-24 20:09:54 -06:00
markjcrane 128bb6d857 Add voicemail caller id number announce as iterated. 2015-10-24 20:09:36 -06: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
markjcrane 749533b479 Fix a null error and translation for select option voicemail. 2015-10-19 20:58:16 -06:00
markjcrane 710a3fa696 Add hold music option and update the call_block dialplan. 2015-10-19 18:30:55 -06:00
markjcrane a63cbada9b Switch the hostname for conference center to switchname. 2015-10-16 10:34:54 -07:00
FusionPBX dc1c66366c Merge pull request #1197 from badcrc/master
This should do a better job detection active calls per extension in t…
2015-10-14 16:15:05 -07:00
markjcrane 5a2e78dc29 Listen for dtmf key presses when voicemail message is played. 2015-10-14 16:03:33 -07:00
koldoa b1abaccb3f This should do a better job detection active calls per extension in the ring group with skip_active 2015-10-14 12:00:09 +02:00
markjcrane 2ba48dab1e Call flow monitor reduce the sleep to 60 seconds. 2015-10-08 18:54:11 -07:00
markjcrane 33897a3abd Change xml handler load balancing to xml_handler/resources/scripts/directory/directory.lua["fs_path"] 2015-10-08 11:03:48 -07:00
markjcrane a3d64af450 Move the xml handler expire and debug settings to config.lua. 2015-10-08 08:34:35 -07:00
FusionPBX ac805f0dc0 Merge pull request #1185 from moteus/enterprise_ring_group_timout
Fix. use timeout handler in Enterprise ring group
2015-10-06 19:33:50 -07:00
markjcrane c2a4b78b79 Fix Gateways and SIP profiles for single tenant systems. 2015-10-06 19:28:57 -07:00
Alexey Melnichuk 8afafe6beb Add. `cache` class emit MEMCACHE events. 2015-10-06 16:01:24 +04:00
Alexey Melnichuk dcd382817b Fix. use timeout handler in Enterprise ring group
see e5a0134ec6 (commitcomment-13601198)
2015-10-06 11:05:15 +04:00
markjcrane c0d758be86 Add h hostname to option for the gateways. 2015-10-04 01:29:03 -06:00
markjcrane d56eeab729 Fix sip_to_user and dialed_user for voicemail. 2015-10-02 17:46:39 -06: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
markjcrane 0bf4e1b794 Remove absolute_codec_string='PCMU,PCMA' from fax_retry.lua as it is not allowing PCMA. 2015-09-30 21:01:17 -06:00
Alexey Melnichuk 7622fd4896 Change. Reduce search parent host name.
This can be done because child and parent channels have to be on same FS.
2015-09-28 11:35:12 +04:00
markjcrane 36db4dcee4 Fix the ring group missed call email body. 2015-09-27 00:52:47 -06:00
markjcrane e2eccde92f Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2015-09-26 09:00:11 -06:00
markjcrane 24652e393f After event socket class was added it created a bug in FAX email and forward. It was unable to find the new EventSocket class adding the include resolves the problem. 2015-09-26 08:59:36 -06: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
FusionPBX 2c415bdfd7 Merge pull request #1164 from moteus/intercept_enterprise_group
Fix. Intercept enterprise ring group.
2015-09-24 15:45:08 -06:00
FusionPBX 902739213a Merge pull request #1171 from rdissauer/fix/suppress-debug-messages
Fix. suppress debug messages
2015-09-24 15:19:20 -06:00
roman.dissauer e8b79cb783 forgot commenting out end 2015-09-24 09:29:57 +02:00
roman.dissauer af4e06ecd9 do not display voicemail sql debug messages 2015-09-24 09:29:57 +02:00
markjcrane 5d9bb1b9d1 Allow a device that is logged in already to be replaced with a new alternate device. 2015-09-23 20:09:16 -06:00
Alexey Melnichuk 92baa64183 Add. intercept for fifo calls 2015-09-23 14:40:05 +04:00
Alexey Melnichuk 8976d5e5b3 Add. intercept for call center calls 2015-09-23 13:08:22 +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
FusionPBX a153cef9d8 Merge pull request #1155 from moteus/cache_delete
Fix. `cache.del` method.
2015-09-15 21:04:59 -06:00
markjcrane cd0c777f6b Get the channel variable in a way that will work with hangup. 2015-09-15 10:09:16 -06:00
markjcrane 94749f105d Add multi-lingual support to the missed call emails. 2015-09-15 08:49:37 -06: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
FusionPBX 82542c6ea6 Merge pull request #1146 from badcrc/master
Random ring groups
2015-09-14 10:38:18 -06:00
FusionPBX 9e0c8cffd9 Merge pull request #1149 from moteus/cache_class
Add Log and Cache classes
2015-09-14 10:27:47 -06:00
markjcrane b3c53ae6f5 Email template add indentation to make it more readable. 2015-09-11 16:18:40 -06:00
markjcrane c21657cc7f Change the directory.lua xml parameter from sip_force_contact to sip-force-contact. 2015-09-11 14:04:38 -06: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 0bf97e79bd Change DND from loopback/*99[ext] to error/user_busy. 2015-09-08 14:38:46 -06:00
koldoa 4bba1c1faf This should add better compatibility for more database backends 2015-09-07 12:51:12 +02:00
koldoa b5e0708599 Better code for ring groups 2015-09-07 11:48:10 +02:00
koldoa 319ee702ce Script for enterling/leaving a ring group, based on the fifo code 2015-09-07 08:51:22 +02:00
koldoa 4799974811 Detection of SQL backend for random functions 2015-09-07 08:33:34 +02:00
koldoa 2047fa7859 Random strategy for ring groups 2015-09-07 08:33:34 +02:00
markjcrane be564502df This last change will enable do not disturb to update the user status which will then show in the operator panel. 2015-09-05 11:26:13 -06:00
markjcrane 84ee674f81 Fix the sql in the do_not_disturb.lua. 2015-09-05 10:42:22 -06:00
markjcrane 06ed8f2998 When *78 or *79 are used for DND update the user status and agent status. 2015-09-05 10:05:43 -06:00
markjcrane 765d34668c Restore sip_from_user and 2 lines for continue to directory.lua. 2015-09-04 02:52:14 -06:00
markjcrane 30b6c8990c Restore directory.lua - this fixes load balancing as taught in the FusionPBX Advanced Class. 2015-09-04 02:38:17 -06:00
FusionPBX 0d5ed7c416 Merge pull request #1136 from moteus/record_ring_groups
Fix. Start recording only after call start and only for certain extension
2015-08-31 11:02:37 -06:00
Alexey Melnichuk 64cdc569b0 Fix. Start recording only after call start and only for certain extension.
Fix. Always use record dir with domain name like it does `user_record` extension.
2015-08-31 15:47:06 +04:00
roman.dissauer e6fbd20cff added german voicemail templates and modified language file 2015-08-31 12:52:15 +02:00
markjcrane 27b8116368 Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2015-08-27 13:27:40 -06:00
markjcrane db488b5917 Change require("mime") to require("mime.core"). 2015-08-27 13:27:24 -06:00
Alexey Melnichuk 9ad23e65b5 Fix. Delete number-alias from cache when set DND/Follome/Forward. 2015-08-26 13:44:34 +04:00
markjcrane a49bd861ca Change directory hostname to switchname which is a little more flexible. 2015-08-22 23:25:27 -06:00
Alexey Melnichuk d7bc826c30 Fx. Comment 2015-08-21 17:20:55 +04:00
Alexey Melnichuk 148d2b42f2 Add. Flag to switch mode for building dial-string.
You can configure ether you register with UserID=number-alias or UserID=Extension
In both cases to dial user you should use `user/<number-alias>@domain` or `user_data <number-alias>@domain`

Need test setting of presence_id for case when UserID=Extension.
2015-08-21 16:57:13 +04:00
Alexey Melnichuk fdfa8f715f Change. Store data in cache based on UserID.
Change. Support register with AuthID==UserID==Extension for extension with number-alias.

1. We need only one record in memcache.
  When we get SIP request we can find record by userid.
  When we want check AuthID we do `user_data userid@domain attr id`
  which also search record by userid.
2. We do not need check AuthID if we get record from DB. There already has check.

So we can reduce number of request to
* if there no record in memcached
 - one memcache get (returns not found)
 - database auth
 - one memcache set
* if record in memcache
 - one memcache get to retrieve XML
 - one memcache get to check Extension==AuthID
2015-08-21 16:18:52 +04:00
FusionPBX 9066f19b72 Merge pull request #1116 from moteus/verify_number_alias
Fix. Verify number-alias and user id.
2015-08-20 18:45:45 -06:00
Alexey Melnichuk 897b32be80 Fix. Verify number-alias and user id.
This replaces `inbound-reg-force-matching-username` profile option.
So if your extension has number-alias you can use
UserID=number-alias
AuthID=Extension

It also supports such check on INVITE not only on REGISTER.
2015-08-20 12:27:27 +04:00
Alexey Melnichuk 72cb20f6c4 Revert. Both legs can control of call. 2015-08-19 10:06:22 +04:00
Alexey Melnichuk 42a15cab44 Fix. Concatenate record extension 2015-08-18 15:49:56 +04:00
Alexey Melnichuk 8442ea979e Change. Use bind_bind_digit instead of bind_meta_app.
Change. Allow transfer and turn on recordings only for authorized users.
Fix. Use record_ext in recording in ring_group.

This allow configure other dtmf sequence like `*#` and `##`
2015-08-18 15:38:41 +04:00
markjcrane 2e6f90fb80 Fax keep local updates. 2015-08-16 02:01:37 -06:00
markjcrane 772474faae Update ring group rollover so that it works like standard roll over. If busy it moves to the next line. If not busy and timeout it moves to the timeout action. 2015-08-14 15:27:48 -06:00
markjcrane 1e6d8bfa26 IVR Menu allow one of the options to override direct dial to an extension. 2015-08-14 11:26:11 -06:00
markjcrane fe904dfc1c Remove an extra line and change the console message. 2015-08-14 09:47:00 -06:00
FusionPBX fe45b3c036 Merge pull request #1098 from moteus/toll_allow_forward
Set Toll Allow for call forward/follow me
2015-08-14 08:34:17 -06:00
FusionPBX 65f0ddd438 Merge pull request #1097 from moteus/toll_allow
Change. toll_allow use ordered template-list.
2015-08-14 08:33:19 -06:00
Alexey Melnichuk 46bbc28220 Change. Use toll_allow of extension who set call forward. 2015-08-14 13:27:47 +04:00
Alexey Melnichuk a85e7eb70a Fix. Off debug output 2015-08-14 12:26:34 +04:00
Alexey Melnichuk 0b11ab57de Change. toll_allow use ordered template-list.
Add. Russian toll_allow templates.

This needs because we need
89%d is mobile except 8940%d which one is international.
2015-08-14 12:07:38 +04:00
markjcrane 09c4dd79d0 Remove hostname on the acl memcache variable name. 2015-08-13 19:49:09 -06:00
markjcrane 3f9bef47ee Abbreviation for variables are discouraged because they aren't intuitive especially for those from other languages. Replace 'ep' variable no idea what it represented to 'user' which is what freeswitch calls ans extension that you register to. 2015-08-13 11:34:48 -06:00
FusionPBX c4374178a4 Merge pull request #1093 from moteus/dnd_number_alias
Fix. Use number alias to forward call to VM when DND is on.
2015-08-13 11:25:08 -06:00
Alexey Melnichuk 5f67be647d Fix. Use number alias to forward call to VM when DND is on (Lua part) 2015-08-13 13:14:46 +04:00
markjcrane d5592672f0 base_dir is not dependable as its irrelevant for freeswitch package installs replace it with settings['switch']['voicemail']['dir']. 2015-08-12 23:45:27 -06:00
markjcrane 27a72bfa59 Remove outbound restriction for intercept. 2015-08-12 23:38:46 -06:00
FusionPBX 72d489ec65 Merge pull request #1091 from moteus/intercept_outbound
Fix. Allow intercept only outbound calls.
2015-08-12 23:34:43 -06:00
markjcrane 47c8fb090d Add expire["acl.conf"] = "3600"; 2015-08-12 23:31:21 -06:00
markjcrane b44cacd07a Add acl.conf.lua to the xml handler. 2015-08-12 23:21:10 -06:00
Alexey Melnichuk ce9e2cc4d1 Fix. Allow intercept only outbound calls.
Now it is possible intercept call from local extension to the world.

Fix. intercept channels also in EARLY state.

One of my softphones return 180 Ringing with SDP (no 183 Progress).
And FreeSWITCH shows such channel as `EARLY` not as `RINGING`)
2015-08-12 10:09:56 +04:00
FusionPBX 81003e35d8 Merge pull request #1018 from moteus/number_alias_as_vm_id
Change. Use number_alias as voicemail_id.
2015-08-11 20:43:20 -06:00
markjcrane 42d9548fac XML Handler - directory.lua change ext to username. 2015-08-11 20:36:01 -06:00
FusionPBX c117b071e6 Merge pull request #1080 from moteus/dial_number_alias
Fix. Use number_alias in dial-string.
2015-08-11 20:31:42 -06:00
FusionPBX 9087c09182 Merge pull request #1081 from moteus/number_alias_as_caller_id
Fix. Use number-alias as caller_id_number variable.
2015-08-11 20:30:19 -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
FusionPBX 9f4287a9b4 Merge pull request #1087 from moteus/revert-1086-revert-1053-require_config
Change. Use `require` function to load Lua libraries
2015-08-11 20:05:48 -06:00
FusionPBX 978bec7cbd Merge pull request #1088 from moteus/number_alis_group_intercept
Fix. Group intercept extension with number alias
2015-08-11 20:05:04 -06:00
markjcrane 558c82d386 Add a break to prevent call the failover bridge statement at the same time the primary bridge statement is called. 2015-08-11 13:42:46 -06:00
Alexey Melnichuk 4639001ca3 Fix. Include config file. 2015-08-11 14:40:02 +04:00
Alexey Melnichuk c19b6cc7ee Fix. Group intercept extension with number alias 2015-08-11 14:18:25 +04: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
markjcrane 1d6c6463e7 Merge branch 'master' of https://github.com/fusionpbx/fusionpbx 2015-08-10 11:22:11 -06:00
markjcrane bec13ef258 Ring group external destinations use the | as the delimiter for fail-over. 2015-08-10 11:21:48 -06:00
FusionPBX cd21e26893 Merge pull request #1079 from moteus/temp_dir
Fix. Use `temp_dir` variable instead of hard coded `/tmp`
2015-08-10 10:25:22 -06:00
FusionPBX 983365ad41 Merge pull request #1084 from moteus/page_active_conf
Fix. Allow monitoring page conferences via `Active Conferences` app.
2015-08-10 10:23:03 -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
Alexey Melnichuk b5cacea373 Fix. Allow monitoring page conferences via `Active Conferences` app. 2015-08-10 11:43:32 +04:00
Luis Daniel Lucio Quiroz f1e082bc03 Use os.time instead of mysql native function
Odd, but on some deployments LUA wont accept unixtime stamp functions (regardless it works on CLI). So, to workaround this, lets use os.time() which it returns the same value expected.
2015-08-09 21:56:28 -06:00
Alexey Melnichuk b97ae86283 Fix. Use number-alias as caller_id_number variable. 2015-08-07 16:17:25 +04:00
Alexey Melnichuk bfa72cc78a Fix. Use number_alias in dial-string. 2015-08-07 15:18:52 +04:00
Alexey Melnichuk 630d9e020c Fix. Always use `/` separator on FS command.
Fix. Override `temp_dir` from `config.lua` file.
2015-08-07 12:11:27 +04:00
Alexey Melnichuk 785136eca9 Fix. Use `temp_dir` variable instead of hard coded `/tmp` 2015-08-07 11:52:18 +04:00
markjcrane a1fdd5c220 Fix a problem with custom public context and XMl handler. 2015-07-31 21:03:22 -06:00
markjcrane 173e9ca691 Fix fax_retry.lua for domain_name and domain_uuid. Add [FAX] to the logging to the console. 2015-07-30 19:32:18 -06:00
Alexey Melnichuk 565395c44f Fix. Correct path when user on `group_confirm_file` 2015-07-28 15:59:04 +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
Alexey Melnichuk 57808740ef Merge branch 'master' into number_alias_as_vm_id
Conflicts:
	app/hot_desking/extension_edit.php
2015-07-21 11:19:13 +04:00
FusionPBX a214b57f81 Merge pull request #1047 from moteus/page_concat_conf_name
Fix. Concat conf name in page.lua
2015-07-20 16:52:23 -06:00
markjcrane 6f9eb6ab29 After call forward has been set with feature code *72 or *74 play back the number that call forward is set to. 2015-07-20 12:59:45 -06:00
markjcrane 4fc2bbaa9f Voicemail to email send the email in the send_email.lua rather than with email.lua. So that the delete doesn't occur until after email is sent. 2015-07-20 11:40:31 -06:00
Alexey Melnichuk 4b30e652b4 Fix. Concat conf name in page.lua 2015-07-20 12:44:05 +04:00
FusionPBX 861e545541 Merge pull request #1037 from moteus/copy_voice_mail
Fix. Use OS specific copy function.
2015-07-18 12:55:05 -07:00
FusionPBX 59e4f6b91f Merge pull request #1023 from moteus/ext-dial-string
Fix. Use extension to generate dial-string in xml_handler
2015-07-18 12:54:24 -07:00
FusionPBX 064f73aa70 Merge pull request #1045 from moteus/page_domain
Page domain
2015-07-18 12:47:55 -07:00
FusionPBX 8e989c7fb6 Merge pull request #1040 from moteus/vm-phrase
Change. Use predefined phrases in vm menu.
2015-07-18 12:45:34 -07:00
Alexey Melnichuk 61f5e77cfb Fix. Use `temp_dir` to debug dialplan xml file 2015-07-16 12:56:13 +04:00
Alexey Melnichuk 78541b67ce Fix. Use correct conf name on originate 2015-07-16 12:11:57 +04:00
Alexey Melnichuk 8fbbbda5a4 Fix. Make page extension domain specific. 2015-07-16 11:50:07 +04:00
Alexey Melnichuk 3a805e1870 Change. Use predefined phrases in vm menu.
Current implementation produces not correct phrases e.g. on Russian language.
2015-07-14 13:42:05 +04:00
Alexey Melnichuk acec54be57 Fix. Use OS specific copy function. 2015-07-13 10:44:47 +04:00
markjcrane 63c6031da6 Change 'is null' to 'is not null'. 2015-07-10 08:00:08 -03:00
markjcrane ec532e8d12 Play voicemail messages with the newest messages first. 2015-07-08 15:46:34 -03:00
markjcrane c0a6c121f2 Prevent nil from causing problems with functions/settings.lua. 2015-07-08 15:36:33 -03:00
Alexey Melnichuk fec3b0f14c Fix. xml_handler/directory generate vm params based on number_alias 2015-07-07 18:16:21 +04:00
Alexey Melnichuk 1d5bb75f2d Fix. Use extension to generate dial-string in xml_handler
When uses number_alias contact should be searched by extension name.
2015-07-07 17:47:50 +04:00
FusionPBX 410cb1a268 Update confirm.lua
Add a domain_name nil check.
2015-07-04 04:16:44 -06:00
markjcrane 8b3c4ca914 Use originate_delay_start to fix the enterprise ring group delay. 2015-07-03 09:51:02 -06:00
Mark Crane cafc371c88 Fix a problem where the inbound context has public in the name with public@ as a prefix and .public as a suffix. 2015-06-30 18:42:52 +00:00
Mark Crane f994329edb FAX sure domain_uuid is set at the right time. 2015-06-30 18:01:30 +00:00
Mark Crane 88ef7714b5 Minor adjustments for confirm.lua and ring groups ensure domain_name and domain_uuid are set. 2015-06-24 19:31:53 +00:00
Mark Crane f2bbf183fa Add the call screen recording to work with call forward and follow me. 2015-06-23 23:41:15 +00:00
Mark Crane ad34763c8d Set call_screen_enabled as a variable in directory.lua. 2015-06-23 20:33:22 +00:00
Mark Crane 1510c1c631 Add extension_call_screen permission, and add call_screen_enabled to extensions/extension_edit.php. 2015-06-23 20:06:44 +00:00
Mark Crane 2f9dd5f1e0 A few more adjustments to get the ring group missed call working. 2015-06-20 04:06:20 +00:00
Mark Crane 140af2ffa2 Add missed call option to ring groups. 2015-06-20 03:43:38 +00:00
Mark Crane 6252e5bfb0 Fix call center xml handler domain. 2015-06-18 20:08:54 +00:00
Mark Crane 7cec657e76 Add a missing quote fixes a problem with call center using xml handler and fix the indentation. 2015-06-18 19:25:42 +00:00
Mark Crane 0bcea327b9 Add a missing quote fixes a problem with call center using xml handler. 2015-06-18 19:20:51 +00:00
Mark Crane cbb81d43f4 When dialing *74 clear the call forward destination which will allow it to set a new one with *73. 2015-06-18 06:55:46 +00:00
Mark Crane c296880fff Add variable for Ring Group Distinctive Ring ${domain_name} and ${local_ip_v4} 2015-06-15 23:26:02 +00:00
Mark Crane 83daf1ed73 When leaving a voicemail use the message_waiting function. 2015-06-11 06:31:10 +00:00
Mark Crane f80bc84639 Use the mwi_account under accounts -> extensions to allow sending MWI to multiple extensions. 2015-06-11 06:30:21 +00:00
luis daniel lucio quiroz 5a168e3779 load balancing fixed 2015-06-11 01:43:30 +00:00
Mark Crane c33995d84b Add ring_group_distinctive_ring to the destinations array. 2015-06-07 16:26:53 +00:00
Mark Crane 8d71798eeb Add a prefix of Alert-Info= 2015-06-07 04:10:41 +00:00
Mark Crane 7cdddbf5d0 Add ring group distinctive ring option to the lua. 2015-06-07 04:06:39 +00:00
Mark Crane 2b69ac00d7 Synchronize the translations. 2015-06-06 02:37:26 +00:00
Mark Crane 3de401da03 Fix hold music when used with Conference Center and XML Handler. 2015-06-04 22:43:46 +00:00
luis daniel lucio quiroz 7b5b36ffa0 mod_verto xml handler support 2015-05-30 22:14:01 +00:00
Mark Crane d060fd8b70 Sync the changes to fix conference recording from the dev branch. Add a few comments and make the indentation consistent. 2015-05-30 20:32:01 +00:00
Mark Crane c65187284a Improve the indentation. 2015-05-30 20:19:36 +00:00
Mark Crane e969555a46 A little more polish for this feature. 2015-05-30 04:50:19 +00:00
Mark Crane 0bd5391e34 Add the api object to the failur handler. 2015-05-29 05:53:02 +00:00
Mark Crane 4c45d7d457 Update failure handler with the necessary changes for missed calls. 2015-05-29 05:46:21 +00:00
Mark Crane dd3f6bc784 Add trim include to the failure_handler. 2015-05-29 05:36:50 +00:00
Mark Crane c380e29913 Add a hangup hook to dialplan local_extension and remove originator cancel from the failure_handler. 2015-05-29 05:16:34 +00:00
Mark Crane 47f37420c8 Add app/hangup to support originator cancel for missed calls. 2015-05-29 05:12:41 +00:00
Mark Crane d14507fdf8 Add missed call email notification. 2015-05-29 03:56:49 +00:00
Mark Crane 9b9d174d8c Change the file from ANSI to UTF-8 no BOM. 2015-05-29 02:55:25 +00:00
luis daniel lucio quiroz 49ea23507c conference_session_uuid issue fixed, the recording path is now fixed with/without multitenant 2015-05-28 18:41:43 +00:00
Mark Crane 4a937c83f1 Change how the previous alternate device is handled. 2015-05-25 16:31:08 +00:00
Mark Crane 196a99b70a Handle Do Not Disturb set on the extension for ring groups. 2015-05-16 23:38:07 +00:00
Mark Crane 7aacf2578c Remove the code that is attempts and succeeds to prevent DND extension from affecting the Ring Groups because it also prevents calling external numbers and using bridge statements in the ring group. Will commit a fix soon that does an alternative way of removing extensions that are set to DND in FusionPBX's GUI. 2015-05-15 19:14:18 +00:00
Mark Crane f2403e5efa Remove session:sleep from scripts/confirm.lua. 2015-05-15 01:38:09 +00:00
Mark Crane 28c4f7ea50 Page conference settings need page caller controls. For non modertor 0 mute and press again to unmute. 2015-05-14 01:56:11 +00:00
Mark Crane a9107f4edf Remove ;; from the XML Handler. 2015-05-13 16:43:30 +00:00
Mark Crane a438c8134b Fix a nil error for fax_remote_station_id and make the caller id name and number work for inbound FAX. 2015-05-13 06:46:36 +00:00
Nate Jones 7860fe106d Ring Groups: DND extensions not included when retrieving Ring Group destinations (real fix for Issue 927, re: r8338). 2015-05-12 05:59:33 +00:00
Nate Jones a3b256b4d9 Fax: Fix fax-to-email, better conversion to PDF. 2015-05-11 23:41:11 +00:00
Nate Jones 9b200a70d3 Fax: Prevent fax_destination field from being populated on received faxes. 2015-05-09 06:21:53 +00:00
Nate Jones 95e965b108 Fax: Upgrade script to generate and store meta-data from existing fax files, fix Lua script to insert correct fax file path into db, JavaScript prompt corrections, adjust redirect after send to use new interface, fix delete so files on file system are removed (using path from db), fix paging and sorting on Inbox and Sent, fix TIF to PDF conversion for viewing sent/received faxes (if PDF version not present). 2015-05-09 05:22:29 +00:00
Mark Crane b48f216946 Fix call forward no answer by changing originate_disposition from "ALLOTTED_TIMEOUT" to "NO_ANSWER". 2015-05-08 14:48:48 +00:00
Mark Crane a04f13c89e Update the comments on provision/index.lua 2015-05-06 04:39:26 +00:00
Mark Crane 1fbd2a332b Put the message date back in the email template but comment it out. It's removed by default because it doesn't respect the timezone per domain. 2015-05-05 17:23:25 +00:00
Mark Crane ffa7603990 Remove the message_date from the voicemail to email template. 2015-05-05 16:25:51 +00:00
Mark Crane b1a33cf477 Change leg_timeout for call_timeout in the xml handler directory. 2015-05-05 07:34:19 +00:00
Mark Crane da8bd3f010 Change the copyright year on the ring groups lua script. 2015-05-05 07:12:44 +00:00
Mark Crane c889363820 Add domain_uuid to the ring group SQL query. 2015-05-05 07:11:31 +00:00
Mark Crane 8cda7312cd Remove the DND check on the ring groups as it caused the query to return duplicate destination numbers. 2015-05-05 06:35:43 +00:00
Mark Crane b701652c78 Fix the sip profile enabled by changing the alias from 's' to a 'p'. 2015-05-05 05:34:00 +00:00
Mark Crane 96d4e0cea1 Change scripts directory from user_status to agent_status. 2015-05-04 18:40:54 +00:00
Mark Crane cbd41428c8 Lua script app/user_status updated to use agent_id and agent_password. 2015-05-04 18:34:43 +00:00
Mark Crane f79c9925f0 Add support for the new sip profiles enabled field. 2015-05-02 05:08:41 +00:00
Mark Crane e972d383d1 Add domain_uuid to the provision SQL queries and add debug SQL option. 2015-05-01 13:37:04 +00:00
Mark Crane 9b2cac9d34 Add additional auhtorized checks and comment out debugging code. 2015-05-01 12:57:06 +00:00
Mark Crane 144ac08ca9 Change device_model to device_uuid_alternate. 2015-04-30 10:21:23 +00:00
Nate Jones b38be32c9c Paging: Ability to grant caller moderator status/controls, auto-generate random pin.
Conference: Add missing caller-controls and moderator-controls parameters in autoload_config.
2015-04-30 09:45:41 +00:00
Mark Crane 1f3c104435 Get the login details from devices table. 2015-04-30 09:33:19 +00:00