It appears there are actually more states we don't handle
this properly in. I took a different approach and put in
"catch all" like handling for inbound INVITEs and UPDATEs in
dispatchOthers. If an INVITE or UPDATE makes it here, we will
respond with a 491.
void
InviteSession::dispatchOthers(const SipMessage& msg)
{
// handle OnGeneralFailure
// handle OnRedirect
switch (msg.header(h_CSeq).method())
{
case
INVITE:
case
UPDATE:
if
(msg.isRequest())
{
SharedPtr<SipMessage> response(new SipMessage);
mDialog.makeResponse(*response, msg, 491);
send(response);
break;
}
case PRACK:
dispatchPrack(msg);
break;
case CANCEL:
dispatchCancel(msg);
break;
case BYE:
dispatchBye(msg);
break;
case INFO:
dispatchInfo(msg);
break;
case MESSAGE:
dispatchMessage(msg);
break;
case ACK:
// Ignore duplicate ACKs from 2xx
reTransmissions
break;
default:
// handled in Dialog
WarningLog (<< "DUM delivered a "
<<
msg.header(h_CSeq).unknownMethodName()
<< " to the InviteSession in
state: " << toData(mState)
<< endl
<< msg);
resip_assert(0);
break;
}
}