b/f: fixes INV w/ immediate CANCEL use-case.

sayer/1.4-spce2.6
Raphael Coeffic 15 years ago
parent 577a815409
commit fb86cab1bd

@ -878,11 +878,8 @@ void SBCDialog::onBye(const AmSipRequest& req)
void SBCDialog::onCancel()
{
if(dlg.getStatus() == AmSipDialog::Pending) {
DBG("Wait for leg B to terminate");
} else {
DBG("Canceling leg A on CANCEL since dialog is not pending");
stopCall();
dlg.reply(invite_req, 487, "Request terminated");
setStopped();
}
}

@ -843,8 +843,18 @@ void AmB2BCallerSession::onB2BEvent(B2BEvent* ev)
AmSipReply& reply = ((B2BSipReplyEvent*)ev)->reply;
if(other_id.empty()){
DBG("Discarding B2BSipReply from other leg (other_id empty)\n");
DBG("reply code=%i; method=%s; callid=%s; local_tag=%s; "
"remote_tag=%s; cseq=%i\n",
reply.code,reply.method.c_str(),reply.callid.c_str(),reply.local_tag.c_str(),
reply.remote_tag.c_str(),reply.cseq);
return;
}
if(other_id != reply.local_tag){
DBG("Dialog mismatch!\n");
DBG("Dialog mismatch! (oi=%s;lt=%s)\n",
other_id.c_str(),reply.local_tag.c_str());
return;
}

@ -51,7 +51,7 @@ void AmSipDispatcher::handleSipMsg(AmSipReply &reply)
"unhandled SIP reply: %s\n", reply.print().c_str());
}
} else {
ERROR("unhandled SIP reply: %s\n", reply.print().c_str());
WARN("unhandled SIP reply: %s\n", reply.print().c_str());
}
delete ev;
}

@ -690,7 +690,7 @@ void SipCtrlInterface::handle_reply_timeout(AmSipTimeoutEvent::EvType evt,
}
if(!AmEventDispatcher::instance()->post(c2stlstr(tr->to_tag), tmo_evt)){
ERROR("Could not post timeout event (sess. id: %.*s)\n",tr->to_tag.len,tr->to_tag.s);
DBG("Could not post timeout event (sess. id: %.*s)\n",tr->to_tag.len,tr->to_tag.s);
delete tmo_evt;
}
}

Loading…
Cancel
Save