Commit Graph

136 Commits

Author SHA1 Message Date
FusionPBX 15f60e8423
Update send_mail.lua 2019-04-18 09:44:09 -06:00
FusionPBX 4bd7e18e79
Update route_to_bridge.lua 2018-06-18 17:43:25 -06:00
FusionPBX 3235eadd2d
Update mkdir.lua 2018-05-30 10:54:01 -06:00
konradSC cfff4beb2b Use Freeswitch for mkdir (#3049)
This change reduces  the strain on the system by running the OS command through Freeswitch rather than directly from Lua. When running directly from Lua it causes RTP jitter in a high capacity system.
2018-05-04 13:32:36 -06:00
Alexey Melnichuk eb72f3d5ce Change. library loads only needed files. (#2987) 2018-02-11 08:56:01 -07:00
FusionPBX 9cc13cd7d4
Update find_file.lua 2018-02-10 15:32:36 -07:00
FusionPBX 129a9b5986
Create basename.lua 2018-02-10 13:42:02 -07:00
FusionPBX 39c4530cfd
Update find_file.lua 2018-02-10 13:40:45 -07:00
FusionPBX 4e0edb644c
Create is_absolute_path.lua 2018-02-10 13:39:54 -07:00
FusionPBX 90f5a3a16a
Create find_file.lua 2018-02-10 13:38:17 -07:00
FusionPBX 0c338047cf
Create play_file.lua 2018-02-10 13:35:07 -07:00
Alexey Melnichuk f82f73bc44 Fix. Use preloaded dialplan more then once. (#2986) 2018-02-10 13:27:07 -07:00
FusionPBX 776016871e
Update send_mail.lua 2018-02-06 18:15:05 -07:00
Mafoo fca2e08a7f Enhance - send_mail.lua (#2978)
use the to address when email:smtp_from:var is empty
don't use email:smtp_from_name:var when empty
2018-02-06 17:45:53 -07:00
Mafoo d92adacc28 BugFix - send_mail.lua (#2977)
use correct header to retrieve call_uuid
2018-02-06 17:28:00 -07:00
FusionPBX 3db4ecb08c
Update send_mail.lua
Remove this as it caused a nil error app/hangup/index.lua.
2018-02-05 23:47:36 -07:00
FusionPBX 7f201a8097
Update send_mail.lua
Revert the previous commit as it broke send_email.lua.
2018-02-05 22:23:18 -07:00
FusionPBX 5c092b8f57
Update send_mail.lua
Fix a spelling mistake.
2018-02-02 19:35:02 -07:00
Mafoo e06f21ccf3 BugFix - LUA send_mail() (#2975)
take call_uuid from the correct header
use smtp_from_name as part of the from address
2018-02-02 19:33:43 -07:00
Connor Strandt ff1ddaa1ae Formatting and sendmail to use smtp_from fix (#2973)
* Fixed formatting.
* Sendmail to use smtp_from variable

Changed sendmail to use smtp_from as the from address to keep from being blocked by spf check during spam filtering on recieving end.
2018-02-02 01:02:57 -07:00
FusionPBX a11fb1a4ef
Update cache.lua
Make the cache.lua more robust in case of missing key or value.
2018-01-19 18:39:05 -07:00
sergey-mz 61b78ea73b Fix spelling (#2950)
* ODBC DSN detection

* Merge remote-tracking branch 'upstream/master'

* Merge remote-tracking branch 'upstream/master'

* Spelling errors
2018-01-05 13:04:26 -07:00
Alexey Melnichuk f127969fe4 Fix. Use external numbers in ring groups with global outbound routes (#2937) 2017-11-29 00:21:21 -07:00
Alexey Melnichuk b0422af3e2 Add. Use `route_to_bridge` module to build routes for ring groups. (#2907)
* Add. Use `route_to_bridge` module to build routes fro ring groups.

This commit has several improvements
1. Select only needed fields. (do not select quite big XML text strings)
2. Filter routes also by context name
3. Filter dialplans also by hostname
4. Handle conditions based not only `destination_number`
5. Handle `break` and `continue` attributes for extensions
6. Escape vars inside dial-string
7. Add log messages similar as FS dialplan do

* Add. `route_to_bridge` set inline vars so it possible use then in next conditions.
Add. `route_to_bridge` can execute basic api commands from allowed lists.
`route_to_bridge` expand all known vars. If var is unknown then it pass as is.
Fix. `export nolocal:` action.

* Fix. Short variable names

* Add. some comments

* Fix. Do not try execute empty string

This produce error messages `[ERR] switch_cpp.cpp:759 No application specified`

* Fix. Export nolocal values.
2017-11-17 07:15:47 -07:00
Alexey Melnichuk 06e351f6f3 Fix. crash when using EventCounsumer.ievents iterator. (#2865)
Problem code is
``` Lua
for event in ievents{'SHUTDOWN','CUSTOM::event'} do
end
```
2017-10-06 12:36:23 -06:00
Alexey Melnichuk e728cb44ae Fix. Cache class. (#2755)
* Fix. Cache class.

 * `send_event` raise error so `Cache.del` did not remove key or send any event
 * use `memcache` method by default even if `cache` table does not defined in config
 * `Cache.get` did not return any data when use `memcache` method
 * `Cache.get` did not close file. (Its should not be a big problem because GC should do it by self).
 * `Cache.get` can returns some undefined global value. (if method is `file` and file not exists then method returns global `result` value)
 * `Cache.get` does not need check for file existence
 * Value escaping does not needed for `file` method
 * Needed different key escaping for `memcache` and `file` methods
 * Update self test

* Change. Use random names for temp files.
2017-07-26 09:40:53 -06:00
FusionPBX eb8bcc755e Update cache.lua 2017-07-22 15:18:20 -06:00
FusionPBX c126138cf7 Update cache.lua 2017-07-22 15:17:11 -06:00
FusionPBX c2663c3e59 Update cache.lua 2017-07-22 12:38:45 -06:00
FusionPBX 8e5eb0c110 Update cache.lua 2017-07-22 01:09:39 -06:00
FusionPBX f7a26d7711 Update lazy_settings.lua 2017-07-22 00:38:25 -06:00
Alexey Melnichuk 9e38643c40 Fix. Stack overflow when calls base actor. (#2706) 2017-06-22 00:14:28 -06:00
Alexey Melnichuk 515fc15767 Add. BLF indication for call forward. (#2664)
* Add. BLF indication for call forward.

To display general status of CallForward use blf like `forward+<extension>`
To display status for specific phone number use blf like `forward+<extension>/<number>`

* Fix. Escape variable in regex expression.

* Fix. Sync DND and CF blf.

* Add. `blf_subscribe` service which can handle all custom subscriptions.

To run for specific protocol it possible run as `luarun blf_subscribe.lua <PROTO>`
2017-06-20 09:23:23 -06:00
Alexey Melnichuk 64b1134482 Add. Support DND feature via BLF key (#2606) 2017-05-29 09:50:20 -06:00
Alexey Melnichuk 27f2f41cb4 Fix. Improve parameters patterns. (#2218)
E.g. now it handle queries like
```Lua
local sql = "select :J::text as value"
print(dbh:first_value(sql, {J='hello'}))
```
2017-04-22 10:18:10 -06:00
Alexey Melnichuk b0f83edcf0 Fix. Escape strings in regex api (#2523) 2017-04-20 07:48:49 -06:00
FusionPBX 167bacf9df Update route_to_bridge.lua 2016-12-23 02:16:22 -07:00
FusionPBX fe31c4b633 Update route_to_bridge.lua 2016-12-23 01:52:19 -07:00
Alexey Melnichuk 95176f517e Fix. Fetch correct arrays from settings. (#2162)
* Fix. Fetch correct arrays from settings.
Add. Use params in `settings.lua`

* Fix. array from domain settings overwrite entire array from default settings instead of appends it.
2016-11-23 03:50:00 -07:00
Alexey Melnichuk 571e42508f Fix. Use local `err` variable in `apply_param` (#2152) 2016-11-22 16:48:54 -07:00
Alexey Melnichuk 749d6cbe34 Add. Use params in send_mail.lua (#2142) 2016-11-22 11:10:18 -07:00
Alexey Melnichuk 79952998ba Add. Use params in lazy_settings.lua (#2118) 2016-11-21 13:51:39 -07:00
Alexey Melnichuk affa42b192 Add. Use params in route_to_bridge.lua (#2119) 2016-11-21 13:51:21 -07:00
Alexey Melnichuk 090f9b0d7b Add. Extend database API to support parameters. (#2086) 2016-11-17 11:41:16 -07:00
Chris Black 7c4a726766 add built in ability for microsoft bing speech to text (#1960)
* add built in ability for microsoft bing speech to text

* move json.lua to lower case and more error checking in record_message

* Replaced Creative Commons json.lua with lunajson.lua which is MIT license

https://github.com/grafi-tt/lunajson/blob/master/LICENSE
2016-11-03 16:11:21 -06:00
Alexey Melnichuk 66f26cf2e6 Add. attr_xfer analog based on conference. (#1629)
* Add. attr_xfer analog based on conference.

Control DTMF sequence
 `*0` transfer `self` to `enter number` state and `peer` leg to conference room
 `##` transfer `self` to `enter number` state and hangup `peer` leg
 `*#` transfer `self` to conference room and hangup `peer` leg

* Remove spaces.

* Add. Commented action to ring group.
2016-08-30 01:10:08 -06:00
DigiDaz 98a184c835 Fixed scripts to get multiserver memcache working (#1795) 2016-08-04 11:40:36 -06:00
Alexey Melnichuk f214625ead Change. Use `service::control` event to control services (#1790)
* Change. Use `service::control` event to control services

This is more FS way. E.g. sofia sends `sofia::register` event
and add all information to headers. So now `service` script
emit `fusion::service::control` event and each service responsible
for test its own name. This also allows add in future evnets to
e.g. monitor service status like `fusion::service::satus` so it
will be possible write service which will be restart services.

* Change. rename service name from `flow` to `call_flow`
2016-08-02 14:00:49 -06:00
Alexey Melnichuk e7c813a559 Simplify `is_uuid` function. (#1781)
* Simplify `is_uuid` function.

Also because it returns now value itself it possible write
```Lua
my_uuid = is_uuid(value1) or is_uuid(value2)
```

* Change. Ensure `is_uuid` returns only boolean value
2016-07-28 16:49:36 -06:00
Alexey Melnichuk 58ec22a759 Add. Support service stop command for odbc_pool. (#1782) 2016-07-28 08:16:54 -06:00