Koozali.org: home of the SME Server

Help understanding Asterisk CLI

Offline fred2k3

  • **
  • 49
  • +0/-0
Help understanding Asterisk CLI
« on: May 27, 2016, 11:44:48 AM »
Hi, I keep seeing these sorts of things from the Asterisk CLI:

[May 27 10:26:46] NOTICE[4367]: chan_sip.c:22081 handle_request_invite: Call from '' (89.163.148.39:5084) to extension '900972598333332' rejected because extension not found in context 'mainmenu'.

Excuse my ignorance, but what is actually happening here? To me it looks like the ext IP/port 89.163.148.39:5084 is trying to call 900972598333332... but perhaps I'm wrong?  I thought this may be a scam where the owner of 900972598333332 gets $$ when the number is called.

I usually do the following to block the IP:  /sbin/iptables -I INPUT -s 89.163.148.39 -j DROP but I could do with understanding things better, and implementing a more permanent solution.

Any help or advise would be appreciated.

Offline Jean-Philippe Pialasse

  • *
  • 2,743
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Help understanding Asterisk CLI
« Reply #1 on: May 27, 2016, 12:01:59 PM »
either this, or somebody trying to call overseas for free.
It even seems they try to reach God for free :D

+972 is for Israel , mobile - Jawall (59)

luckilly you do not have a dial route for 9 00 972 ... otherwise you would have paid the bill.

I suggest you close simply asterisk port from the outside of your local network.





Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Help understanding Asterisk CLI
« Reply #2 on: May 27, 2016, 12:02:35 PM »
I'm not an asterisk expert, but I strongly suggest you to install fail2ban contrib and not to play with iptables from CLI

that said, after a fast search with google, I agree with your analysis.. IMO, just ignore it and protect your install with fail2ban

guest22

Re: Help understanding Asterisk CLI
« Reply #3 on: May 27, 2016, 01:19:41 PM »
It also seems that guest SIP guests are allowed in your config. Please correct that to set to no.

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Help understanding Asterisk CLI
« Reply #4 on: May 27, 2016, 03:00:46 PM »
Thank you RequestedDeletion for your suggestion ;-)

Offline fred2k3

  • **
  • 49
  • +0/-0
Re: Help understanding Asterisk CLI
« Reply #5 on: May 27, 2016, 03:24:27 PM »
Thanks for all the responses and suggestions, I will definitely look into fail2ban.

RequestedDeletion - yes that sounds like a good idea.. but where do I set that? Spent 15 mins and can't find it!  I'm using SAIL 3.1.1-22

guest22

Re: Help understanding Asterisk CLI
« Reply #6 on: May 27, 2016, 09:46:21 PM »
RequestedDeletion - yes that sounds like a good idea.. but where do I set that? Spent 15 mins and can't find it!  I'm using SAIL 3.1.1-22


I left Sail a long time ago. Maybe you want to take a look at Asterisk+FreePBX contrib, there is much more support for that here on contribs.org. See the wiki and the latest version announced on the bugtracker last week.

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Help understanding Asterisk CLI
« Reply #7 on: May 28, 2016, 11:36:34 AM »
Another suggestion.

Only allow vpn connections from remotes.

I use ipsec for routers (or say SME in gateway mode) - asterisk to connect my networks together, and openvpn for connections from mobiles etc.

All general public access is closed. I find that tends to keep most of the baddies out :-)

B. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Drifting

  • ****
  • 431
  • +0/-0
Re: Help understanding Asterisk CLI
« Reply #8 on: July 12, 2016, 11:24:28 AM »
« Last Edit: July 12, 2016, 12:38:24 PM by ReetP »
Infamy, Infamy, they all have it in for me!

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Help understanding Asterisk CLI
« Reply #9 on: July 12, 2016, 12:40:29 PM »
You might find this useful?

http://www.sailpbx.com/mediawiki/index.php/VOIP_security_-_READ_THIS!

Regards Paul

Just modified the link in your post as it forgot the !

Yes, as I said above, wherever possible block ALL direct outside access to Asterisk and only allow VPN connections. Makes life a lot simpler.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation