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

Method text

SIP/SIPMessage.cpp:277–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276
277string SipMessage::text(bool verbose) const
278{
279 std::ostringstream ss;
280 ss << "SipMessage(";
281 { int code = smGetCode(); ss <<LOGVAR(code); }
282 if (!msmReqMethod.empty()) ss <<LOGVAR2("ReqMethod",msmReqMethod);
283 if (!msmReason.empty()) ss <<LOGVAR2("reason",msmReason);
284 if (!msmCSeqMethod.empty()) ss<<" CSeq="<<msmCSeqNum<< " "<<msmCSeqMethod;
285 if (!msmCallId.empty()) ss <<LOGVAR2("callid",msmCallId);
286 if (!msmReqUri.empty()) ss << LOGVAR2("ReqUri",msmReqUri);
287 { string To = msmTo.value(); if (!To.empty()) ss << LOGVAR(To); }
288 { string From = msmFrom.value(); if (!From.empty()) ss<<LOGVAR(From); }
289 if (!msmVias.empty()) ss <<LOGVAR2("Vias",msmVias);
290 if (!msmRoutes.empty()) ss <<LOGVAR2("Routes",msmRoutes);
291 if (!msmRecordRoutes.empty()) ss <<LOGVAR2("RecordRoutes",msmRecordRoutes);
292 if (!msmContactValue.empty()) ss <<LOGVAR2("Contact",msmContactValue);
293 //list<SipBody> msmBodies;
294 if (!msmContentType.empty()) ss<<LOGVAR2("ContentType",msmContentType);
295 if (!msmBody.empty()) ss<<LOGVAR2("Body",msmBody);
296 //if (!msmAuthenticateValue.empty()) ss<<LOGVARM(msmAuthenticateValue);
297 if (!msmAuthorizationValue.empty()) ss<<LOGVARM(msmAuthorizationValue);
298 for (SipParamList::const_iterator it = msmHeaders.begin(); it != msmHeaders.end(); it++) {
299 ss <<" header "<<it->mName <<"="<<it->mValue;
300 }
301
302 if (verbose) { ss << LOGVARM(msmContent); } else { ss << LOGVAR2("firstLine",smGetFirstLine()); }
303 ss << ")";
304 return ss.str();
305}
306ostream& operator<<(ostream& os, const SipMessage&msg) { os << msg.text(); return os; }
307ostream& operator<<(ostream& os, const SipMessage*msg) { os << (msg ? msg->text(false) : "(null SipMessage)"); return os; }
308

Callers 3

dialogWriteDownlinkMethod · 0.45
SIPUtility.cppFile · 0.45
SIPMessage.cppFile · 0.45

Calls 4

valueMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected