mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-28 06:04:20 +00:00
Merge pull request #771 in FS/freeswitch from ~SAFAROV/freeswitch2:FS-7125 to master
* commit 'ff1c384e13f07afaac98334532667ebf8093a1f1': FS-7125 Added sofia event "wrong_calls_state". This is for fail2ban logging
This commit is contained in:
commit
9ec3253563
3 files changed
+14
-5
No files matched your search
@@ -603,6 +603,15 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
||||
switch_safe_free(bye_headers);
|
||||
}
|
||||
|
||||
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, "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);
|
||||
}
|
||||
}
|
||||
|
||||
sofia_clear_flag(tech_pvt, TFLAG_IO);
|
||||
|
||||
if (tech_pvt->sofia_private) {
|
||||
|
||||
Reference in new issue
Block a user