FS-10009: mod_fail2ban - Added logging of network_ip for abandoned calls

This commit is contained in:
Sergey Safarov committed 2017-02-10 13:17:45 -05:00
1 parent c9befbeae6
commit 6c12f69e0c
4 files changed
+5

No files matched your search

+1
View File
@@ -611,6 +611,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
if (cause == SWITCH_CAUSE_WRONG_CALL_STATE) {
switch_event_t *s_event;
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_WRONG_CALL_STATE) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "from_user", tech_pvt->from_user);
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "network_ip", tech_pvt->mparams.remote_ip);
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "network_port", "%d", tech_pvt->mparams.remote_port);
switch_event_fire(&s_event);