]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4703 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 9 Oct 2012 19:01:38 +0000 (14:01 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 9 Oct 2012 19:01:38 +0000 (14:01 -0500)
src/mod/applications/mod_conference/mod_conference.c

index 089879ad40693c61c7d65786404720dc722953a4..f267780d38f27318591a4f6affe5fb5114e3d6cb 100644 (file)
@@ -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)