From 8f0b7e69de639c662aa292075838d6e65dbd1357 Mon Sep 17 00:00:00 2001 From: William King Date: Tue, 13 Nov 2012 18:18:33 -0800 Subject: [PATCH] Handle routing loop detection properly so that the delivery confirmation handling is more accurate. --- src/mod/endpoints/mod_sofia/sofia.c | 1 + src/mod/endpoints/mod_sofia/sofia_presence.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index ff2b8dc496..89024c5203 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2459,6 +2459,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void #ifdef MANUAL_BYE NUTAG_APPL_METHOD("BYE"), #endif + NUTAG_APPL_METHOD("MESSAGE"), NUTAG_SESSION_TIMER(profile->session_timeout), NTATAG_MAX_PROCEEDING(profile->max_proceeding), diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index ed156c5f05..a053813a84 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -4351,7 +4351,8 @@ void sofia_presence_handle_sip_i_message(int status, if ((us = sofia_glue_get_unknown_header(sip, "X-FS-Sending-Message")) && !strcmp(us, switch_core_get_uuid())) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Not sending message to ourselves!\n"); - goto end; + nua_respond(nh, SIP_503_SERVICE_UNAVAILABLE, NUTAG_WITH_THIS_MSG(de->data->e_msg), TAG_END()); + return; } if (sip->sip_content_type && sip->sip_content_type->c_subtype) {