-
Notifications
You must be signed in to change notification settings - Fork 788
Description
I found problem with the blind call transfer scenario
-
1st phone send REFER to 2nd
-
2nd: REFER accepted, and start calling to 3rd
-
1st phone send BYE to 2nd
Notes:
According RFC 5589 1st phone should not here send BYE to 2nd until receive NOTIFY with calling result.
But the specification does not provide realistic case when operator in the 1st phone initiate
call transfer for the 2nd, and don't have time to wait result. -
Now 3rd phone accept incoming from 2nd phone call
Then the 2nd phone will send NOTIFY to 1st.
Because the dialog is already terminated, there will be error during the sending,
and the "2nd-3rd" call will be closed.
(there will be also some exception)
Seems the unusual call transfer case is not tested/implemented.
But it could be, for example CISCO implemented the case: "https://www.cisco.com/c/en/us/td/docs/ios/voice/sip/configuration/guide/12_4t/sip_12_4t_book/sip_cg-call_x-fer.pdf", Page 8. Figure 2.
Proposed fix
Don't send NOTIFY and returns without error, if dialog (that receive REFER) is terminated.
So dialog termination works as unsubscribe for NOTIFY subscription.
File: ReferNotifier.js Function: notify
`
notify(code, reason)
{
debug('notify()');
if (this._active === false)
{
return;
}
//----------- fix begin ------------
if( this._session.status === this._session.C.STATUS_TERMINATED)
{
this._active = false;
return;
}
//----------- fix end --------------
reason = reason || JsSIP_C.REASON_PHRASE[code] || '';
`