-
Notifications
You must be signed in to change notification settings - Fork 790
Open
Description
Description
When a REFER request requires authentication (401/407), the ReferSubscriber's **_id** is not updated with the new CSeq, causing NOTIFY messages to be rejected with 481.
Steps to Reproduce
- Send a REFER request that requires authentication
- Server responds with 401/407
- JsSIP re-sends REFER with incremented CSeq (e.g., 5855 instead of 5854)
- Server sends NOTIFY with
Event: refer;id=5855 - JsSIP looks for
_referSubscribers[5855]but only has key5854 - NOTIFY is rejected with 481 "Subscription does not exist"
Root Cause
In ReferSubscriber.js line 84:
this._id = request.cseq;
The _id is set from the original request's CSeq.
In RequestSender.js lines 162-164, when handling 401/407:
this._request = this._request.clone();
this._request.cseq += 1;
The CSeq is incremented but ReferSubscriber's _id is never updated.
Suggested Fix
Listen to onAuthenticated event in ReferSubscriber and update _id:
eventHandlers: {
onAuthenticated: (request) => {
this._id = request.cseq;
// Also update key in _referSubscribers map
}
}
Version
JsSIP 3.12Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels