Add dialog tag to ACK messages.

git-svn-id: http://yate.null.ro/svn/yate/trunk@184 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2005-01-10 04:33:15 +00:00
parent ffe79e2bfd
commit 9219b84077
1 changed files with 10 additions and 2 deletions

View File

@ -229,10 +229,18 @@ void SIPMessage::complete(SIPEngine* engine, const char* user, const char* domai
if (isOutgoing() && !getParty())
engine->buildParty(this);
// don't complete ACK or incoming messages
if (isACK() || !isOutgoing())
// don't complete incoming messages
if (!isOutgoing())
return;
// only set the dialog tag on ACK
if (isACK()) {
HeaderLine* hl = const_cast<HeaderLine*>(getHeader("To"));
if (dlgTag && hl && !hl->getParam("tag"))
hl->setParam("tag",dlgTag);
return;
}
if (!user)
user = "anonymous";
if (!domain)