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

Method dsSetLocalHeaderMT

SIP/SIPBase.cpp:356–370  ·  view source on GitHub ↗

We always need a local tag, but handover adds its own.

Source from the content-addressed store, hash-verified

354
355// We always need a local tag, but handover adds its own.
356void DialogStateVars::dsSetLocalHeaderMT(SipPreposition *toheader, bool addTag)
357{
358 LOG(DEBUG);
359 // We will parse the contact to see if there is already a tag, which would be an error.
360 mLocalHeader = *toheader;
361 if (addTag) {
362 if (!mLocalHeader.mTag.empty()) {
363 LOG(ERR) <<"MT Dialog initiation had a pre-existing to-tag:"<<toheader;
364 // Now what? Keep the tag I guess.
365 // The dialog is probably impossible.
366 } else {
367 mLocalHeader.setTag(make_tag());
368 }
369 }
370}
371
372void writePrivateHeaders(SipMessage *msg, const L3LogicalChannel *l3chan)
373{

Callers 1

newSipDialogMTMethod · 0.80

Calls 2

make_tagFunction · 0.85
setTagMethod · 0.80

Tested by

no test coverage detected