SIP disconnect was performed, but SIP unregistration failed.

sangsoo

Member
Hello.
SIP disconnect was performed, but SIP unregistration failed.

I integrated with Asterisk following this guide. SIP call connections work fine.
: https://docs.flashphoner.com/static...ons/SIP_calls_in_a_WebRTC-compatible_browser/

----- MY WCS, Version info-----
wcs_version=5.3.243-b287c9cf9f9fb400f97398296810c5ca214b5199
wcs_client_version=2.0.269-7ca52229c68b6b769e3e67e29c7e4cf887237822

After register connect, if disconnect is called or the webpage is closed, I want unregister to process within 60 seconds.

Looking at the server logs, it appears that even after calling disconnect, the register refresh timer (set to 50 seconds?) continues to run, causing the registration to persist and preventing unregistration.
1763800656314.png


I applied this setting in flashphoner.properties but it didn't resolve the issue.
#SIP ===================
#dtmf=INFO
dtmf=RFC2833
reg_expires=60
sip_force_session_expires=60

Below is the Asterisk pjsip.conf configuration.
1763800790210.png


How can I achieve the desired behavior (processing sip unregist after a certain time following the disconnect call)?
Thank you.
 

Max

Administrator
Staff member
Hello

This is the WCS SIP mapping

1. Connect to WCS via Websocket.
Code:
var session = Flashphoner.createSession(connectionOptions);
Will be mapped to SIP REGISTER with initial register logic.

2. Start a new SIP call.
Code:
session.createCall().call();
Will be mapped to SIP INVITE

3. Disconnecting from WCS via Websocket.
Code:
session.disconnect();
Will be mapped to SIP REGISTER with unregister logic.

Therefore if you just hangup a call (with SIP BYE), SIP registration is still valid because Websocket connection is still established.
Code:
call.hangup();
Note. SIP registration process is required if you plan to receive incoming calls
Therefore if you do outgoing SIP calls only, REGISTER logic can be omitted. Pass sipRegisterRequired false to omit SIP register logic (no SIP REGISTER requests).
Code:
var session = Flashphoner.createSession({sipRegisterRequired: false});
See also:
 
Top