A Broadband and ADSL forum. BroadbanterBanter

Welcome to BroadbanterBanter.

You are currently viewing as a guest which gives you limited access to view most discussions and other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today.

Go Back   Home » BroadbanterBanter forum » Newsgroup Discussions » uk.telecom.voip (UK VOIP)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

uk.telecom.voip (UK VOIP) (uk.telecom.voip) Discussion of topics relevant to packet based voice technologies including Voice over IP (VoIP), Fax over IP (FoIP), Voice over Frame Relay (VoFR), Voice over Broadband (VoB) and Voice on the Net (VoN) as well as service providers, hardware and software for use with these technologies. Advertising is not allowed.

Building a SIP spam rejecter



 
 
Thread Tools Display Modes
  #1  
Old September 24th 19, 11:52 AM posted to uk.telecom.voip
Andrew Benham
external usenet poster
 
Posts: 302
Default Building a SIP spam rejecter

Every so often the phone spammers get a new block of numbers (024 7668 xxxx
has just started up). As my home phone is on a SIP service, it's time to get
creative - I fancy building a SIP spam rejecter.

Plan is to run something on a Raspberry Pi to read the CLID. If it's a
normal call do nothing, and the phones here will ring as usual. But it
the number pattern is in a naughty list, answer the call, play SIT and
possibly a voice message, then terminate the call. Just rejecting the
call is no good, because the other phones will still ring as they're
registered individually.

The Raspberry Pi runs Raspian, and I have linphone and twinkle installed -
both offer a cli, which I can automate with an Expect script.

Essentially I want to check the caller id, and if bad do:
answer
play a wav file
terminate

With "twinkle -c" I can't play a wav file to the caller. I can do:
answer
(sleep 2)
terminate
but that's not quite rude enough :-)

With linphonec, the help text says I can play a wav file, but I get an error
when I try. Alternatively I can answer the call, then pause the call which
causes music on hold to be played. The help text says I can define the
music on hold, but defining a wav file adds that 'music' to an internal list
of music which seem to be selected at random - 1 time in maybe 6 it plays my
defined wav file.


Has anyone else built such a SIP spam rejecter ?
  #2  
Old September 24th 19, 12:01 PM posted to uk.telecom.voip
David Woolley
external usenet poster
 
Posts: 113
Default Building a SIP spam rejecter

On 24/09/2019 10:52, Andrew Benham wrote:
Has anyone else built such a SIP spam rejecter ?


Asterisk comes with features intended to be used to torture telesales
people. It is a PABX toolkit, so you have to do some work to put those
features together.

Most people with IP PAXBes use Fail2Ban to automatically block IP
addresses that attempt to hack the system.

Why can't you use a simple white list in this case?
  #3  
Old September 24th 19, 12:50 PM posted to uk.telecom.voip
Bob Eager[_5_]
external usenet poster
 
Posts: 70
Default Building a SIP spam rejecter

On Tue, 24 Sep 2019 09:52:59 +0000, Andrew Benham wrote:

Has anyone else built such a SIP spam rejecter ?


It's called Asterisk!

My Asterisk box does all of that. And it'll run on a Pi. And you can have
nice internal phone features and more.

For example, I have a not-quite-black-list. It has people whom I don't
want to antagonise, but I'd rather not talk to (the ones who only call
when they want something). For those callers, it plays about six beats of
ringing tone, then drops to voicemail. Every time.

No need to reinvent the wheel.
  #4  
Old September 25th 19, 12:07 AM posted to uk.telecom.voip
Graham.[_3_]
external usenet poster
 
Posts: 340
Default Building a SIP spam rejecter

Every so often the phone spammers get a new block of numbers (024 7668 xxxx
has just started up). As my home phone is on a SIP service, it's time to get
creative - I fancy building a SIP spam rejecter.

Plan is to run something on a Raspberry Pi to read the CLID. If it's a
normal call do nothing, and the phones here will ring as usual. But it
the number pattern is in a naughty list, answer the call, play SIT and
possibly a voice message, then terminate the call. Just rejecting the
call is no good, because the other phones will still ring as they're
registered individually.

The Raspberry Pi runs Raspian, and I have linphone and twinkle installed -
both offer a cli, which I can automate with an Expect script.

Essentially I want to check the caller id, and if bad do:
answer
play a wav file
terminate

