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
| 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. |
| 489 | SipMessageRequestWithinDialog::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. |
nothing calls this directly
no test coverage detected