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
sayer/1.4-spce2.6
Stefan Sayer 16 years ago
parent f6f29c636d
commit a9c7556c2c

@ -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:

Loading…
Cancel
Save