-
-
Notifications
You must be signed in to change notification settings - Fork 317
Description
Good day all,
Just wondering about the possibility of getting the received reason phrase when the SIP CANCEL occurs.
Apperantly dar_sip_ua(rtc_session) is always using the code 487 as shown bellow:
`
if (request.method == SipMethod.CANCEL) {
/* RFC3261 15 States that a UAS may have accepted an invitation while a CANCEL
* was in progress and that the UAC MAY continue with the session established by
* any 2xx response, or MAY terminate with BYE. DartSIP does continue with the
* established session. So the CANCEL is processed only if the session is not yet
* established.
*/
/*
* Terminate the whole session in case the user didn't accept (or yet send the answer)
* nor reject the request opening the session.
*/
if (_status == C.STATUS_WAITING_FOR_ANSWER ||
_status == C.STATUS_ANSWERED) {
_status = C.STATUS_CANCELED;
_request.reply(487);
_failed('remote', null, request, null, 487,
DartSIP_C.CausesType.CANCELED, request.reason_phrase);
}
}`
So it will never assume the reason sended by the proxy...example bellow:
`
I/flutter (29959): CANCEL sip:99471w78@XX.XX.XX.XX:38422;transport=ws SIP/2.0
I/flutter (29959): Via: SIP/2.0/WSS XX.XX.XX.XX:8089;rport;branch=z9hG4bKPjb87b83c8-f7cd-4b24-a80f-b8fef28f25e8;alias
I/flutter (29959): From: "XXXXX" sip:02071487525@XXXXX;tag=1e9ac788-bd31-4eee-a32b-ab571d6c21ca
I/flutter (29959): To: sip:99471w78@XX.XX.XX.XX
I/flutter (29959): Call-ID: 1e11b8c2-09bf-4bf3-9378-2d919beda788
I/flutter (29959): CSeq: 23918 CANCEL
I/flutter (29959): Reason: SIP;cause=200;text="Call completed elsewhere"
`
Hope you guys find this usefull,
Thanks a lot!
If you need any help just hit me Up.