mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-26 21:24:16 +00:00
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:
commit
e8f6ed3d93
4 files changed
+5
No files matched your search
@@ -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);
|
||||
|
||||
@@ -797,6 +797,7 @@ struct private_object {
|
||||
sofia_profile_t *profile;
|
||||
char *reply_contact;
|
||||
char *from_uri;
|
||||
char *from_user;
|
||||
char *to_uri;
|
||||
char *callid;
|
||||
char *contact_url;
|
||||
|
||||
@@ -10224,6 +10224,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
|
||||
}
|
||||
|
||||
|
||||
tech_pvt->from_user = switch_core_session_strdup(session, sip->sip_from->a_url->url_user);
|
||||
tech_pvt->mparams.remote_ip = switch_core_session_strdup(session, network_ip);
|
||||
tech_pvt->mparams.remote_port = network_port;
|
||||
|
||||
|
||||
Reference in new issue
Block a user