Commit Graph

262 Commits

Author SHA1 Message Date
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 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
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
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
markjcrane 09c4dd79d0 Remove hostname on the acl memcache variable name. 2015-08-13 19:49:09 -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
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
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
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
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
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
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 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
Alexey Melnichuk 61f5e77cfb Fix. Use `temp_dir` to debug dialplan xml file 2015-07-16 12:56:13 +04: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
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 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 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
luis daniel lucio quiroz 5a168e3779 load balancing fixed 2015-06-11 01:43:30 +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 d14507fdf8 Add missed call email notification. 2015-05-29 03:56:49 +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 b1a33cf477 Change leg_timeout for call_timeout in the xml handler directory. 2015-05-05 07:34:19 +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 f79c9925f0 Add support for the new sip profiles enabled field. 2015-05-02 05:08:41 +00:00
Nate Jones cad0b090b6 XML Handler: Include missing language macros. 2015-04-30 06:59:24 +00:00
Mark Crane a6f9ac0214 Fix conference sound file problem and add the missing profiles that are in the standard conference.conf.xml file. 2015-04-22 22:45:05 +00:00
luis daniel lucio quiroz deaaf0c4eb missing space & mysql support 2015-04-12 17:40:58 +00:00
Digital Daz 572d83a828 First part of fix for load balancing - Prevent stale hostname being used for expired registration that has not yet been purged by freeswitch 2015-04-12 10:08:47 +00:00
Mark Crane 17c68d7e2b Prevent a bad domain_name from causing a nil error for reverse authentication. 2015-04-04 06:24:41 +00:00
Mark Crane fb7ded71ce Set auto-gain-level to 0 or disabled. 2015-04-01 10:18:48 +00:00
Mark Crane 95344623ce Fix the XML for languages.lua. 2015-03-24 06:21:47 +00:00
Mark Crane 4385aac2dd Remove trailing spaces or tabs. 2015-03-18 20:51:13 +00:00
Mark Crane 006af7d74d Fix the indentation in callcenter.conf.lua. 2015-03-11 19:33:07 +00:00
Mark Crane 700f27d89f Call Center XML Handler now generates XML correctly. 2015-03-11 19:28:18 +00:00
Mark Crane 3406ff62b4 Add the missing include for the languages section. 2015-03-09 23:49:15 +00:00
Mark Crane a1055b60a3 Add time-of-day to the XML handler. 2015-03-09 15:51:49 +00:00
Mark Crane 4642a6e4a5 Add XML Handler section language. 2015-03-09 05:26:10 +00:00
Digital Daz 3dd2ec4a2e Remove a log line used for debug 2015-02-25 20:40:51 +00:00
Digital Daz ad82d7fe49 Fixed a couple of typos and changed the way the DSN is inserted. 2015-02-25 20:35:22 +00:00
Mark Crane 7887e4ddd3 Add callcenter.conf.lua for xml handler. 2015-02-21 09:33:36 +00:00
Mark Crane 5fefdd595b Tested gateway with registration set to false on 1.4.15 no longer requires a username and password so it is no longer required in fusionpbx when the registration is set to false. 2015-01-29 07:07:54 +00:00
Mark Crane d4f2c57455 Get the values from the database and set them as lua variables. 2014-12-03 09:02:54 +00:00
Mark Crane 2495e9e935 Set extension variables for forward all, busy, no answer, and do not disturb. 2014-12-03 08:05:41 +00:00
luis daniel lucio quiroz fb02f54a6a xml_handler directory.lua is now tolerant when no memcache available, fix a nil variable 2014-11-27 14:43:28 +00:00
Mark Crane d9ce24a7a2 Revert r7258 as caused problems with endpoints receiving calls. 2014-11-26 20:54:44 +00:00
Mark Crane 3daa03d2a5 Fix the alias for the XML handler. 2014-11-21 04:37:43 +00:00
Mark Crane 0d166590dd xml_handler will bind if memcached is down 2014-11-13 08:51:46 +00:00
Mark Crane 71bfd161b3 Replace if statement so that it doesn't cause a problem with user_exist. 2014-10-22 00:32:00 +00:00
Mark Crane 7508c06034 Fix the xml handler nil error for number_alias and fix some indentation. 2014-10-21 19:30:40 +00:00
Mark Crane fe4d4c64a4 disable registration for number-alias 2014-10-21 10:01:30 +00:00
Mark Crane 759621255a Fix the xml handler nil error for number_alias. 2014-10-15 17:32:02 +00:00
Mark Crane 7d5f648f10 Fix XML handler with number_alias. 2014-10-13 20:10:14 +00:00
Mark Crane 0665e83aa4 Add voicemail params to the directory section of the xml handler 2014-10-03 06:17:43 +00:00
Mark Crane d15bf10ed8 Fix a problem where in rare cases dialplan was cached without global dialplans 2014-09-15 15:56:18 +00:00
Mark Crane 28eb38d0ad XML Handler dialplan set dialplan to 1 hour cache timeout 2014-08-22 07:40:34 +00:00
Mark Crane c7dff4a4a4 Check the length of user_record 2014-08-03 12:35:24 +00:00
Mark Crane cfb833aa25 Reduce one request to the database and create a better domains array 2014-07-10 05:23:53 +00:00
Mark Crane 0c9e632607 Add domain info to the xml handler for inbound routes 2014-07-09 05:40:17 +00:00
Mark Crane f0e1d9a59b Fix the identation on the xml handler directory xml 2014-07-04 18:20:11 +00:00
Mark Crane 48c6645688 Add global dialplan option when using the xml handler. 2014-07-02 04:02:50 +00:00
Mark Crane 6af80a602a Prevent an error on the reverse authentication for the xml handler when its sent and invalid domain from FreeSWITCH. 2014-06-27 19:41:31 +00:00
Mark Crane 7a01104700 Ensure the gateway_uuid is lower case 2014-06-24 06:40:29 +00:00
luis daniel lucio quiroz ca3f246e37 I updated my email 2014-06-22 18:38:46 +00:00
Mark Crane 7dd9553707 Add mute.lua and unmute.lua files 2014-05-02 09:34:56 +00:00
Mark Crane 5e0eb315f8 Add emergency caller id name to the extension xml and to xml handler. 2014-05-01 04:59:33 +00:00
Mark Crane f0dc0d7183 Add a a check to see if the dial_string is null then add a default dial string 2014-04-30 20:54:30 +00:00
Mark Crane a9ff275b7b Add user_record to the xml_handler section: directory 2014-04-03 17:45:10 +00:00
Mark Crane 392111d825 Time for a major improvement to LUA XML handler efficiency. 2014-02-23 06:34:56 +00:00
Mark Crane 786242e24d Use the correct database connection object. 2014-01-03 20:07:36 +00:00
Mark Crane ce37b50d54 Fix this error: [ERR] freeswitch_lua.cpp:374 DBH NOT Connected. Caused by releasing DBH which is done in the parent script. 2013-12-24 16:25:16 +00:00
luis daniel lucio quiroz 1c27162779 previous changes reverted, agreed with mcrane 2013-12-23 20:21:25 +00:00
luis daniel lucio quiroz fc126bcea3 database_host nil prevention 2013-12-23 00:39:02 +00:00
luis daniel lucio quiroz 0652016ad7 dialed_extension assigned before showing 2013-12-23 00:34:34 +00:00
luis daniel lucio quiroz 7e0b913dc1 fix a dbh sintax that fails in some servers, seems old sintax is not supported 2013-12-23 00:29:54 +00:00
luis daniel lucio quiroz aa69e59b0c dialed_extensions was nil when coming from ringing group 2013-12-22 19:06:00 +00:00
Mark Crane e7386519ce Change the gateway name to gateway_uuid in the XML handler. 2013-12-06 08:26:55 +00:00
Mark Crane 8696e82b8c Remove dbh:release(); from directory.lua because its done in the parent script after this script completes. 2013-11-25 20:56:27 +00:00
Mark Crane 849f2d05e3 Edge case fix ring group when an extension is not registered. 2013-11-19 05:59:47 +00:00
Mark Crane c5c8eabf5f Add a additional debug information and fix some problems in directory.lua. 2013-11-17 11:44:02 +00:00
Mark Crane ab5279ee3c Make sofia.conf.lua hostname backwards compatible. 2013-11-13 08:26:18 +00:00
Mark Crane 8ba965ff31 Add hostname to sofia.conf.lua 2013-11-12 16:09:07 +00:00
Mark Crane 55691db77d Add reverse-auth-lookup to the xml handler script. 2013-11-12 08:44:32 +00:00
Mark Crane 95c2bb17e3 Check the local hostname in the xml handler. 2013-11-12 08:43:13 +00:00
Mark Crane f4fd32687f Comment out the voicemail fields in the xml handler. 2013-10-08 22:26:25 +00:00
Mark Crane 46d0c45c01 Additional monitoring of a busy server showed that it was the cache only that needed to be removed. 2013-09-29 10:08:27 +00:00
Mark Crane bf63091a0e Remove this code from the xml handler which made it unable to find some extensions that existed. 2013-09-29 09:22:16 +00:00
Mark Crane 26742ae7c5 Add number alias so that it will work with the xml handler. 2013-08-21 17:53:17 +00:00
Mark Crane ea34375fdf Add xml handler fixed sip call forward. 2013-07-25 06:04:15 +00:00
Mark Crane 7949e3849e Remove cache that was too broad and caused "can't find user" errors under certain circumstances. 2013-06-15 06:59:07 +00:00
Mark Crane 567e554cb7 Move the includes/install to resources/install 2013-06-09 02:42:36 +00:00