MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / SipMessageReply

Method SipMessageReply

SIP/SIPMessage.cpp:564–586  ·  view source on GitHub ↗

section 4: must preserve the vias in the reply to INVITE. 12.1.1: Dialog reply must have a contact. TODO: Preserve the route set. If dialog is non-NULL this is a reply within a dialog. Note that we create a SipDialog class for REGISTER and MESSAGE, and those are not dialogs.

Source from the content-addressed store, hash-verified

562// If dialog is non-NULL this is a reply within a dialog. Note that we create a SipDialog class
563// for REGISTER and MESSAGE, and those are not dialogs.
564SipMessageReply::SipMessageReply(SipMessage *request,int code, string reason, SipBase *dialog) {
565 msmCode = code;
566 msmReason = reason;
567 if (dialog) {
568 // TODO: The route set goes here too.
569 // This is a reply, so the initiating request was incoming, so to is local and from is remote.
570 msmTo = *dialog->dsReplyToHeader();
571 msmFrom = *dialog->dsReplyFromHeader();
572 } else {
573 msmTo = request->msmTo;
574 msmFrom = request->msmFrom;
575 }
576 msmVias = request->msmVias;
577 msmCSeqNum = request->msmCSeqNum;
578 msmCSeqMethod = request->msmCSeqMethod;
579 msmCallId = request->msmCallId;
580 if (dialog && request->msmReqMethod == "INVITE") {
581 msmContactValue = dialog->localContact(dialog->sipLocalUsername());
582 }
583 // These fields are not needed:
584 // string mReqMethod; // It is a reply, not a request.
585 //string mContactValue; // The request is non-target-refresh so contact is meaningless.
586}
587
588bool sameMsg(SipMessage *msg1, SipMessage *msg2)
589{

Callers

nothing calls this directly

Calls 4

dsReplyToHeaderMethod · 0.80
dsReplyFromHeaderMethod · 0.80
localContactMethod · 0.80
sipLocalUsernameMethod · 0.80

Tested by

no test coverage detected