[Freeswitch-users] Digging into WebRTC for the first time
Mirko Brankovic
mirkobrankovic at gmail.com
Tue Sep 20 12:24:23 MSD 2016
Here is jthe simple example taht includes sip.js just to dial in to FS:
<html>
<style>
video {
border: 1px solid lightgrey;
}
</style>
<body>
<video id="localVideo" muted="muted"></video>
<video id="remoteVideo"></video>
<br>
<!--button id="startCall">Start Call</button-->
<button id="endCall">End Call</button>
<script src="sip-0.7.5.min.js"></script> //download this sip.js version and
place it in same dir as this html file or include from public link
<script id="e">
//var my_session;
var startButton = document.getElementById('startCall');
var my_session = document.addEventListener('DOMContentLoaded', function() {
my_session = userAgent.invite('sip:dial_string at your.dns.name', options);
}, false);
var endButton = document.getElementById('endCall');
endButton.addEventListener("click", function () {
my_session.bye();
}, false);
var options = {
media: {
constraints: {
audio: true,
video: true
},
render: {
local: document.getElementById('localVideo'),
remote: document.getElementById('remoteVideo')
}
}
};
var userAgent = new SIP.UA({
traceSip: true,
uri: 'dial_string at your.dns.name',
wsServers: ['wss://your.dns.name:port'], //wss port of verto or sofia
authorizationUser: 'directory_user',
password: 'pass',
hackIpInContact: true,
hackWssInTransport: true,
stunServers: ["stun.l.google.com:19302","stun1.l.google.com:19302","
stun2.l.google.com:19302","stun3.l.google.com:19302","
stun4.l.google.com:19302"]
});
</script>
</body>
</html>
so just google for sip-0.7.5.min.js download it or replace it with public
link.
Make sure to replace all dial_string, pass, your.dns.name:port values that
are for your server.
If you have proper certificates, for wss to be shaked on :) it will work, i
suggest letsencrypt
Good luck :)
Mirko
On Tue, Sep 20, 2016 at 1:47 AM, Anthony Minessale <
anthony.minessale at gmail.com> wrote:
> A lot of it is covered in https://freeswitch.org/
> confluence/display/FREESWITCH/Debian+8+Jessie though it goes a lot
> further and gives you a working video conference over webrtc.
>
> Loot at https://freeswitch.org/confluence/display/FREESWITCH/mod_verto as
> well.
>
> Also maybe look at http://sipjs.com/
>
>
> On Mon, Sep 19, 2016 at 6:43 PM, Don Hawkins <hawkins at hawkinsegroup.com>
> wrote:
>
>> I'm trying to get WebRTC going on our FS server for the first time. FS is
>> not my problem though, WebRTC is.
>>
>> All I need is a one button script that dials into FS, at which point I
>> will put the user in a conference, anyone have any example scripts that
>> already do this?
>>
>> I've looked at all the free libraries and unfortunately java is not my
>> thing so I've had no success.
>>
>> Thanks!
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> --
> Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬
>
> ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞
> http://twitter.com/FreeSWITCH
> ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+
> <http://freeswitch.org/g+>*
>
> ClueCon Weekly Development Call
> ☎ sip:888 at conference.freeswitch.org ☎ +19193869900
>
> https://www.youtube.com/watch?v=9XXgW34t40s
> https://www.youtube.com/watch?v=NLaDpGQuZDA
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
--
Regards,
Mirko
¯\_(ツ)_/¯
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160920/b92a3912/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list