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 @@
{
window.connection.rayo.phone(
{
codec_name: "OPUS",
codec_name: "PCMU",
stereo_pan: "0",
sip_handset: sipHandset,
......@@ -344,7 +344,7 @@
if (!username) groupname = null;
window.connection.rayo.dial("xmpp:" + window.connection.jid, sipUri, {
codec_name: "OPUS",
codec_name: "PCMU",
//group_name: groupname
});
......
......@@ -97,10 +97,21 @@ Strophe.addConnectionPlugin('rayo',
//console.log(headers)
if (this._isOffhook()) this._onhook();
var that = this;
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',
{
//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)
......@@ -124,8 +149,7 @@ Strophe.addConnectionPlugin('rayo',
{
that._onhook();
}, function(error) {
//console.log(error);
}, function(error) {
$('error', error).each(function()
{
......
......@@ -804,14 +804,11 @@ public class ConferenceManager {
/*
* Transfer an incoming call to the target conference.
*/
public void transferMember(ConferenceManager newConferenceManager,
ConferenceMember member) throws IOException {
leave(member, true); // leave the temporary conference
member.reinitialize(newConferenceManager, false);
newConferenceManager.joinConference(member); // join the new conference
public void transferMember(ConferenceManager newConferenceManager, ConferenceMember member) throws IOException
{
leave(member, true); // leave the temporary conference
member.reinitialize(newConferenceManager, true);
newConferenceManager.joinConference(member); // join the new conference
}
/**
......
......@@ -73,7 +73,7 @@ public class IncomingConferenceHandler extends Thread
private IncomingCallHandler incomingCallHandler;
private String lastDtmfKey;
private String lastDtmfKey = "";
private String phoneNo;
/**
......
......@@ -442,15 +442,12 @@ public class MemberReceiver implements MixDataSource, TreatmentDoneListener {
return;
}
if (telephoneEventPayload == 0 &&
(cp.dtmfDetection() || cp.getJoinConfirmationTimeout() != 0)) {
//if (telephoneEventPayload == 0 && (cp.dtmfDetection() || cp.getJoinConfirmationTimeout() != 0)) {
if (traceCall || Logger.logLevel >= Logger.LOG_INFO) {
Logger.println("Call " + cp + " starting dtmf Detector...");
}
Logger.println("Call " + cp + " starting dtmf Detector..." + telephoneEventPayload + " " + cp.dtmfDetection());
dtmfDecoder = new DtmfDecoder(this, myMediaInfo);
}
//}
if (myMediaInfo.getEncoding() == RtpPacket.SPEEX_ENCODING) {
try {
......
......@@ -97,10 +97,21 @@ Strophe.addConnectionPlugin('rayo',
//console.log(headers)
if (this._isOffhook()) this._onhook();
var that = this;
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',
{
//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)
......@@ -124,8 +149,7 @@ Strophe.addConnectionPlugin('rayo',
{
that._onhook();
}, function(error) {
//console.log(error);
}, function(error) {
$('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