Module: sems Branch: master Commit: a9c7556c2c05595a25f7e0c162b6f2c9a7e5db7e URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=a9c7556c2c05595a25f7e0c162b6f2c9a7e5db7e
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Tue Feb 22 19:06:01 2011 +0100 b/f: ignore prov replies in canceled INV - provisional replies received for canceled INVITEs are ignored - if bye() is called for pending call and no UAC trans to cancel, go into Disconnected state --- core/AmSipDialog.cpp | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index bbdf299..772c271 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -329,13 +329,18 @@ void AmSipDialog::updateStatus(const AmSipReply& reply) switch(status){ case Disconnecting: if (trans_method == SIP_METH_INVITE) { + // ignore provisional reply in canceled INVITE + if (reply.code < 200) + break; if(reply.code == 487){ // CANCEL accepted + DBG("CANCEL accepted, status -> Disconnected\n"); status = Disconnected; } else { // CANCEL rejected + DBG("CANCEL rejected/too late - bye()\n"); bye(); // if BYE could not be sent, // there is nothing we can do anymore... @@ -776,6 +781,7 @@ int AmSipDialog::bye(const string& hdrs, int flags) // to send the reply on behalf of the app. DBG("ignoring bye() in Pending state: " "no UAC transaction to cancel.\n"); + status = Disconnected; } return 0; default: _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