With "twinkle -c" I can't play a wav file to the caller. I can do:
answer
(sleep 2)
terminate
but that's not quite rude enough :-)

With linphonec, the help text says I can play a wav file, but I get an error
when I try. Alternatively I can answer the call, then pause the call which
causes music on hold to be played. The help text says I can define the
music on hold, but defining a wav file adds that 'music' to an internal list
of music which seem to be selected at random - 1 time in maybe 6 it plays my
defined wav file.


Has anyone else built such a SIP spam rejecter ?


You need RASPBX which is Asterisk with a graphical front end, an RPi
port of FreePBX, you start by downloading the SD card image from here
http://www.raspberry-asterisk.org/
and follow the instructions on the website.

I have been using such a system since 2006, initially on x86 hardware
and on a Pi since 2013,
Here is a peep at part of my blacklist
https://ibb.co/55fDkFk

The call is recorded for our amusement later,
https://ibb.co/fNYZxgB

It is then offered to its final destination called Lenny, which is
three lines of code and a stack of recorded phrases
https://ibb.co/wMdD4RX

The end result is this.
https://youtu.be/2o_VIabmWyM






--
Graham.

%Profound_observation%
  #5  
Old September 25th 19, 12:30 PM posted to uk.telecom.voip
R. Mark Clayton[_2_]
external usenet poster
 
Posts: 670
Default Building a SIP spam rejecter

On Tuesday, 24 September 2019 10:53:00 UTC+1, Andrew Benham wrote:
Every so often the phone spammers get a new block of numbers (024 7668 xxxx
has just started up). As my home phone is on a SIP service, it's time to get
creative - I fancy building a SIP spam rejecter.


If I get this sort of thing, I email the service provider. It doesn't stop the spoofers, but it usually stops people ringing them back.


Plan is to run something on a Raspberry Pi to read the CLID. If it's a
normal call do nothing, and the phones here will ring as usual. But it
the number pattern is in a naughty list, answer the call, play SIT and
possibly a voice message, then terminate the call. Just rejecting the
call is no good, because the other phones will still ring as they're
registered individually.

The Raspberry Pi runs Raspian, and I have linphone and twinkle installed -
both offer a cli, which I can automate with an Expect script.

Essentially I want to check the caller id, and if bad do:
answer
play a wav file
terminate

With "twinkle -c" I can't play a wav file to the caller. I can do:
answer
(sleep 2)
terminate
but that's not quite rude enough :-)

With linphonec, the help text says I can play a wav file, but I get an error
when I try. Alternatively I can answer the call, then pause the call which
causes music on hold to be played. The help text says I can define the
music on hold, but defining a wav file adds that 'music' to an internal list
of music which seem to be selected at random - 1 time in maybe 6 it plays my
defined wav file.


Has anyone else built such a SIP spam rejecter ?


  #6  
Old September 25th 19, 06:20 PM posted to uk.telecom.voip
Andrew Benham
external usenet poster
 
Posts: 302
Default Building a SIP spam rejecter

On Tue, 24 Sep 2019 23:07:49 +0100, Graham. wrote:

Every so often the phone spammers get a new block of numbers (024 7668 xxxx
has just started up). As my home phone is on a SIP service, it's time to get
creative - I fancy building a SIP spam rejecter.

Plan is to run something on a Raspberry Pi to read the CLID. If it's a
normal call do nothing, and the phones here will ring as usual. But it
the number pattern is in a naughty list, answer the call, play SIT and
possibly a voice message, then terminate the call. Just rejecting the
call is no good, because the other phones will still ring as they're
registered individually.

The Raspberry Pi runs Raspian, and I have linphone and twinkle installed -
both offer a cli, which I can automate with an Expect script.

Essentially I want to check the caller id, and if bad do:
answer
play a wav file
terminate

With "twinkle -c" I can't play a wav file to the caller. I can do:
answer
(sleep 2)
terminate
but that's not quite rude enough :-)

With linphonec, the help text says I can play a wav file, but I get an error
when I try. Alternatively I can answer the call, then pause the call which
causes music on hold to be played. The help text says I can define the
music on hold, but defining a wav file adds that 'music' to an internal list
of music which seem to be selected at random - 1 time in maybe 6 it plays my
defined wav file.


Has anyone else built such a SIP spam rejecter ?


