From c2aabcab6fd48284ca741cff68bdc5a0c835ebd8 Mon Sep 17 00:00:00 2001 From: karl anderson Date: Mon, 23 Feb 2015 15:50:53 -0800 Subject: [PATCH] KAZOO-3357: if handle_subscribe failes dont publish a AMQP message --- kamailio/default.cfg | 1 + kamailio/presence-role.cfg | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/kamailio/default.cfg b/kamailio/default.cfg index 37e6b92..3e2a13e 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -148,6 +148,7 @@ loadmodule "uac_redirect.so" ####### DB Text module ########## loadmodule "db_text.so" modparam("db_text", "db_mode", 1) +modparam("db_text", "emptystring", 1) ####### Kazoo Integration module ########## loadmodule "kazoo.so" diff --git a/kamailio/presence-role.cfg b/kamailio/presence-role.cfg index 74817df..0afdd2e 100644 --- a/kamailio/presence-role.cfg +++ b/kamailio/presence-role.cfg @@ -9,7 +9,7 @@ loadmodule "presence_xml.so" modparam("presence_dialoginfo", "force_dummy_dialog", 1) modparam("presence_xml", "force_active", 1) -modparam("presence", "subs_db_mode", 1) +modparam("presence", "subs_db_mode", 3) modparam("presence", "expires_offset", 60) modparam("presence", "send_fast_notify", 1) modparam("presence", "clean_period", 30) @@ -17,6 +17,7 @@ modparam("presence", "publ_cache", 0) modparam("presence", "min_expires_action", 2) modparam("presence", "min_expires", 300) modparam("presence", "max_expires", 3600) +modparam("presence", "sip_uri_match", 1) modparam("presence", "db_url", "text:///etc/kazoo/kamailio/dbtext") modparam("kazoo", "db_url", "text:///etc/kazoo/kamailio/dbtext") @@ -51,7 +52,11 @@ route[HANDLE_SUBSCRIBE] $ru = $(ru{s.tolower}); - handle_subscribe(); + if (!handle_subscribe()) { + xlog("L_INFO", "$ci|stop|unsupported subsribe"); + t_release(); + exit; + } ##RabbitMQ $var(fs_path) = "%3C" + $rz + "%3A" + $Ri + "%3A" + $Rp + "%3Btransport=" + $proto + "%3Blr%3Breceived=" + $si+":"+$sp+"%3E";