Module: sems Branch: rco/offer_answer Commit: fb51e0af70b39da93e73ba719396dd3b6a142393 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=fb51e0af70b39da93e73ba719396dd3b6a142393
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Mon Jun 28 13:36:17 2010 +0200 re-organize AmSipMsg (continued) --- apps/auth_b2b/AuthB2B.cpp | 7 +++---- core/AmB2BSession.cpp | 8 +++----- core/AmSipDialog.cpp | 14 ++++++-------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/apps/auth_b2b/AuthB2B.cpp b/apps/auth_b2b/AuthB2B.cpp index 80fd127..0465dab 100644 --- a/apps/auth_b2b/AuthB2B.cpp +++ b/apps/auth_b2b/AuthB2B.cpp @@ -281,12 +281,11 @@ void AuthB2BDialog::createCalleeSession() from.c_str()); if (AmConfig::LogSessions) { - INFO("Starting B2B callee session %s app %s\n", - callee_session->getLocalTag().c_str(), invite_req.cmd.c_str()); + INFO("Starting B2B callee session %s\n", + callee_session->getLocalTag().c_str()); } - MONITORING_LOG5(other_id.c_str(), - "app", invite_req.cmd.c_str(), + MONITORING_LOG4(other_id.c_str(), "dir", "out", "from", callee_dlg.local_party.c_str(), "to", callee_dlg.remote_party.c_str(), diff --git a/core/AmB2BSession.cpp b/core/AmB2BSession.cpp index 7a9de8e..38f79a3 100644 --- a/core/AmB2BSession.cpp +++ b/core/AmB2BSession.cpp @@ -378,7 +378,6 @@ void AmB2BCallerSession::onB2BEvent(B2BEvent* ev) AmSipReply& reply = ((B2BSipReplyEvent*)ev)->reply; - if(other_id != reply.local_tag){ if(other_id != reply.from_tag){// was: local_tag DBG("Dialog mismatch!\n"); return; @@ -503,12 +502,11 @@ void AmB2BCallerSession::createCalleeSession() { callee_dlg.remote_uri = dlg.local_uri; if (AmConfig::LogSessions) { - INFO("Starting B2B callee session %s app %s\n", - callee_session->getLocalTag().c_str(), invite_req.cmd.c_str()); + INFO("Starting B2B callee session %s\n", + callee_session->getLocalTag().c_str()); } - MONITORING_LOG5(other_id.c_str(), - "app", invite_req.cmd.c_str(), + MONITORING_LOG4(other_id.c_str(), "dir", "out", "from", callee_dlg.local_party.c_str(), "to", callee_dlg.remote_party.c_str(), diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index f119604..43c4ca8 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -259,11 +259,11 @@ void AmSipDialog::updateStatus(const AmSipReply& reply) if ( (reply.code > 100) && (reply.code < 300) - && !reply.remote_tag.empty() + && !reply.to_tag.empty() && (remote_tag.empty() || ((status < Connected) && (reply.code >= 200))) ) { - remote_tag = reply.remote_tag; + remote_tag = reply.to_tag; } // allow route overwritting @@ -271,8 +271,8 @@ void AmSipDialog::updateStatus(const AmSipReply& reply) route = reply.route; } - if (reply.next_request_uri.length()) - remote_uri = reply.next_request_uri; + if (reply.contact.length()) + remote_uri = reply.contact; switch(status){ case Disconnecting: @@ -398,11 +398,10 @@ int AmSipDialog::reply(const AmSipRequest& req, AmSipReply reply; - reply.method = req.method; reply.code = code; reply.reason = reason; reply.tt = req.tt; - reply.local_tag = local_tag; + reply.to_tag = local_tag; reply.hdrs = m_hdrs; if (!flags&SIP_FLAGS_VERBATIM) { @@ -435,12 +434,11 @@ int AmSipDialog::reply_error(const AmSipRequest& req, unsigned int code, { AmSipReply reply; - reply.method = req.method; reply.code = code; reply.reason = reason; reply.tt = req.tt; reply.hdrs = hdrs; - reply.local_tag = AmSession::getNewId(); + reply.to_tag = AmSession::getNewId(); if (AmConfig::Signature.length()) reply.hdrs += SIP_HDR_COLSP(SIP_HDR_SERVER) + AmConfig::Signature + CRLF; _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
