gmaruzz / saraphone

SaraPhone is an open source SIP WebRTC phone, complete with HotDesking, Redial, BLFs, MWI, DND, PhoneBook, Hold, Mute, Notifications. SaraPhone is fully integrated with FusionPBX. Based on SIP.js, SaraPhone works with all WebRTC compliant servers: FreeSWITCH, Asterisk, OpenSIPS, Kamailio, etc. SaraPhone gets its name from Giovanni's wife, Sara.
Mozilla Public License 2.0
152 stars 71 forks source link

Double BYE when call is disconnected by Hangup button #43

Open sobomax opened 2 months ago

sobomax commented 2 months ago

I've noticed the SaraP is generating double BYE when established session is disconnected using "Hangup" button on the web. The SIP.js demo client does not have this issue, so it suggests some incorrect API usage somewhere.

sara.log sipjs.log ScreenShot1323

gmaruzz commented 1 month ago

ciao Max!

Actually, IIRC, is by design: everything and anything that happens that endangers, ends, or makes problem to the call leg close the session and generates a BYE (so to maintain consistency in the sip.js library state machine).

I will release a new version of SaraPhone when my lazyness will allow me, based on the latest "normal" version of sip.js (15.x, before the typescript/postmodern mayhem). But it probably will still have that behavior.

Anyway, if you deeply test a patch modifying this behavior, it may be merged.

What I want to avoid at all costs is to have SaraPhone blocked invisibly because sip.js is in inconsistent state because some unexpected signaling/network/whatever problem