Merge pull request #1183 in FS/freeswitch from ~SAFAROV/freeswitch2:FS-10009 to master

* commit '6c12f69e0c893646eda0bb010873583040aa136b':
  FS-10009: mod_fail2ban - Added logging of network_ip for abandoned calls
This commit is contained in:
Mike Jerris
2017-02-14 13:32:05 -06:00
4 changed files with 5 additions and 0 deletions
+1
View File
@@ -620,6 +620,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);