versatica / JsSIP

JsSIP, the JavaScript SIP library
https://jssip.net
Other
2.42k stars 744 forks source link

Receiving new message from another user #779

Closed du-nt closed 2 years ago

du-nt commented 2 years ago

Both of them export const pureRegister = async (sipAccount: string, sipPassword: string) => new Promise(resolve => { let configuration = { sockets: [socket], uri: 'sip:' + sipAccount + '@' + domain, password: sipPassword, register: true, contact_uri: 'sip:' + sipAccount + '@' + domain + ';transport=wss', session_timers: false, }; ua = new JsSIP.UA(configuration); ua.on('newMessage', data => { console.log('newMessage'); }) ua.start(); }); Sender: ua.sendMessage('sip:' + phoneNumber + '@' + domain, 'something');

Receiver got nothing. What's wrong?