You need RASPBX which is Asterisk with a graphical front end, an RPi
port of FreePBX, you start by downloading the SD card image from here
http://www.raspberry-asterisk.org/
and follow the instructions on the website.


I've done an "apt install asterisk asterisk-doc", and now there's a lot
to read about. I think
https://support.aa.net.uk/VoIP_Phones_-_Asterisk
might be the place to start, since they're who my SIP is with.

Can I install FreePBX on my existing Raspian installation ? Doesn't seem
to be a package in the standard repositories. Using an alternate SD
image seems a bit OTT for a quick play.

I have been using such a system since 2006, initially on x86 hardware
and on a Pi since 2013,
Here is a peep at part of my blacklist
https://ibb.co/55fDkFk


Needs updating!
0204 will be valid from December:
https://www.techradar.com/uk/news/lo...th-0204-launch



Thanks to everyone for suggesting Asterisk. Looks like a lot to learn, but
very powerful.
  #7  
Old September 25th 19, 06:30 PM posted to uk.telecom.voip
Andrew Benham
external usenet poster
 
Posts: 302
Default Building a SIP spam rejecter

Can I install FreePBX on my existing Raspian installation ? Doesn't seem
to be a package in the standard repositories. Using an alternate SD
image seems a bit OTT for a quick play.


Aha, just found "FreePBX Manual/Tarball Install" on
https://www.freepbx.org/downloads/freepbx-distro/


  #8  
Old September 25th 19, 07:20 PM posted to uk.telecom.voip
Graham.[_3_]
external usenet poster
 
Posts: 340
Default Building a SIP spam rejecter

Thanks for the heads-up about 020 4, that's news to me.

Installing vanilla Asterisk and manipulating the dial plan etc in a
terminal session is not my idea of fun. If the addige "GUIs are for
WIMPs" is true, then I'm a WIMP!

Getting rid of the Stretch GUI and working the Pi headless, makes a
lot of sense though.

I would reccomend the RASPBX image.


--
Graham.

%Profound_observation%
  #9  
Old September 26th 19, 10:49 AM posted to uk.telecom.voip
David Woolley
external usenet poster
 
Posts: 113
Default Building a SIP spam rejecter

On 25/09/2019 18:20, Graham. wrote:
Installing vanilla Asterisk and manipulating the dial plan etc in a
terminal session is not my idea of fun. If the addige "GUIs are for
WIMPs" is true, then I'm a WIMP!


I doubt you will get anywhere close to the full telesales torture
features through FreePBX.

Also, as with most GUIs, the behaviour when things break will be
determined by what's underneath and you will find it much easier to
debug problems if you know that. I'd consider FreePBX something you use
for productivity after you have learned how to program Asterisk directly.
  #10  
Old September 26th 19, 08:01 PM posted to uk.telecom.voip
Graham.[_3_]
external usenet poster
 
Posts: 340
Default Building a SIP spam rejecter

On 25/09/2019 18:20, Graham. wrote:
Installing vanilla Asterisk and manipulating the dial plan etc in a
terminal session is not my idea of fun. If the addige "GUIs are for
WIMPs" is true, then I'm a WIMP!


I doubt you will get anywhere close to the full telesales torture
features through FreePBX.

Also, as with most GUIs, the behaviour when things break will be
determined by what's underneath and you will find it much easier to
debug problems if you know that. I'd consider FreePBX something you use
for productivity after you have learned how to program Asterisk directly.


That smarts! I suppose I asked for it.

Anyhow, what's this about.

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
Thunderbird/60.9.0

I thought you'd be posting with Telnet.

--
Graham.

%Profound_observation%
 




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Anti-Spam Filter.(thunderbird spam filter) zak07000 uk.telecom.broadband (UK broadband) 0 March 27th 08 05:41 PM
what does the average telephone exchange building look like ? Mark Evans uk.telecom.broadband (UK broadband) 0 February 24th 04 10:06 AM
what does the average telephone exchange building look like ? Rupert uk.telecom.broadband (UK broadband) 0 February 22nd 04 01:24 AM
what does the average telephone exchange building look like ? P H uk.telecom.broadband (UK broadband) 0 February 20th 04 02:24 AM


All times are GMT +1. The time now is 08:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.Content Relevant URLs by vBSEO 2.4.0
Copyright 2004-2020 BroadbanterBanter.
The comments are property of their posters.