-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New plugin audioconf for audio conferences using XMPP (Jitsi) or SIP …
…(Asterisk/FreeSWITCH)
- Loading branch information
1 parent
1c86c6d
commit 9d36d9c
Showing
24 changed files
with
55,390 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
(function (root, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(["converse"], factory); | ||
} else { | ||
factory(converse); | ||
} | ||
}(this, function (converse) { | ||
var _converse = null; | ||
|
||
converse.plugins.add("audioconf", { | ||
'dependencies': [], | ||
|
||
'initialize': function () { | ||
_converse = this._converse; | ||
|
||
_converse.api.settings.update({ | ||
visible_toolbar_buttons: {call: true}, | ||
}); | ||
|
||
window.click2Dial = { | ||
custom_button_color: "orange", | ||
custom_frame_color: "black", | ||
dial_pad: "true", | ||
did: "3001", | ||
display_button: "false", | ||
div_css_class_name: "btn-style-round-a", | ||
draggable: "true", | ||
incompatible_browser_configuration: "hide_widget", | ||
placement: "bottom-right", | ||
rating: "false", | ||
ringback: "true", | ||
server_url: "./audioconf", | ||
show_branding: "false", | ||
show_frame: "true", | ||
text: "Ask", | ||
use_default_button_css: "true", | ||
protocol: "sip", // 'sip' or 'xmpp' | ||
sip: {domain: "192.168.1.251", server: "wss://desktop-545pc5b:7443/sip/proxy?url=ws://192.168.1.251:5066", register: false, caller_uri: "sip:[email protected]", authorization_user: "1002", password: "1234"}, | ||
xmpp: {domain: "meet.jit.si", server: "https://meet.jit.si/http-bind"} | ||
} | ||
|
||
const head = document.getElementsByTagName('head')[0]; | ||
const script = document.createElement('script'); | ||
script.src = click2Dial.server_url + '/scripts/click2dial.js'; | ||
script.async = false; | ||
head.appendChild(script); | ||
|
||
console.log("audioconf plugin is ready"); | ||
}, | ||
|
||
'overrides': { | ||
ChatBoxView: { | ||
|
||
toggleCall: function toggleCall(ev) { | ||
ev.stopPropagation(); | ||
var room = Strophe.getNodeFromJid(this.model.attributes.jid).toLowerCase(); | ||
console.debug("toggleCall", room); | ||
|
||
if (!voxbone.WebRTC.rtcSession.isEnded || voxbone.WebRTC.rtcSession.isEnded()) | ||
{ | ||
infoVoxbone.did = "audioconf_" + room; | ||
click2Dial.makeCall(true); | ||
|
||
this.showHelpMessages(["Calling " + infoVoxbone.did]); | ||
} | ||
else { | ||
this.showHelpMessages(["Active call in progress. Clear call and try again"]); | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
})); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Audio Conference plugin for converse.js | ||
|
||
<img src="https://github.com/conversejs/community-plugins/blob/master/audioconf/audioconf.png" /> | ||
|
||
## Overview | ||
This plugin adds an audio conference feature a chat or groupchat. Both SIP and XMPP protocols are supported and a server-side conference bridge is required. For SIP, a PBX like Asterisk or FreeSWITCh can be used and for XMPP, a Colibri media server like Jitsi Videobridge is needed. | ||
|
||
|
||
## Install | ||
See https://m.conversejs.org/docs/html/plugin_development.html on how to install this plugin | ||
|
||
## Configure | ||
To configure, edit the audioconf.js plugin file and modify the click2Dial object | ||
|
||
``` | ||
window.click2Dial = { | ||
custom_button_color: "orange", | ||
custom_frame_color: "black", | ||
dial_pad: "true", | ||
did: "3001", | ||
display_button: "false", | ||
div_css_class_name: "btn-style-round-a", | ||
draggable: "true", | ||
incompatible_browser_configuration: "hide_widget", | ||
placement: "bottom-right", | ||
rating: "false", | ||
ringback: "true", | ||
server_url: "./audioconf", | ||
show_branding: "false", | ||
show_frame: "true", | ||
text: "Ask", | ||
use_default_button_css: "true", | ||
protocol: "xmpp", // 'sip' or 'xmpp' | ||
sip: {domain: "192.168.1.251", server: "wss://desktop-545pc5b:7443/sip/proxy?url=ws://192.168.1.251:5066", register: false, caller_uri: "sip:[email protected]", authorization_user: "1002", password: "1234"}, | ||
xmpp: {domain: "meet.jit.si", server: "https://meet.jit.si/http-bind"} | ||
} | ||
``` | ||
|
||
Default setting will use the public meet.ji.si service to provide an XMPP (colibri) type audio conference. To have a SIP based audio conference with Asterisk or FreeSWITCH, change the protocol value to "sip" and edit the sip object accordingly. | ||
|
||
## How to use | ||
Click on the telephone icon on the conversation toolbar to display the modal form |
Oops, something went wrong.