You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2022/06/10 04:55:22 UTC

[openmeetings] branch master updated: [OPENMEETINGS-2737] instructions were updated for Asterisk 18, issue in TimerService was fixed

This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new 6d7b93320 [OPENMEETINGS-2737] instructions were updated for Asterisk 18, issue in TimerService was fixed
6d7b93320 is described below

commit 6d7b933204f7ed6ebee7b7c2e9a841aac179283d
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Fri Jun 10 11:55:11 2022 +0700

    [OPENMEETINGS-2737] instructions were updated for Asterisk 18, issue in TimerService was fixed
---
 .../src/site/markdown/AsteriskIntegration.md           | 18 ++++++++++++------
 .../org/apache/openmeetings/web/app/TimerService.java  |  5 +++++
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/openmeetings-server/src/site/markdown/AsteriskIntegration.md b/openmeetings-server/src/site/markdown/AsteriskIntegration.md
index bedaeded4..a3f9e0bfe 100644
--- a/openmeetings-server/src/site/markdown/AsteriskIntegration.md
+++ b/openmeetings-server/src/site/markdown/AsteriskIntegration.md
@@ -45,9 +45,9 @@ sudo apt update && sudo apt upgrade
 sudo apt install build-essential
 
 sudo mkdir /usr/src/asterisk && cd /usr/src/asterisk
-sudo wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-16.13.0.tar.gz
-sudo tar -xvzf asterisk-16.13.0.tar.gz
-cd ./asterisk-16.13.0
+sudo wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-18.12.1.tar.gz
+sudo tar -xvzf asterisk-18.12.1.tar.gz
+cd ./asterisk-18.12.1
 sudo make clean
 sudo contrib/scripts/install_prereq install
 sudo ./configure
@@ -80,7 +80,13 @@ Modify `[modules]` section of `/etc/asterisk/modules.conf`
 **Add/uncomment the following lines**
 
 ```
-preload => res_config_mysql.so
+preload = res_config_mysql.so
+```
+
+**Remove/Comment following lines**
+
+```
+;noload = chan_sip.so
 ```
 
 ### Configure MySQL module:
@@ -93,8 +99,8 @@ Set valid data for MySQL in `/etc/asterisk/res_config_mysql.conf`:
 [general]
 dbhost = 127.0.0.1
 dbname = openmeetings
-dbuser = root
-dbpass =
+dbuser = om_db_admin
+dbpass = 12345
 dbport = 3306
 dbsock = /var/lib/mysql/mysql.sock
 dbcharset = utf8
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/TimerService.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/TimerService.java
index 6829c0fa5..256841e51 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/TimerService.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/TimerService.java
@@ -38,6 +38,7 @@ import org.apache.openmeetings.db.entity.room.Room.Right;
 import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.db.util.ws.RoomMessage;
 import org.apache.openmeetings.db.util.ws.TextRoomMessage;
+import org.apache.wicket.ThreadContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -58,6 +59,8 @@ public class TimerService {
 	private SipManager sipManager;
 	@Autowired
 	private KurentoHandler kHandler;
+	@Autowired
+	private Application app;
 
 	@PostConstruct
 	private void init() {
@@ -69,6 +72,7 @@ public class TimerService {
 		modCheckMap.put(
 				roomId
 				, new CompletableFuture<>().completeAsync(() -> {
+					ThreadContext.setApplication(app);
 					log.warn("Moderator room check {}", roomId);
 					if (cm.streamByRoom(roomId).findAny().isEmpty()) {
 						modCheckMap.remove(roomId);
@@ -85,6 +89,7 @@ public class TimerService {
 		sipCheckMap.put(
 				roomId
 				, new CompletableFuture<>().completeAsync(() -> {
+					ThreadContext.setApplication(app);
 					log.trace("Sip room check {}", roomId);
 					Optional<Client> sipClient = cm.streamByRoom(roomId).filter(Client::isSip).findAny();
 					cm.streamByRoom(roomId).filter(Predicate.not(Client::isSip)).findAny().ifPresentOrElse(c -> {