Can I Fix in GSM module which person can call me?

In my project I want to fix some person(sim number) to call in my module. Without those, no one would be able to make call in my module or it will not response to intruder call. Is it possible in coding? How can I do so? Plz, help me.

which module do you have?

most modules have an AT interface and you get an AT message when someone is calling. (use AT+CLIP=1 in some systems)

You need to parse that message

RING

+CLIP:+xxxxx

extract the calling number +xxxxx and compare it with known/approved numbers and if there is a match then you issue the answer command (ATA often) to the module. You could also issue an ATH to hang up.

1 Like

Try your mobile manufacturer support, ask how to block unwanted calls

1 Like

Thanks a lot! I am using SIM900 module

it should work with a SIM900

1 Like

But I want to filter all the numbers except those 2-3 known number.

Sure. I will try. I will let you know the feedback of my work. Thanks!

don't forget to enable the Caller Line Identification for the SIM900 with AT+CLIP=1 followed by carriage return
then listen to Serial asynchronously (I would suggest to study Serial Input Basics to handle this) and look for a line starting by +CLIP: when you get that the number is right after

1 Like

Thanks!.. It worked!

Great
Post your code, I’m sure it can be useful.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.