From: Anthony Minessale Date: Tue, 9 Oct 2012 19:01:38 +0000 (-0500) Subject: FS-4703 --resolve X-Git-Tag: v1.3.0~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc764b27bf613f4a279d10e0d4abe3ec14224e34;p=thirdparty%2Ffreeswitch.git FS-4703 --resolve --- diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 089879ad40..f267780d38 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -8630,8 +8630,20 @@ static void call_setup_event_handler(switch_event_t *event) switch_thread_rwlock_unlock(conference->rwlock); - } - + } else { // Couldn't find associated conference. Indicate failure on refer subscription + if (switch_event_create(&event, SWITCH_EVENT_CONFERENCE_DATA) == SWITCH_STATUS_SUCCESS) { + event->flags |= EF_UNIQ_HEADERS; + + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-name", conf); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-domain", domain); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "conference-event", "refer"); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "call_id", call_id); + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "final", "true"); + switch_event_add_body(event, "%s", "SIP/2.0 481 Failure\r\n"); + switch_event_fire(&event); + } + } + } static void conf_data_event_handler(switch_event_t *event)