PT48390337 - SQA error log messages in sipXproxy.log

SQA clients and server logged various error messages because client
connections to server were closed by server when error conditions
where hit in the socket parsing func  which was buggy. The server side
parsing of read buffer was fixed: parsing will be started only when
min message size was read in buffer, expect that several reads might
not give a full message, preserve parsing state between subsequent socket
reads, refactored the parsing func completely because the old design was
using two functions which in rare cases would get stuck in infinite recursion.
Other fixes:
Added a flag to mark that a socket was closed so that subsequent attempts
of closing will be discarded. This also resulted in lots of benign error logs.
Removed duplicate code that closed a socket from various locations: connection
class, listener class.
Check if read error is EOF to know that connection was closed gracefully.
PT-50715719 - Increase rev of sipxopenacd
build : only increment sipxopenacd revno. #nochangelog
build: requires meck deps to build
build: requires meck deps to build
PT-50064853 fix sipxcdr uninstall
Merge branch 'PT48390337' into release-4.6
PT50384085 - Core dump in sipxproxy on openuc.ezuce.com
PT50388145 - Core dump in sipregistrar on openuc.ezuce.com
PT49824827 - Core dump in sipXproxy on reboot

Proxy and registrar were crashing on shutdown because of an assertion in
mongo cleanup code. It seems that mongo needs some help to cleanup nicely
and this is done by adding an explicit call to mongo::dbexit(mongo::EXIT_CLEAN).
PT50385571 - Core dump 1 in sipstatus on openuc.ezuce.com

Status was crashing on shutdown because of an assertion in
mongo cleanup code. It seems that mongo needs some help to cleanup nicely
and this is done by adding an explicit call to mongo::dbexit(mongo::EXIT_CLEAN).
Update openacd submodules

* Use git read-only urls
* Update to latest openacd and sipxopenacd
Merge remote-tracking branch 'origin/PT50384085' into release-4.6
PT50360093 - Core dump in sipxsaa on openuc.ezuce.com

sipXsaa crashed because an object was deleted while in usage. After deletion
the object was accessed again leading to crash (A refresh event was triggered
by the stack for an Appearance subscription, which triggered a Appearance::subscriptionEventCallback
with subscription state set to terminated. This callback wrongfully set the
_isTerminated flag to true. Because of this the next callback Appearance::subscriptionEventCallback
with subscription state set to terminated  would lead to deletion of
the Appearance and a crash.)

To fix the problem appearances should be deleted only when these conditions are met:
1. terminate() was requested by parent reg subscription (from AppearanceGroup);
2. Appearance::subscriptionEventCallback with subscription state set to
terminated was triggered after step 1.

_isTerminated flag was replaced with a termination state condition.
    Align with Openfire changes

    Some interfaces have changed packages

PT318571 Changes required for adding mongodb providers to Openfire
Some refactoring needed for DB access
Upgraded monogdb java driver (2.9.0 contained a bug that triggered during my tests)
Set java sources encoding to UTF-8 (one test that used german characters was failing when trying to build RPMs for CentOS)
Cleaned up projects' classpaths (removed references to SIPX_SRC_TOP and SIPX_JAVA_TOP)

PT36956563 Additional properties needed for clustering.

PT318571 Changes required for adding mongodb providers to Openfire
Some refactoring needed for DB access
Upgraded monogdb java driver (2.9.0 contained a bug that triggered during my tests)
Set java sources encoding to UTF-8 (one test that used german characters was failing when trying to build RPMs for CentOS)
Cleaned up projects' classpaths (removed references to SIPX_SRC_TOP and SIPX_JAVA_TOP)

Updated lastest Openfire

Fix style -  sipXconfig should  use commons logging factory instead log4j

Fix MongoFactory init when openfire not installed

Fix Mongo intialization for sipXconfig when installing from sources

Openfire integration fixes:
- Generate openfire.properties, replicate through cfengine
- add HA property to relax validator, configurable
- remove unused providers from openfire.vm
- fix openfire service status in sipxconfig page
- remove mechanism for saving properties in OF db

Additional cleanup in OF config file - inject providers as map

Fix admin portal login - use JIDs

Take 2 - try to fix NPE when getting user presence

Changes required by Openfire 3.8.1 API.

Fixed eclipse projects' classpaths

Moved Openfire reference to 3.8.1
Removed unused project dependency

Removed references to jodatime
PT-336655 Multiple zones in a cluster
XX-9767

User's CDRs, voicemail timestamps (including IVR prompts), schedules follow user's timezone.
Timezone can be set at:
branch level
group level
user level

Both admins and users may change a user's timezone.
PT-49088557 - have sipxconfig generate aliases when VM and AA role is enabled. This ensures vm alias permission is in replicated in mongo.
Revert "PT-49088557 - have sipxconfig generate aliases when VM and AA role is enabled. This ensures vm alias permission is in replicated in mongo."

This reverts commit 9dffb768fefbc453e5337c0e572680a605efdb01.

Reason: code should be in post commit not in replicate!!
PT-49088557 -have sipxconfig generate aliases when VM and AA role is enabled. This ensures vm alias permission is in replicated in mongo.
Changes in conferences replication (openuc repliction handled in a separate plugin)
PT48003901: Openfire should inherit lang set in  System > Localization

- localize openfire according with config selection

Conflicts:

	sipXopenfire/config-plugin/sipxplugin.beans.xml
	sipXopenfire/config-plugin/src/org/sipfoundry/sipxconfig/openfire/OpenfireConfigurationFile.java
	sipXopenfire/etc/openfire.vm
    Align with Openfire changes

    Some interfaces have changed packages

PT318571 Changes required for adding mongodb providers to Openfire
Some refactoring needed for DB access
Upgraded monogdb java driver (2.9.0 contained a bug that triggered during my tests)
Set java sources encoding to UTF-8 (one test that used german characters was failing when trying to build RPMs for CentOS)
Cleaned up projects' classpaths (removed references to SIPX_SRC_TOP and SIPX_JAVA_TOP)

PT36956563 Additional properties needed for clustering.

PT318571 Changes required for adding mongodb providers to Openfire
Some refactoring needed for DB access
Upgraded monogdb java driver (2.9.0 contained a bug that triggered during my tests)
Set java sources encoding to UTF-8 (one test that used german characters was failing when trying to build RPMs for CentOS)
Cleaned up projects' classpaths (removed references to SIPX_SRC_TOP and SIPX_JAVA_TOP)

Updated lastest Openfire

Fix style -  sipXconfig should  use commons logging factory instead log4j

Fix MongoFactory init when openfire not installed

Fix Mongo intialization for sipXconfig when installing from sources

Openfire integration fixes:
- Generate openfire.properties, replicate through cfengine
- add HA property to relax validator, configurable
- remove unused providers from openfire.vm
- fix openfire service status in sipxconfig page
- remove mechanism for saving properties in OF db

Additional cleanup in OF config file - inject providers as map

Fix admin portal login - use JIDs

Take 2 - try to fix NPE when getting user presence

Changes required by Openfire 3.8.1 API.

Fixed eclipse projects' classpaths

Moved Openfire reference to 3.8.1
Removed unused project dependency

Removed references to jodatime