Commit Graph

6975 Commits

Author SHA1 Message Date
FusionPBX
d46f758000 Update orm.php
Make this code more resilient in case the primary key or sub table primary key was provided in the data.
2016-07-14 01:06:04 -06:00
FusionPBX
39e60b504b Update v_mailto.php
For the include for email transcription change the file name from email_translation.php to email_transcription.php.
2016-07-13 18:01:40 -06:00
Alexey Melnichuk
9076df2302 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
44196ae739 Fix. Fusion set rate=48000 to all streams. (#1746) 2016-07-12 08:09:54 -06:00
FusionPBX
c8a4a346ec Update ivr_menu_edit.php
Improve the indentation and some progress to separate getting the data from displaying it.
2016-07-11 17:06:32 -06:00
FusionPBX
9993a93546 Update switch.sql
Add accountcode to detailed_calls view.
2016-07-10 15:12:58 -06:00
FusionPBX
4609e858fe Update switch.sql
basic_calls view - add AS to match freeswitch code and accountcode
2016-07-10 15:04:25 -06:00
FusionPBX
7a67e61d96 Update switch.sql
Add accountcode to the channels table.
2016-07-10 14:53:12 -06:00
FusionPBX
78b7841a74 Update switch.sql
Update sip_registrations table.
2016-07-10 14:38:53 -06:00
FusionPBX
811b8388ad Update xml_cdr.php
Show the image in CDR only if direction is set.
2016-07-09 16:29:42 -06:00
FusionPBX
1ceee17605 Update scripts.php
Remove the extra ) to fix the syntax.
2016-07-08 17:09:09 -06:00
Mafoo
904a52434a 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
cae644c8a1 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
666ccddb34 Update app_defaults.php
Music on hold import from XML strip the domain name and rate from the name.
2016-07-08 10:32:56 -06:00
FusionPBX
39bc0cad29 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
ed89df28c5 Update music_on_hold_edit.php
Make sure reload mod local stream after editing it.
2016-07-06 15:50:43 -06:00
FusionPBX
cdeb3f20c2 Update switch_music_on_hold.php
Remove permission for the select list as we would want all users to see global music on hold.
2016-07-06 15:41:26 -06:00
FusionPBX
ff7bae958e Update music_on_hold_edit.php
Fix the chime select list so that it will show what was selected.
2016-07-06 15:33:01 -06:00
FusionPBX
0d73573770 Update page.lua
Update page.lua add support for rtp_secure_media=true.
2016-07-06 14:48:00 -06:00
FusionPBX
a9eaeb3c76 Update music_on_hold.php
Show global then local for those with music_on_hold_domain.
2016-07-06 14:13:17 -06:00
FusionPBX
886e178073 Update music_on_hold.php
Remove scope to simplify the interface after upload a user with the right permission can make it global.
2016-07-06 13:58:03 -06:00
FusionPBX
4682e4ef05 Update music_on_hold_edit.php
Add the translation for global and protect adding global music on hold using permissions.
2016-07-06 13:12:16 -06:00
FusionPBX
711bca9e97 Update app_languages.php
Add label-global to the global languages file.
2016-07-06 13:10:12 -06:00
Alexey Melnichuk
3d1f5b6866 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
Luis Daniel Lucio Quiroz
e6567d6d8d More efficient and compatible SQL query (#1737)
Don't do a nested select, it adds unnecessary overload to the db. Instead, use a left join, quicker and more compatible among db types.
2016-07-06 12:36:18 -06:00
FusionPBX
230257fff9 Update switch_music_on_hold.php 2016-07-06 11:19:41 -06:00
FusionPBX
1fb9cff306 Update music_on_hold.php
Update permissions for music_on_hold.php
2016-07-06 11:17:53 -06:00
FusionPBX
9e5c82dd9e Update app_config.php
Remove music_on_hold_global_* replaced with music_on_hold_domain in app_config.php.
2016-07-06 11:09:35 -06:00
FusionPBX
6c613cc213 Update music_on_hold.php
Reload mod local stream.
2016-07-06 10:46:43 -06:00
Alexey Melnichuk
68d65bf835 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
FusionPBX
6bdf8d0e27 Update music_on_hold.php
Fix the global upload and handling for mixed case upload to lower case.
2016-07-03 20:36:06 -06:00
FusionPBX
e04910be58 Update music_on_hold_edit.php
Fix the music on hold chime list.
2016-07-03 19:47:20 -06:00
FusionPBX
c03d25a1be Update music_on_hold_edit.php
Add music on holder rate, and time name to music_on_hold_edit.php
2016-07-03 16:55:33 -06:00
FusionPBX
f78417f0c6 Update app_languages.php
Add timer name to app languages.
2016-07-03 16:53:14 -06:00
FusionPBX
e3d23acb3c Update music_on_hold.php
Update music_on_hold.php prevent duplciate records if the path already exists.
2016-07-03 00:56:15 -06:00
FusionPBX
a20881395e Update music_on_hold_edit.php
Change moh_settings to music_on_hold_settings.
2016-07-02 09:37:23 -06:00
FusionPBX
c4e3b149dc Update music_on_hold.php
Replace moh for music on hold to match the changes to app_languages.
2016-07-02 09:34:18 -06:00
FusionPBX
5c52947eae Update app_languages.php
moh replaced by music_on_hold
2016-07-02 09:28:46 -06:00
FusionPBX
0a227bac05 Update app_languages.php
Change label-sampling to label-rate to match the name of the field.
2016-07-02 09:27:21 -06:00
FusionPBX
ff47ded50c Update music_on_hold.php 2016-07-02 09:26:23 -06:00
FusionPBX
9155fdf519 Update music_on_hold.php
Fix the display for the rate or default in music on hold.
2016-07-02 09:22:40 -06:00
FusionPBX
70bcfcffa6 Update dialplan.php
Use the domain array name as the row so it doesn't conflict with the row array.
2016-07-01 17:58:24 -06:00
FusionPBX
dbc2a561f4 Update dialplan.php
Fix the global dialplan.
2016-07-01 16:50:50 -06:00
FusionPBX
0a89b156f9 Update app_defaults.php
Adjust the indentation.
2016-07-01 16:49:12 -06:00
FusionPBX
4fcd8be55f Update app_defaults.php
Remove the context from app defaults.
2016-07-01 14:35:45 -06:00
FusionPBX
6a434f6cf9 Update dialplan.php
Fix the dialplan context on the import.
2016-07-01 14:33:55 -06:00
FusionPBX
d439c5a8a3 Update dialplan.php
Moving this code back to the way it was.
2016-07-01 14:04:38 -06:00
markjcrane
af8aef39b0 Add another missing semi-colon. 2016-07-01 13:47:50 -06:00
markjcrane
a2138678e6 Add a missing semi-colon. 2016-07-01 13:46:24 -06:00
markjcrane
c6fa6dc69a Add a missing ). 2016-07-01 13:44:58 -06:00