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

Method dmAddCallDialog

SIP/SIP2Interface.cpp:155–172  ·  view source on GitHub ↗

For outgoing [client] invites the invite should have the local tag already and is put in the map using the localtag. For incoming [server] invites, we add the call dialog initially without the local tag, then later add the localtag to the key when we get the ACK.

Source from the content-addressed store, hash-verified

153// For incoming [server] invites, we add the call dialog initially without the local tag, then later add the localtag to the key
154// when we get the ACK.
155void SipDialogMap::dmAddCallDialog(SipDialog*dialog)
156{
157 string callid = dialog->callId();
158 string key = makeTagKey(callid, dialog->dgIsServer() ? string("") : dialog->dsLocalTag());
159 //SipDialog *previous = mDialogMap.read(key,2000); // why was this blocking?
160 SipDialog *previous = mDialogMap.readNoBlock(key);
161 LOG(DEBUG) <<LOGVAR(key);
162 if (previous) {
163 dmRemoveDialog(previous);
164 if (dialog->mIsHandover) {
165 // What happened is the dialog went to another BTS and is now coming back before
166 // the previous dialog has completely timed out. We must destroy the old dialog immediately.
167 } else {
168 LOG(ERR) << "Adding duplicate dialog."<<LOGVAR(previous)<<LOGVAR(dialog);
169 }
170 }
171 mDialogMap.write(key,dialog);
172}
173
174
175#if UNUSED

Callers 6

newSipDialogMTMethod · 0.80
newSipDialogRegister1Method · 0.80
newSipDialogMOSMSMethod · 0.80
newSipDialogMOUssdMethod · 0.80
newSipDialogMOCMethod · 0.80
newSipDialogHandoverMethod · 0.80

Calls 3

dgIsServerMethod · 0.80
dsLocalTagMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected