FS-2901 --resolve
This commit is contained in:
parent
d5042f2c1d
commit
894ba68bc5
|
@ -4177,10 +4177,23 @@ SWITCH_STANDARD_API(sofia_function)
|
|||
stream->write_function(stream, "Flushing recovery database.\n");
|
||||
} else {
|
||||
int x = sofia_glue_recover(SWITCH_FALSE);
|
||||
switch_event_t *event = NULL;
|
||||
|
||||
if (x) {
|
||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM,
|
||||
MY_EVENT_RECOVERY_RECOVERED) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "recovered_calls", "%d", x);
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
stream->write_function(stream, "Recovered %d call(s)\n", x);
|
||||
} else {
|
||||
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM,
|
||||
MY_EVENT_RECOVERY_RECOVERED) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "recovered_calls", "0");
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
stream->write_function(stream, "No calls to recover.\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ typedef struct private_object private_object_t;
|
|||
#define MY_EVENT_GATEWAY_DEL "sofia::gateway_delete"
|
||||
#define MY_EVENT_RECOVERY "sofia::recovery_recv"
|
||||
#define MY_EVENT_RECOVERY_SEND "sofia::recovery_send"
|
||||
#define MY_EVENT_RECOVERY_RECOVERED "sofia::recovery_recovered"
|
||||
|
||||
#define MULTICAST_EVENT "multicast::event"
|
||||
#define SOFIA_REPLACES_HEADER "_sofia_replaces_"
|
||||
|
|
Loading…
Reference in New Issue