Discussion:
[Freeswitch-users] user registration with sip.js
Aqs Younas
2015-05-26 15:34:05 UTC
Permalink
Hi, Users.
I am trying to register default freeswitch user "1003" through webrtc using
sip.js.
This is my "*index.html*"

<html>
<head>
</head>
<body>
<script src="sip-0.7.0.js"></script>
<script src="example.js"></script>
</body>
</html>

and *example.js*
var config = {

// Replace this IP address with your FreeSWITCH IP address
uri: '***@192.168.1.30',

// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH port
ws_servers: 'ws://192.168.1.30:5066',

// FreeSWITCH Default Username
authorizationUser: '1003',

// FreeSWITCH Default Password
password: '1234'
register: true

};

var bob = new SIP.UA(config);

bob.start();

Both files are placed inside apache folder with name freeswitch_rtc.
When i run in my firefox.

*http://192.168.1.30/freeswitch_rtc/ <http://192.168.1.30/freeswitch_rtc/>*

I see nothing neither on fs_curl, nor tshark shows any register packet on
freeswitch ip.

Pardon me for my naive question, just learning how this amazing machine
(freeswitch) works.

Can someone please tell me what is wrong with this code. Or provide me some
simple example to make a call with webrtc or any tutorial.

Thanks.
Victor Medina
2015-05-26 15:49:41 UTC
Permalink
Did you anable the webrtc endpoint in your profiles?
Post by Aqs Younas
Hi, Users.
I am trying to register default freeswitch user "1003" through webrtc
using sip.js.
This is my "*index.html*"
<html>
<head>
</head>
<body>
<script src="sip-0.7.0.js"></script>
<script src="example.js"></script>
</body>
</html>
and *example.js*
var config = {
// Replace this IP address with your FreeSWITCH IP address
// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH port
ws_servers: 'ws://192.168.1.30:5066',
// FreeSWITCH Default Username
authorizationUser: '1003',
// FreeSWITCH Default Password
password: '1234'
register: true
};
var bob = new SIP.UA(config);
bob.start();
Both files are placed inside apache folder with name freeswitch_rtc.
When i run in my firefox.
*http://192.168.1.30/freeswitch_rtc/ <http://192.168.1.30/freeswitch_rtc/>*
I see nothing neither on fs_curl, nor tshark shows any register packet on
freeswitch ip.
Pardon me for my naive question, just learning how this amazing machine
(freeswitch) works.
Can someone please tell me what is wrong with this code. Or provide me
some simple example to make a call with webrtc or any tutorial.
Thanks.
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Víctor E. Medina M.
Platform Architect / Chief Infrastructure
+58424 291 4561
BB #79A8AFA2
@VMCibersys
Aqs Younas
2015-05-26 16:35:35 UTC
Permalink
Thanks for your reply. Yes, i have enable the webrtc in my internal.xml

tcp 0 0 192.168.1.30:5066 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:7443 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 127.0.0.1:8021 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5080 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5060 0.0.0.0:*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5080 :::*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5060 :::*
LISTEN 11078/freeswitch
udp 0 0 192.168.1.30:5080 0.0.0.0:*
11078/freeswitch
udp 0 0 239.255.255.250:1900 0.0.0.0:*
11078/freeswitch
udp 0 0 192.168.1.30:5060 0.0.0.0:*
11078/freeswitch
udp6 0 0 ::1:5080
:::* 11078/freeswitch
udp6 0 0 ::1:5060
:::* 11078/freeswitch

May be I am missing some packages, related to js.

Thanks
Post by Victor Medina
Did you anable the webrtc endpoint in your profiles?
Post by Aqs Younas
Hi, Users.
I am trying to register default freeswitch user "1003" through webrtc
using sip.js.
This is my "*index.html*"
<html>
<head>
</head>
<body>
<script src="sip-0.7.0.js"></script>
<script src="example.js"></script>
</body>
</html>
and *example.js*
var config = {
// Replace this IP address with your FreeSWITCH IP address
// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH port
ws_servers: 'ws://192.168.1.30:5066',
// FreeSWITCH Default Username
authorizationUser: '1003',
// FreeSWITCH Default Password
password: '1234'
register: true
};
var bob = new SIP.UA(config);
bob.start();
Both files are placed inside apache folder with name freeswitch_rtc.
When i run in my firefox.
*http://192.168.1.30/freeswitch_rtc/
<http://192.168.1.30/freeswitch_rtc/>*
I see nothing neither on fs_curl, nor tshark shows any register packet on
freeswitch ip.
Pardon me for my naive question, just learning how this amazing machine
(freeswitch) works.
Can someone please tell me what is wrong with this code. Or provide me
some simple example to make a call with webrtc or any tutorial.
Thanks.
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Víctor E. Medina M.
Platform Architect / Chief Infrastructure
+58424 291 4561
BB #79A8AFA2
@VMCibersys
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Chris Tunbridge
2015-05-26 16:53:42 UTC
Permalink
Can you try using wsServers instead of ws_servers as noted here:
http://sipjs.com/api/0.7.0/ua_configuration_parameters/#wsservers
Post by Aqs Younas
Thanks for your reply. Yes, i have enable the webrtc in my internal.xml
tcp 0 0 192.168.1.30:5066 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:7443 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 127.0.0.1:8021 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5080 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5060 0.0.0.0:*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5080 :::*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5060 :::*
LISTEN 11078/freeswitch
udp 0 0 192.168.1.30:5080 0.0.0.0:*
11078/freeswitch
udp 0 0 239.255.255.250:1900 0.0.0.0:*
11078/freeswitch
udp 0 0 192.168.1.30:5060 0.0.0.0:*
11078/freeswitch
udp6 0 0 ::1:5080
:::* 11078/freeswitch
udp6 0 0 ::1:5060
:::* 11078/freeswitch
May be I am missing some packages, related to js.
Thanks
Post by Victor Medina
Did you anable the webrtc endpoint in your profiles?
Post by Aqs Younas
Hi, Users.
I am trying to register default freeswitch user "1003" through webrtc
using sip.js.
This is my "*index.html*"
<html>
<head>
</head>
<body>
<script src="sip-0.7.0.js"></script>
<script src="example.js"></script>
</body>
</html>
and *example.js*
var config = {
// Replace this IP address with your FreeSWITCH IP address
// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH port
ws_servers: 'ws://192.168.1.30:5066',
// FreeSWITCH Default Username
authorizationUser: '1003',
// FreeSWITCH Default Password
password: '1234'
register: true
};
var bob = new SIP.UA(config);
bob.start();
Both files are placed inside apache folder with name freeswitch_rtc.
When i run in my firefox.
*http://192.168.1.30/freeswitch_rtc/
<http://192.168.1.30/freeswitch_rtc/>*
I see nothing neither on fs_curl, nor tshark shows any register packet
on freeswitch ip.
Pardon me for my naive question, just learning how this amazing machine
(freeswitch) works.
Can someone please tell me what is wrong with this code. Or provide me
some simple example to make a call with webrtc or any tutorial.
Thanks.
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Víctor E. Medina M.
Platform Architect / Chief Infrastructure
+58424 291 4561
BB #79A8AFA2
@VMCibersys
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Chris Tunbridge
2015-05-26 16:54:37 UTC
Permalink
Also with the newer versions of sip.js, you do not need to call ua.start()
as it should be set to autostart.
Post by Chris Tunbridge
http://sipjs.com/api/0.7.0/ua_configuration_parameters/#wsservers
Post by Aqs Younas
Thanks for your reply. Yes, i have enable the webrtc in my internal.xml
tcp 0 0 192.168.1.30:5066 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:7443 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 127.0.0.1:8021 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5080 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5060 0.0.0.0:*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5080 :::*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5060 :::*
LISTEN 11078/freeswitch
udp 0 0 192.168.1.30:5080 0.0.0.0:*
11078/freeswitch
udp 0 0 239.255.255.250:1900 0.0.0.0:*
11078/freeswitch
udp 0 0 192.168.1.30:5060 0.0.0.0:*
11078/freeswitch
udp6 0 0 ::1:5080
:::* 11078/freeswitch
udp6 0 0 ::1:5060
:::* 11078/freeswitch
May be I am missing some packages, related to js.
Thanks
Post by Victor Medina
Did you anable the webrtc endpoint in your profiles?
Post by Aqs Younas
Hi, Users.
I am trying to register default freeswitch user "1003" through webrtc
using sip.js.
This is my "*index.html*"
<html>
<head>
</head>
<body>
<script src="sip-0.7.0.js"></script>
<script src="example.js"></script>
</body>
</html>
and *example.js*
var config = {
// Replace this IP address with your FreeSWITCH IP address
// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH port
ws_servers: 'ws://192.168.1.30:5066',
// FreeSWITCH Default Username
authorizationUser: '1003',
// FreeSWITCH Default Password
password: '1234'
register: true
};
var bob = new SIP.UA(config);
bob.start();
Both files are placed inside apache folder with name freeswitch_rtc.
When i run in my firefox.
*http://192.168.1.30/freeswitch_rtc/
<http://192.168.1.30/freeswitch_rtc/>*
I see nothing neither on fs_curl, nor tshark shows any register packet
on freeswitch ip.
Pardon me for my naive question, just learning how this amazing machine
(freeswitch) works.
Can someone please tell me what is wrong with this code. Or provide me
some simple example to make a call with webrtc or any tutorial.
Thanks.
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Víctor E. Medina M.
Platform Architect / Chief Infrastructure
+58424 291 4561
BB #79A8AFA2
@VMCibersys
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Chris Tunbridge
2015-05-26 16:56:15 UTC
Permalink
Post by Chris Tunbridge
Also with the newer versions of sip.js, you do not need to call ua.start()
as it should be set to autostart.
Post by Chris Tunbridge
http://sipjs.com/api/0.7.0/ua_configuration_parameters/#wsservers
Post by Aqs Younas
Thanks for your reply. Yes, i have enable the webrtc in my internal.xml
tcp 0 0 192.168.1.30:5066 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:7443 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 127.0.0.1:8021 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5080 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5060 0.0.0.0:*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5080 :::*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5060 :::*
LISTEN 11078/freeswitch
udp 0 0 192.168.1.30:5080 0.0.0.0:*
11078/freeswitch
udp 0 0 239.255.255.250:1900 0.0.0.0:*
11078/freeswitch
udp 0 0 192.168.1.30:5060 0.0.0.0:*
11078/freeswitch
udp6 0 0 ::1:5080
:::* 11078/freeswitch
udp6 0 0 ::1:5060
:::* 11078/freeswitch
May be I am missing some packages, related to js.
Thanks
Post by Victor Medina
Did you anable the webrtc endpoint in your profiles?
Post by Aqs Younas
Hi, Users.
I am trying to register default freeswitch user "1003" through webrtc
using sip.js.
This is my "*index.html*"
<html>
<head>
</head>
<body>
<script src="sip-0.7.0.js"></script>
<script src="example.js"></script>
</body>
</html>
and *example.js*
var config = {
// Replace this IP address with your FreeSWITCH IP address
// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH port
ws_servers: 'ws://192.168.1.30:5066',
// FreeSWITCH Default Username
authorizationUser: '1003',
// FreeSWITCH Default Password
password: '1234'
register: true
};
var bob = new SIP.UA(config);
bob.start();
Both files are placed inside apache folder with name freeswitch_rtc.
When i run in my firefox.
*http://192.168.1.30/freeswitch_rtc/
<http://192.168.1.30/freeswitch_rtc/>*
I see nothing neither on fs_curl, nor tshark shows any register packet
on freeswitch ip.
Pardon me for my naive question, just learning how this amazing
machine (freeswitch) works.
Can someone please tell me what is wrong with this code. Or provide me
some simple example to make a call with webrtc or any tutorial.
Thanks.
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Víctor E. Medina M.
Platform Architect / Chief Infrastructure
+58424 291 4561
BB #79A8AFA2
@VMCibersys
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Aqs Younas
2015-05-26 19:10:41 UTC
Permalink
Thanks for you reply. Done changes according to your recommendations.

var config = {
uri: 'sip:***@192.168.1.30',
wsServers: 'ws://192.168.1.30:5066',
authorizationUser: '1003',
password: '1234',
register: true
};
var bob = new SIP.UA(config);

But Still no error on firefox console, no log on fs_curl, tshark neither
shows any SIP packet on the network.

Am i executing it correctely? (*http://192.168.1.30/freeswitch_rtc/
<http://192.168.1.30/freeswitch_rtc/>)*

Thanks.
Post by Aqs Younas
Post by Chris Tunbridge
Also with the newer versions of sip.js, you do not need to call
ua.start() as it should be set to autostart.
Post by Chris Tunbridge
http://sipjs.com/api/0.7.0/ua_configuration_parameters/#wsservers
Post by Aqs Younas
Thanks for your reply. Yes, i have enable the webrtc in my internal.xml
tcp 0 0 192.168.1.30:5066 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:7443 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 127.0.0.1:8021 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5080 0.0.0.0:*
LISTEN 11078/freeswitch
tcp 0 0 192.168.1.30:5060 0.0.0.0:*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5080 :::*
LISTEN 11078/freeswitch
tcp6 0 0 ::1:5060 :::*
LISTEN 11078/freeswitch
udp 0 0 192.168.1.30:5080 0.0.0.0:*
11078/freeswitch
udp 0 0 239.255.255.250:1900 0.0.0.0:*
11078/freeswitch
udp 0 0 192.168.1.30:5060 0.0.0.0:*
11078/freeswitch
udp6 0 0 ::1:5080
:::* 11078/freeswitch
udp6 0 0 ::1:5060
:::* 11078/freeswitch
May be I am missing some packages, related to js.
Thanks
Post by Victor Medina
Did you anable the webrtc endpoint in your profiles?
Post by Aqs Younas
Hi, Users.
I am trying to register default freeswitch user "1003" through webrtc
using sip.js.
This is my "*index.html*"
<html>
<head>
</head>
<body>
<script src="sip-0.7.0.js"></script>
<script src="example.js"></script>
</body>
</html>
and *example.js*
var config = {
// Replace this IP address with your FreeSWITCH IP address
// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH port
ws_servers: 'ws://192.168.1.30:5066',
// FreeSWITCH Default Username
authorizationUser: '1003',
// FreeSWITCH Default Password
password: '1234'
register: true
};
var bob = new SIP.UA(config);
bob.start();
Both files are placed inside apache folder with name freeswitch_rtc.
When i run in my firefox.
*http://192.168.1.30/freeswitch_rtc/
<http://192.168.1.30/freeswitch_rtc/>*
I see nothing neither on fs_curl, nor tshark shows any register
packet on freeswitch ip.
Pardon me for my naive question, just learning how this amazing
machine (freeswitch) works.
Can someone please tell me what is wrong with this code. Or provide
me some simple example to make a call with webrtc or any tutorial.
Thanks.
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Víctor E. Medina M.
Platform Architect / Chief Infrastructure
+58424 291 4561
BB #79A8AFA2
@VMCibersys
_________________________________________________________________________
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Loading...