< Previous by Date | Date Index | Next by Date > |
Thread Index | Next in Thread > |
Hi, I just wanted to make sure that my handling of MWI NOTIFY
messages is correct, especially the reject responses..: case NOTIFY: { SharedPtr<SipMessage> resp; if
((request.header(h_ContentType).type() == "application")
&& (request.header(h_ContentType).subType() == "simple-message-summary")) { MessageWaitingContents* mwi = dynamic_cast<MessageWaitingContents*>(request.getContents()); if (!mwi) { resp = ood->reject(400); } else { mwi->checkParsed(); if
(!mwi->isWellFormed()) { resp = ood->reject(400); } else { // Do something app
specific… // ... resp = ood->accept(); } } } else { // We only handle simple-message-summary
at this time resp = ood->reject(489); } ASSERT(pDumCS); CLock sLock(pDumCS, "MyOutOfDialogHandler::onReceivedRequest:
NOTIFY"); ood->send(resp); break; } Does that look right? Sending 489 for unhandled content
types and 400 for invalid simple-message-summary? Can I use MessageWaitingContents::isWellFormed to check for
valid content? Best regards, Matthias Moetje
|