From 7b4faa3631b9189f0e76b05813f7c001d244cc73 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 5 Dec 2006 02:12:11 +0000 Subject: [PATCH] local tag of dialout sessions can be set by caller git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@167 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmUAC.cpp | 8 ++++++-- core/AmUAC.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/AmUAC.cpp b/core/AmUAC.cpp index a6b25149..d9c229f2 100644 --- a/core/AmUAC.cpp +++ b/core/AmUAC.cpp @@ -36,7 +36,8 @@ AmSession* AmUAC::dialout(const string& user, const string& r_uri, const string& from, const string& from_uri, - const string& to) { + const string& to, + const string& local_tag) { AmSipRequest req; @@ -47,7 +48,10 @@ AmSession* AmUAC::dialout(const string& user, req.r_uri = r_uri; req.from = from; req.from_uri = from_uri; - req.from_tag = AmSession::getNewId(); + if (!local_tag.length()) + req.from_tag = AmSession::getNewId(); + else + req.from_tag = local_tag; req.to = to; req.to_tag = ""; req.callid = AmSession::getNewId() + "@" + AmConfig::LocalIP; diff --git a/core/AmUAC.h b/core/AmUAC.h index bc73298b..fe250354 100644 --- a/core/AmUAC.h +++ b/core/AmUAC.h @@ -42,7 +42,8 @@ class AmUAC { const string& r_uri, const string& from, const string& from_uri, - const string& to); + const string& to, + const string& local_tag = ""); }; #endif