Esp8266 Arduino Telephone Caller ID system with anti-spam feature

Congratulations, it's a great job!

Congratulations,excellent and usefull job.I wonder if it would be possible for me to get a device.If you are intersested please contact me at dimitriosleonardos@yahoo.com,to arrange it...

dimitrios_leonardos:
Congratulations,excellent and usefull job.I wonder if it would be possible for me to get a device.If you are intersested please contact me at dimitriosleonardos@yahoo.com,to arrange it...

OK. Thanks. I guess you have understood that this is not a stand alone system. It needs also a server somewhere with Apache/PHP/MySQL for storing the calls and maintaining the telephone book (This could be a network service or even a Rapsberry Pi in the WLAN)

The design documentation is complete so someone could build it based on that alone. I won't do this for you but there are people on this site who do. Simply put post in the Gigs and Collaborations section of the forum. I would, however, be prepared to give some limited support to an Arduino developer who is also familiar with ESP8266 and PHP/MySQL if it comes to troubleshooting etc.

I also have a later version of the software which includes a "Message Waiting" indicator and screen button to accept a current call attempt, even if it is identified as spam. I will publish this soon here. I have also a partial development on a Raspberry Pi, where the demodulator and parser are offloaded to an ATMEGA328P, but that some way from publication.

This is pretty close to what I wanted to build. I thought it would be cool to put a little blue ice cube icon on my phone. So when a SPAM call came in I could click it and "ice" the call. Then everyone connected to the service would have that call blocked as well.

Until this AM when my Daughter got a SPAM call spoofing the number from the cell phone I'm currently building! I guess they are hacking into iPhones and reading their address lists for numbers?

Spooky world.

-jim lee

I built a version of this and it works great! I really appreciate all the work that has gone into the development of this project and it was amazing to find something that did most of what I needed for what I wanted to do. No more spam calls at night for me :slight_smile:

In my case I did not use a display and it was fairly easy to remove the display dependent parts from the code.

The only issue I had was with the ESP8266 crashing in the timer interrupt handler. I resolved this by editing SPI.cpp in the Arduino platform code and marking all methods in there with the ICACHE_RAM_ATTR. I've attached my modified file in case anyone else runs into this.

Cheers,

Rick

SPI.cpp (16.4 KB)

I'm pleased that you had some success with this project. I didn't experience the SPI issue which you referred to but I did experience similar problems with internal functions in a timer call back chain not being forced to remain in ram. That was solved at the latest by core 2.4.0. Anyway, someone may well benefit from your troubleshooting.

I'm now adding the latest production version of this application v1_12 which has the following features:

  1. A Message Waiting Indicator
  2. An Accept Spam Call on screen button, allowing the user to accept a spam call during the period the ringing is suppressed.
    The PHP code, database format, documentation (apart from the supplement below) etc. remain the same as in the original version published earlier in the thread.

Also included are some examples of the format of message waiting notifications (MDMF). However, you can also use the following tool to visualize the various Caller Id and message formats and even generate the audio signals: Telephone Caller ID AFSK Generator - Exhibition / Gallery - Arduino Forum

I'm currently documenting a simpler system aimed more at beginners who can take the basic core consisting of the demodulator and parser, and incrementally add their own functionality to it without having to touch the core logic. It is ATmega328P based. Hopefully, it will appear soon.

ESP_Telephone_Callerid_v1_12_published.zip (39.5 KB)

MDMF Message Waiting Data Format.pdf (341 KB)

The message waiting feature is the icing on the cake for me on this project. Because we mostly had telemarketing/spam calls on our landline we largely ignored the phone and sometimes we didn't notice that we had voice mail for days. That problem will be solved now!

This really is a great project and I know how much work has gone into it. Thanks again 6v6gt!

I love to see the interest in this subject. Personally, I think we need telemarketers a little less than fleas, mosquitoes, and politicians.
It is my ambition to put together a system that can be given away as a promotional device like ball point pens or refrigerator magnets. so far, I have a system that works but, it would make a very expensive refrigerator magnet at hobbyist prices.
It is completely stand-alone, it uses the Mega2560, the HT9032 receiver, the Seeed 240X320 TFT display/SD, the Osepp RTC/SD, and the Emic2 text to speech talker. I have incorporated a couple features that have not been mentioned so far.
1.) Since I have two SD cards, I use one to hold the message played for the blocked caller. I do not simply block the call and let it go at that. To reduce the likelihood of a repeat call I play the triple tone followed by 'The number you have reached has been disconnected or is no longer in service.' I use the the Simple Audio which requires audio stored on a clean SD.
2.) Since the telephone companies are encouraging telemarketers to spoof their CIDs, I have gotten calls from numbers from power company, doctors offices, IRS, insurance company, I have even received calls from myself. The problem with simply blocking these calls is that I may be blocking legitimate calls. My reasoning says that a telemarketer won't stick with a particular spoof number for an extended amount of time. By simply scanning the time stamp on the call records I can purge the blocked calls after a settable amount of time.
I can do searches, printouts create/edit white lists, and other features that have been mentioned here. My system works quite well but I am not good at packaging so it is not impressive to look at. Also, I have been an amateur programmer since 1975. My code is not pretty either. I have been thinking about incorporating the components unto a single circuit board to avoid the high hobbyist prices but not until I reach a plateau in the development.
Did I mention that I am not fond of telemarketers? For several years I have been asking who is behind the push to eliminate credit card interest and why it is so important to them that they must ring my bell 5 or 10 times a day. I have tried many times to see where they are going with their presentation. So far the only conclusion is that they simply do not want me to answer my phone. Why??? Who??? Why cant calls be traceable, like emails? Did I say I don't like telemarketers?

I made the same project with an Arduino nano and an ESP8266 3-4 years ago.

The HT9032D is a fantastic component for it. Since I didn't have much memory, I was just sending the caller ID to my database and got the answer directly from whitepages service.

This year, after I saw that you can buy an ESP32 wroom with 16MB of flash for just 5$, I begun to see what is possible to do with this microcontroller.

I am still developing it, but this is the base schematic for it:

  • Hook-Up resistor with optocoupler. Just put it to an output to answer the call.
  • 600:600 audio transformator. Connecting it to ADC and DAC you can listen and also play waves*! And you can also detect DTMF signals without any external device.
  • The HT9032D for caller ID
  • Ringing detection

My idea is that if someone calls you, the ESP32 will ask if the number is valid. If it is valid, it will leave it ringing (maybe in future, after 8PM it will answer automatically).
If not valid, the module will hook up and play a sound or text.
Do you know ESP8266SAM? It is a text-to-speach engine and works perfectly on the ESP.

So you can say: "press 1 if you want send a message to Adriano" and you can listen for DTMF audio. You can play also the "Number not valid" tone.

Note: The optocoupler is important, since you have over 90V AC on the Tip and Ring bus when it is ringing.

The HT9032D chip (no longer stocked by Mouser, Digikey etc. but still available from some EBAY retailers) can certainly reduce the programming effort required for these Telephone System applications because there is then no need for a software AFSK demodulator. I used a different philosophy and took an established software demodulator originally intended for Amateur Packet Radio Service applications as a basis. With quite a small hardware footprint, I also achieved quite pleasing results.

I canceled my land line.

-jim lee

2 Likes

Hello 6v6gt! You say, "I'm currently documenting a simpler system aimed at more beginners ....." Did you conclude this?

Or, does anyone here have the full project "display_phonecall" that uses the SIM800 or SIM900 that works like a real phone?

I believe this is easier for a beginner like me for example; Thank you all

Dancopy:
Hello 6v6gt! You say, "I'm currently documenting a simpler system aimed at more beginners ....." Did you conclude this?

Or, does anyone here have the full project "display_phonecall" that uses the SIM800 or SIM900 that works like a real phone?

I believe this is easier for a beginner like me for example; Thank you all

Yes, I did. It is now here (finally):

https://forum.arduino.cc/index.php?topic=642458.0

It suffered a bit of scope creep in the mean time and now includes a lot of exotic, but optional client parts as well as the basic server. It is split into a client server type solution. However, the main server part is relatively simple and can be used stand alone even with an LCD screen.

You may also want to look at something like: How to use Caller ID Module with Arduino | LinkSprite Learning Center (or something similar) if you can find it for sale. You'd still need a parser of some sort, though.

I can't help with SIM800 or SIM900 based solutions but maybe someone else here can.

@6v6gt
Thanks, I'll take a look, although it is easier for me to work with the SIM module.

6v6gt:
Yes, I did. It is now here (finally):

Telephone Caller ID Dev Kit - Exhibition / Gallery - Arduino Forum

It suffered a bit of scope creep in the mean time and now includes a lot of exotic, but optional client parts as well as the basic server. It is split into a client server type solution. However, the main server part is relatively simple and can be used stand alone even with an LCD screen.

You may also want to look at something like: How to use Caller ID Module with Arduino | LinkSprite Learning Center (or something similar) if you can find it for sale. You'd still need a parser of some sort, though.

I can't help with SIM800 or SIM900 based solutions but maybe someone else here can.

I found this:
http://store.linksprite.com/pstn-caller-id-module-for-arduino-pcduino/
and see PCB,there is "MCUBLOX",so,I found :https://mcublox.taobao.com/
then
https://item.taobao.com/item.htm?spm=a1z10.5-c.w4002-2140322761.14.21da290bONfE5x&id=14034028581

Thank you for this project. Excellent, very useful.
Especially when I tried the Caller Generator app. He works with great precision.
I made the video here: Caller ID Detector (Arduino) Part 2 | English - YouTube

Thanks for your feedback and for linking the video which is of very good quality. It looks like you are able to use the tool Telephone Caller ID AFSK Generator very fluently.
That caller ID system is, incidentally, in daily use here at home and I haven't touched the code for over 2 years.

congrats looks great to me