Commit b1496343 authored by Dele Olajide's avatar Dele Olajide Committed by dele

Rayo Plugin - Bug fixing

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13804 b35dd754-fafc-0310-a699-88a17e54d16e
parent 2f20b26c
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
{ {
window.connection.rayo.phone( window.connection.rayo.phone(
{ {
codec_name: "OPUS", codec_name: "PCMU",
stereo_pan: "0", stereo_pan: "0",
sip_handset: sipHandset, sip_handset: sipHandset,
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
if (!username) groupname = null; if (!username) groupname = null;
window.connection.rayo.dial("xmpp:" + window.connection.jid, sipUri, { window.connection.rayo.dial("xmpp:" + window.connection.jid, sipUri, {
codec_name: "OPUS", codec_name: "PCMU",
//group_name: groupname //group_name: groupname
}); });
......
...@@ -97,10 +97,21 @@ Strophe.addConnectionPlugin('rayo', ...@@ -97,10 +97,21 @@ Strophe.addConnectionPlugin('rayo',
//console.log(headers) //console.log(headers)
if (this._isOffhook()) this._onhook(); if (this._isOffhook()) this._onhook();
var that = this;
this._offhook(mixer, headers, function() this._offhook(mixer, headers, function()
{ {
var iq = $iq({to: mixer + "@" + this._connection.domain, from: this._connection.jid, type: "get"}).c("join", {xmlns: Strophe.NS.RAYO_CORE, "mixer-name": mixer});
that._connection.sendIQ(iq, null, function(error)
{
$('error', error).each(function()
{
var errorcode = $(this).attr('code');
if (that.callbacks && that.callbacks.onError) that.callbacks.onError("join failure " + errorcode);
});
});
}); });
}, },
...@@ -108,7 +119,21 @@ Strophe.addConnectionPlugin('rayo', ...@@ -108,7 +119,21 @@ Strophe.addConnectionPlugin('rayo',
{ {
//console.log('Rayo plugin leave ' + mixer); //console.log('Rayo plugin leave ' + mixer);
this._onhook(); var that = this;
var iq = $iq({to: mixer + "@" + this._connection.domain, from: this._connection.jid, type: "get"}).c("unjoin", {xmlns: Strophe.NS.RAYO_CORE, "mixer-name": mixer});
that._connection.sendIQ(iq, function(response)
{
this._onhook();
}, function(error) {
$('error', error).each(function()
{
var errorcode = $(this).attr('code');
if (that.callbacks && that.callbacks.onError) that.callbacks.onError("unjoin failure " + errorcode);
});
});
}, },
hold: function(callId) hold: function(callId)
...@@ -124,8 +149,7 @@ Strophe.addConnectionPlugin('rayo', ...@@ -124,8 +149,7 @@ Strophe.addConnectionPlugin('rayo',
{ {
that._onhook(); that._onhook();
}, function(error) { }, function(error) {
//console.log(error);
$('error', error).each(function() $('error', error).each(function()
{ {
......
...@@ -804,14 +804,11 @@ public class ConferenceManager { ...@@ -804,14 +804,11 @@ public class ConferenceManager {
/* /*
* Transfer an incoming call to the target conference. * Transfer an incoming call to the target conference.
*/ */
public void transferMember(ConferenceManager newConferenceManager, public void transferMember(ConferenceManager newConferenceManager, ConferenceMember member) throws IOException
ConferenceMember member) throws IOException { {
leave(member, true); // leave the temporary conference
leave(member, true); // leave the temporary conference member.reinitialize(newConferenceManager, true);
newConferenceManager.joinConference(member); // join the new conference
member.reinitialize(newConferenceManager, false);
newConferenceManager.joinConference(member); // join the new conference
} }
/** /**
......
...@@ -73,7 +73,7 @@ public class IncomingConferenceHandler extends Thread ...@@ -73,7 +73,7 @@ public class IncomingConferenceHandler extends Thread
private IncomingCallHandler incomingCallHandler; private IncomingCallHandler incomingCallHandler;
private String lastDtmfKey; private String lastDtmfKey = "";
private String phoneNo; private String phoneNo;
/** /**
......
...@@ -442,15 +442,12 @@ public class MemberReceiver implements MixDataSource, TreatmentDoneListener { ...@@ -442,15 +442,12 @@ public class MemberReceiver implements MixDataSource, TreatmentDoneListener {
return; return;
} }
if (telephoneEventPayload == 0 && //if (telephoneEventPayload == 0 && (cp.dtmfDetection() || cp.getJoinConfirmationTimeout() != 0)) {
(cp.dtmfDetection() || cp.getJoinConfirmationTimeout() != 0)) {
if (traceCall || Logger.logLevel >= Logger.LOG_INFO) { Logger.println("Call " + cp + " starting dtmf Detector..." + telephoneEventPayload + " " + cp.dtmfDetection());
Logger.println("Call " + cp + " starting dtmf Detector...");
}
dtmfDecoder = new DtmfDecoder(this, myMediaInfo); dtmfDecoder = new DtmfDecoder(this, myMediaInfo);
} //}
if (myMediaInfo.getEncoding() == RtpPacket.SPEEX_ENCODING) { if (myMediaInfo.getEncoding() == RtpPacket.SPEEX_ENCODING) {
try { try {
......
...@@ -97,10 +97,21 @@ Strophe.addConnectionPlugin('rayo', ...@@ -97,10 +97,21 @@ Strophe.addConnectionPlugin('rayo',
//console.log(headers) //console.log(headers)
if (this._isOffhook()) this._onhook(); if (this._isOffhook()) this._onhook();
var that = this;
this._offhook(mixer, headers, function() this._offhook(mixer, headers, function()
{ {
var iq = $iq({to: mixer + "@" + this._connection.domain, from: this._connection.jid, type: "get"}).c("join", {xmlns: Strophe.NS.RAYO_CORE, "mixer-name": mixer});
that._connection.sendIQ(iq, null, function(error)
{
$('error', error).each(function()
{
var errorcode = $(this).attr('code');
if (that.callbacks && that.callbacks.onError) that.callbacks.onError("join failure " + errorcode);
});
});
}); });
}, },
...@@ -108,7 +119,21 @@ Strophe.addConnectionPlugin('rayo', ...@@ -108,7 +119,21 @@ Strophe.addConnectionPlugin('rayo',
{ {
//console.log('Rayo plugin leave ' + mixer); //console.log('Rayo plugin leave ' + mixer);
this._onhook(); var that = this;
var iq = $iq({to: mixer + "@" + this._connection.domain, from: this._connection.jid, type: "get"}).c("unjoin", {xmlns: Strophe.NS.RAYO_CORE, "mixer-name": mixer});
that._connection.sendIQ(iq, function(response)
{
this._onhook();
}, function(error) {
$('error', error).each(function()
{
var errorcode = $(this).attr('code');
if (that.callbacks && that.callbacks.onError) that.callbacks.onError("unjoin failure " + errorcode);
});
});
}, },
hold: function(callId) hold: function(callId)
...@@ -124,8 +149,7 @@ Strophe.addConnectionPlugin('rayo', ...@@ -124,8 +149,7 @@ Strophe.addConnectionPlugin('rayo',
{ {
that._onhook(); that._onhook();
}, function(error) { }, function(error) {
//console.log(error);
$('error', error).each(function() $('error', error).each(function()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment