我正在使用NodeJS,FreeSWITCH和sip.js。
我尝试使用sip.js注册一个sip用户,它可以工作。 当我尝试使用耳机拨打电话时,它说没有找到设备。
我没有使用SSL。
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>Calling to 1001....</h1>
<script src="sip-0.10.0.min.js"></script>
<script>
var config = {
// Replace this IP address with your FreeSWITCH IP address
uri: '1000@127.0.0.1',
// Replace this IP address with your FreeSWITCH IP address
// and replace the port with your FreeSWITCH ws port
wsServers: 'ws://127.0.0.1:5066',
// FreeSWITCH Default Username
authorizationUser: '1000',
// FreeSWITCH Default Password
password: '1234'
};
var ua = new SIP.UA(config);
var session = ua.invite('1001@127.0.0.1', {
sessionDescriptionHandlerOptions: {
constraints: {
audio: true,
video: false
}
}
});
</script>
</body>
</html>
我测试了它并且它只能用一种方式(1000次拨打1001,1001可以听到1000和1000听不到1001)。
有人能告诉我我做错了什么吗?