0.9.2 SIP.WebRTC.Simple - requires registered UA?

420 views
Skip to first unread message

Jamie Strachan

unread,
Jan 19, 2018, 4:51:26 PM1/19/18
to SIP.js
Hi,

I am attempting to upgrade my web app from SIP.js 0.7.x to 0.9.2

Previously I was able to create a call without registering.

After reading through the guide, it seems that the old method of doing the invite through the ua is deprecated, and I should use the Simple object instead.

However, after converting things, I get an error message indicating that Simple requires a registered UA for calling.

Is that right?

So, I went ahead and removed the "register: false" from the ua configuration of the simple configuration, but I am still getting the same message!

Is there something I need to do to register? The examples from the guide do not seem to do anything special before calling the target.

The other option, I suppose, is to go back to using the methods on the UserAgent, but those seem to be hidden away from the guides.  The guide shows how to make a UA, but then that's it... there doesn't seem to be anything else on how to use the UA to make a call.
Previously I would get a session and could call mute/unmute on that, which doesn't seem to exist any more.

I did see another post in this forum about making an unregistered call, which gave me hope that I could use the Simple method to make that call.


Thanks for any help!

Jamie Strachan

unread,
Jan 19, 2018, 5:01:37 PM1/19/18
to SIP.js
Just for fun, I edited sip.0.9.2.js and removed the check for a registered UA.

Line 11216:
  Simple.prototype.call = function (destination) {
    if (!this.ua /* || !this.checkRegistration() */ ) {
      this.logger.warn('A registered UA is required for calling');
      return;
    }

After that change, I was able to once again place an unregistered call to my FreeSWITCH server.

James Criscuolo

unread,
Jan 19, 2018, 5:02:13 PM1/19/18
to SIP.js
Hi Jamie,
  Making a call on an unregistered UA is certainly still possible, without the Simple interface. Which guide mentioned this being deprecated?

James

Jamie Strachan

unread,
Jan 22, 2018, 10:24:07 AM1/22/18
to SIP.js
I suppose Deprecated was the wrong word.

However, looking through these pages, ( https://sipjs.com/guides/ ) all the old instructions for starting a call have been replaced with the new Simple examples.
The Simple page in the guide indicates reading the API docs for non-simple usage.
In the API docs, I had to dig quite a bit to piece together the things I need to do to get a call going, and read some of the code from the Simple class.
For example, how to render video and how to mute the video for a call.
It would be nice to have some more complete examples!

Thanks,
Reply all
Reply to author
Forward
0 new messages