From 26035b6f2665249bd6831b680488595755478108 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Mon, 19 Aug 2013 18:03:22 +0200 Subject: [PATCH 1/2] sbc: update SBCCallRegistry only on positive replies to INVITE --- apps/sbc/SBC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sbc/SBC.cpp b/apps/sbc/SBC.cpp index b589fb55..ad8a055c 100644 --- a/apps/sbc/SBC.cpp +++ b/apps/sbc/SBC.cpp @@ -1339,7 +1339,7 @@ void SBCCalleeSession::onSipReply(const AmSipReply& reply, int old_dlg_status, // update call registry (unfortunately has to be done always - // not possible to determine if learned in this reply) - if (!dlg.remote_tag.empty()) { + if (!dlg.remote_tag.empty() && reply.code >= 200 && trans_method == SIP_METH_INVITE) { SBCCallRegistry::updateCall(other_id, dlg.remote_tag); } From 6e77a3afe61d8a3036f0941b65f8e067034c5ff8 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Mon, 19 Aug 2013 18:21:55 +0200 Subject: [PATCH 2/2] sbc: call registry: more verbosity on new entry --- apps/sbc/SBCCallRegistry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sbc/SBCCallRegistry.cpp b/apps/sbc/SBCCallRegistry.cpp index c0677c43..8d116fdd 100644 --- a/apps/sbc/SBCCallRegistry.cpp +++ b/apps/sbc/SBCCallRegistry.cpp @@ -34,7 +34,7 @@ void SBCCallRegistry::addCall(const string& ltag, const SBCCallRegistryEntry& ot registry[ltag] = other_dlg; registry_mutex.unlock(); - DBG("SBCCallRegistry: Added call '%s' - mapped to: '%s'\n", ltag.c_str(), other_dlg.ltag.c_str()); + DBG("SBCCallRegistry: Added call '%s' - mapped to: '%s'/'%s'/'%s'\n", ltag.c_str(), other_dlg.ltag.c_str(), other_dlg.rtag.c_str(), other_dlg.callid.c_str()); } void SBCCallRegistry::updateCall(const string& ltag, const string& other_rtag) {