[Freeswitch-users] Custom Events

Sergey Safarov s.safarov at gmail.com
Thu Apr 28 15:47:32 MSD 2016


mod_fail2ban <https://freeswitch.org/jira/browse/FS-7394> module is that
you want
Also look at PR771
<https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/771/overview>


чт, 28 апр. 2016 г. в 14:40, Luiz Fernando Softov <fernando at softov.com.br>:

> Hi, sometimes i receive these users trying to make a call (injection) in
> my FreeSwitch
>
> I already use events to know what's happen in the FS.
>
> sofia::register_failure - to figure a invalid register
> sofia::gateway_state - when a gateway comes down
> sofia::gateway_add - when someone add a gateway (daemon)
> sofia::gateway_delete - when someone delete a gateway (daemon)
>
> [NOTICE] switch_channel.c:1075 New Channel
> sofia/profile_1/'o[97bf779b-2e0d-e611-be46-00145ec01e69]
> [DEBUG] switch_core_session.c:1061 Send signal sofia/profile_1/'o[BREAK]
> [DEBUG] switch_core_session.c:1061 Send signal sofia/profile_1/'o[BREAK]
> [DEBUG] switch_core_state_machine.c:472 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> Running State Change CS_NEW
> [DEBUG] sofia.c:8848 sofia/profile_1/'or''='@1.2.3.4>@nowhere receiving
> invite from 62.4.6.227:5076 version: 1.5.final git 6a2fc5e 2015-05-28
> 17:35:17Z 64bit
> [DEBUG] sofia.c:9015 IP 62.4.6.227 Rejected by acl "domains". Falling back
> to Digest auth.
> [DEBUG] switch_core_state_machine.c:491 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State NEW
> [DEBUG] switch_core_session.c:1061 Send signal sofia/profile_1/'o[BREAK]
> [DEBUG] sofia.c:2065 detaching session 97bf779b-2e0d-e611-be46-00145ec01e69
> [WARNING] switch_core_state_machine.c:572
> 97bf779b-2e0d-e611-be46-00145ec01e69 sofia/profile_1/'or''='@1.2.3.4>@nowhere
> Abandoned
> [NOTICE] switch_core_state_machine.c:575 Hangup sofia/profile_1/'o[CS_NEW]
> [WRONG_CALL_STATE]
> [DEBUG] switch_channel.c:3242 Send signal sofia/profile_1/'o[KILL]
> [DEBUG] switch_core_session.c:1396 Send signal sofia/profile_1/'o[BREAK]
> [DEBUG] switch_core_state_machine.c:472 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> Running State Change CS_HANGUP
> [DEBUG] switch_core_state_machine.c:735 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> Callstate Change DOWN -> HANGUP
> [DEBUG] switch_core_state_machine.c:737 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State HANGUP
> [DEBUG] mod_sofia.c:413 Channel sofia/profile_1/'or''='@1.2.3.4>@nowhere
> hanging up, cause: WRONG_CALL_STATE
> [DEBUG] switch_core_state_machine.c:60 sofia/profile_1/'or''='@1.2.3.4>@nowhere
> Standard HANGUP, cause: WRONG_CALL_STATE
> [DEBUG] switch_core_state_machine.c:737 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State HANGUP going to sleep
> [DEBUG] switch_core_state_machine.c:504 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State Change CS_HANGUP -> CS_REPORTING
> [DEBUG] switch_core_session.c:1396 Send signal sofia/profile_1/'o[BREAK]
> [DEBUG] switch_core_state_machine.c:472 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> Running State Change CS_REPORTING
> [DEBUG] switch_core_state_machine.c:823 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State REPORTING
> [DEBUG] switch_core_state_machine.c:104 sofia/profile_1/'or''='@1.2.3.4>@nowhere
> Standard REPORTING, cause: WRONG_CALL_STATE
> [DEBUG] switch_core_state_machine.c:823 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State REPORTING going to sleep
> [DEBUG] switch_core_state_machine.c:498 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State Change CS_REPORTING -> CS_DESTROY
> [DEBUG] switch_core_session.c:1396 Send signal sofia/profile_1/'o[BREAK]
> [DEBUG] switch_core_session.c:1623 Session 139 (sofia/profile_1/'or''='@
> 1.2.3.4>@nowhere) Locked, Waiting on external entities
> [NOTICE] switch_core_session.c:1641 Session 139 (sofia/profile_1/'or''='@
> 1.2.3.4>@nowhere) Ended
> [NOTICE] switch_core_session.c:1645 Close Channel
> sofia/profile_1/'o[CS_DESTROY]
> [DEBUG] switch_core_state_machine.c:626 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> Running State Change CS_DESTROY
> [DEBUG] switch_core_state_machine.c:636 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State DESTROY
> [DEBUG] mod_sofia.c:323 sofia/profile_1/'or''='@1.2.3.4>@nowhere SOFIA
> DESTROY
> [DEBUG] switch_core_state_machine.c:111 sofia/profile_1/'or''='@1.2.3.4>@nowhere
> Standard DESTROY
> [DEBUG] switch_core_state_machine.c:636 (sofia/profile_1/'or''='@1.2.3.4>@nowhere)
> State DESTROY going to sleep
>
>
> Is there a Event (or another way), to know when someone is trying to make
> a call without register, so i can count how many times some IP try to do
> this and add it in a firewall.
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160428/7fed0ec4/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list