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

Method SipMessageRequestWithinDialog

SIP/SIPMessage.cpp:489–500  ·  view source on GitHub ↗

A request inside an invite is ACK, CANCEL, BYE, INFO, or re-INVITE. The only target-refresh-request is re-INVITE, which can change the "Dialog State". For ACK sec 17.1.1.3 the To must equal the To of the response being acked, which specifically contains a tag. ACK contains only one via == top via of original request with matching branch. TODO: ACK must copy route header fields from INVITE. sec 9.1

Source from the content-addressed store, hash-verified

487// 3. If no route-set, request-URI = remote-target-URI
488// The remote-target-URI is set by the Contact header only from a INVITE or re-INVITE.
489SipMessageRequestWithinDialog::SipMessageRequestWithinDialog(string reqMethod, SipBase *dialog, string branch) {
490 this->msmCallId = dialog->callId();
491 this->msmReqMethod = reqMethod;
492 this->msmCSeqMethod = reqMethod;
493 //this->msmReqUri = dialog->mInvite->msmReqUri; // TODO: WRONG! see comments above.
494 this->msmReqUri = dialog->dsInDialogRequestURI(); // TODO: WRONG! see comments above.
495 this->msmTo = *dialog->dsRequestToHeader();
496 this->msmFrom = *dialog->dsRequestFromHeader();
497 this->msmCSeqNum = dialog->dsNextCSeq(); // The BYE seq number must be incremental within the enclosing INVITE dialog.
498 if (branch.empty()) { branch = make_branch(reqMethod.c_str()); }
499 this->smAddViaBranch(dialog,branch);
500}
501
502// This message exists to encapsulate the Dialog State into a SIP message.
503// It is created on BS1 to send to BS2, which then uses it as a re-invite.

Callers

nothing calls this directly

Calls 6

make_branchFunction · 0.85
dsInDialogRequestURIMethod · 0.80
dsRequestToHeaderMethod · 0.80
dsRequestFromHeaderMethod · 0.80
dsNextCSeqMethod · 0.80
smAddViaBranchMethod · 0.80

Tested by

no test coverage detected