Quobis / QoffeeSIP

QoffeeSIP is a complete Javascript SIP stack that can be used in a website to exploit all the multimedia capabilities of WebRTC technology. Instead of using pure Javascript, QoffeeSIP has been coded with CoffeeScript so you can easily modify it to suit your needs.
GNU Lesser General Public License v3.0
27 stars 5 forks source link

Constant RE REGISTER tries moment client registers #2

Open alliv8 opened 11 years ago

alliv8 commented 11 years ago

The moment i click register, the UA sends a register message to the server after which it receives a SIP/2.0 200 OK but keeps resending a RE REGISTER message. It bombards the server with these messages and eventually the browser crashes.

I'm using Chrome 28 and have OverSIP on the server side to handle websockets.

I also tried to make a call by just initiating a websocket and not registering by trying to dial a number after clicking init, but i get the error:

TypeError: this.pc is undefined

return this.pc.createOffer(this.setLocalDescription, error, {});

My requirement is for outbound calls only and don't need to register the Websocket clients with the server.

damianfral commented 11 years ago

Hi @alliv8,

are you using trunk branch? Currently, master branch is a bit outdated. I recommend you to use trunk branch.

For the first problem, could you send me some traces?

QoffeeSIP needs to be registered in order to be able to make calls. It's not necesary in our scenarios, so we have no plans to change this. Anyway, this is easy to change this moving some code from register method to the QS contructor. I encourage you to fork QoffeeSIP, make this change and send a pull request. :)

prasaddp5 commented 10 years ago

I have a hack to overcome this avalanche registration, please modify the code as shown below. At two places you need to comment and a new line.

Currently, Qoffee sends re-register as soon as it gets 200 OK for register which is not needed unless registration expires.

case 1: case 200: _this.info("register-success", message); newRegister.cseq.number += 1; //return _this.send(_this.createMessage(newRegister)); //comment this out return _this; //add this

case 2: case 200: _this.info("register-success", message); newRegister.cseq.number += 1; //return _this.send(_this.createMessage(newRegister)); //comment this out return _this; // add this