Skip to content
Snippets Groups Projects
Commit ab9caa16 authored by Richard Alam's avatar Richard Alam
Browse files

- add webVoiceConf API so third parties can pass in different extension fo voip

parent ea07dba5
No related branches found
No related tags found
No related merge requests found
......@@ -38,9 +38,9 @@ public class Application extends MultiThreadedApplicationAdapter {
callStreamFactory.setScope(scope);
sipPeerManager.setCallStreamFactory(callStreamFactory);
sipPeerManager.setClientConnectionManager(clientConnManager);
sipPeerManager.createSipPeer(sipServerHost, sipServerHost, startSipPort, startRtpPort, stopRtpPort);
sipPeerManager.createSipPeer("default", sipServerHost, startSipPort, startRtpPort, stopRtpPort);
try {
sipPeerManager.register(sipServerHost, username, password);
sipPeerManager.register("default", username, password);
} catch (PeerNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
......
......@@ -16,7 +16,6 @@ public class Service {
private MessageFormat callExtensionPattern = new MessageFormat("{0}");
public Boolean call(String peerId, String callerName, String destination) {
// destination = "600";
log.debug("Joining voice conference " + destination);
String extension = callExtensionPattern.format(new String[] { destination });
try {
......
......@@ -156,12 +156,12 @@ package org.bigbluebutton.modules.phone.managers {
//********************************************************************************************
public function doCall(dialStr:String):void {
LogUtil.debug("Calling " + dialStr);
netConnection.call("voiceconf.call", null, "127.0.0.1", username, dialStr);
netConnection.call("voiceconf.call", null, "default", username, dialStr);
}
public function doHangUp():void {
if (isConnected) {
netConnection.call("voiceconf.hangup", null, "127.0.0.1");
netConnection.call("voiceconf.hangup", null, "default");
isConnected = false;
}
}
......
......@@ -60,8 +60,8 @@ package org.bigbluebutton.modules.phone.managers
}
public function dialConference():void {
LogUtil.debug("Dialing...." + attributes.voicebridge);
connectionManager.doCall(attributes.voicebridge);
LogUtil.debug("Dialing...." + attributes.webvoiceconf);
connectionManager.doCall(attributes.webvoiceconf);
}
public function callConnected(event:CallConnectedEvent):void {
......
......@@ -97,6 +97,7 @@ class ApiController {
String attPW = params.attendeePW
String modPW = params.moderatorPW
String voiceBr = params.voiceBridge
String webVoice = params.webVoiceConf
String welcomeMessage = params.welcome
String dialNumber = params.dialNumber
String logoutUrl = params.logoutURL
......@@ -130,6 +131,7 @@ class ApiController {
}
DynamicConference conf = new DynamicConference(name, mtgID, attPW, modPW, maxParts)
conf.setVoiceBridge(voiceBr == null || voiceBr == "" ? mtgID : voiceBr)
conf.setWebVoiceConf(webVoice == null || webVoice == "" ? conf.voiceBridge : webVoice)
if ((dynamicConferenceService.testVoiceBridge != null) && (conf.voiceBridge == dynamicConferenceService.testVoiceBridge)) {
if (dynamicConferenceService.testConferenceMock != null)
......@@ -235,6 +237,7 @@ class ApiController {
session["conference"] = conf.getMeetingToken()
session["room"] = conf.getMeetingToken()
session["voicebridge"] = conf.getVoiceBridge()
session["webvoiceconf"] = conf.getWebVoiceConf()
session["mode"] = "LIVE"
session["record"] = false
session['welcome'] = conf.welcome
......
......@@ -228,7 +228,8 @@ class PublicScheduledSessionController {
def rl = session["role"]
def cnf = session["conference"]
def rm = session["room"]
def vb = session["voicebridge"]
def vb = session["voicebridge"]
def wbv = session["webvoiceconf"]
def rec = session["record"]
def md = session["mode"]
def confName = session["conferencename"]
......@@ -262,7 +263,8 @@ class PublicScheduledSessionController {
role("$rl")
conference("$cnf")
room("$rm")
voicebridge("${vb}")
voicebridge("${vb}")
webvoiceconf("${wbv}")
mode("$md")
record("$rec")
welcome("$welcomeMsg")
......
......@@ -37,7 +37,7 @@ public class DynamicConference extends Conference {
String meetingID
String meetingToken
String voiceBridge
String webVoiceConf
String moderatorPassword
String attendeePassword
String welcome
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment