InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk
https://www.innovateasterisk.com
GNU Affero General Public License v3.0
499 stars 245 forks source link

Reregistration #506

Open prathibhacdac opened 7 months ago

prathibhacdac commented 7 months ago

Is it possible to increase the reregistration time?

InnovateAsterisk commented 7 months ago

The browser phone will register and re-register in a loop according to this parameter: https://github.com/InnovateAsterisk/Browser-Phone/blob/35e3433c420a04103b76ee930273c553c5564ef5/Phone/phone.js#L104

There is also an offset that will make the phone register a little before this. Essentially the expiration is the duration that both the client and server agree to as being the maximum duration for validity. So if the client takes too long to refresh the registration, then the server will consider the registration expired, while the client is busy re-registering. The idea is that the client proposes an explanation time, say 300, and then a few seconds before, it refreshes the registration.

prathibhacdac commented 7 months ago

After 300seconds, the browser goes to unregistered state, but it is not getting reregistered.

prathibhacdac commented 7 months ago

image

InnovateAsterisk commented 7 months ago

Are you setting an expire on the server side?

prathibhacdac commented 7 months ago

No. Do I need to set registerexpires in the server side?

ignoreregexpire=no

This is the error in browser console: Uncaught (in promise) Error: REGISTER request already in progress, waiting for final response

prathibhacdac commented 7 months ago

How to resolve this issue?

Browser Console Log:

An attempt was made to send a REGISTER request while a prior one was still in progress. RFC 3261 requires UAs MUST NOT send a new registration until they have received a final response from the registrar for the previous one or the previous REGISTER request has timed out. Note that if the transport disconnects, you still must wait for the prior request to time out before sending a new REGISTER request or alternatively dispose of the current Registerer and create a new Registerer.

sip-0.20.0.min.js:2 Uncaught (in promise) Error: REGISTER request already in progress, waiting for final response sip-0.20.0.min.js:2 Wed Mar 06 2024 13:05:43 GMT+0530 (India Standard Time) | sip.Registerer | Registration expired

prathibhacdac commented 6 months ago

Pls suggest a solution for this issue.

InnovateAsterisk commented 6 months ago

REGISTER request already in progress, waiting for final response

Your server is not completing the registration correctly. You should see this in the Asterisk CLI or in the SIP messages of the Browser Phone (Dev Tools > Networking > /ws >> Messages)