RFC 3261, "SIP: Session Initiation Protocol", June 2002Source of RFC: sip (rai)
Errata ID: 4275
Publication Format(s) : TEXT
Reported By: Chao Wang
Date Reported: 2015-02-19
Section 15 says:
The caller's UA MAY send a BYE for either confirmed or early dialogs
It should say:
The caller's UA MUST send a BYE for confirmed dialogs
In general, BYE shall be handled in the same way as CANCEL if it is for early dialogs.
In case, when BYE is on the way to the destination, the callee probably accepts INVITE, the race condition will occure.
If we follow the procedure as CANCEL, caller shall send ACK for 200 OK and immediately release the session using BYE.
So two BYEs will be triggered in the case, it does not make sense.