var socket = new JsSIP.WebSocketInterface(ws://sip-ws.example.com);
var configuration = {
sockets : [ socket ],
uri : 'sip:alice@example.com',
password : 'superpassword'
};
var ua = new JsSIP.UA(configuration);
强制性参数
uri
这是您的提供商提供给您的SIP地址,uri: "sip:alice@example.com"
sockets
设置JsSIP.socket,此参数可以用多种方式表示
sockets: socket
sockets: [ socket1, socket2, ]
sockets: [ {socket: socket1, weight: 10}, {socket: socket2, weight: 1} ]
可选参数
authorization_user
生成身份验证凭据时要使用的用户名(字符串)。如果未定义,则使用uri参数中的值。authorization_user: "alice123"