Turn on led by phone and phone contacts I would like ask for help. Can you give me an advice how to create (contacts) nubers who can turn on led.

#include &lt;GSM.h&gt;
#define PINNUMBER ""
GSM gsmAccess;
GSMVoiceCall vcs; 
char numtel[20];

void setup()
{
 pinMode(13, OUTPUT);

Serial.begin(9600);
while (!Serial) {
;
}

Serial.println("Receive Voice Call");

boolean notConnected = true;

while (notConnected)
{
if (gsmAccess.begin(PINNUMBER) == GSM_READY)
  notConnected = false;
else
{
  Serial.println("Not connected");
  delay(1000);
}
}

vcs.hangCall();

Serial.println("Waiting for a call");
}

void loop()
{

switch (vcs.getvoiceCallStatus())
{
case IDLE_CALL: 

  break;

case RECEIVINGCALL: 

  Serial.println("RECEIVING CALL");

  vcs.retrieveCallingNumber(numtel, 20);


  digitalWrite(13, HIGH);


  vcs.answerCall();
  vcs.hangCall();
  digitalWrite(13, LOW);

  break;


  }
  delay(1000);
  }
So, retrieveCallingNumber is documented in here. It "retrieves the calling number, and stores it" in a character array passed as second argument.

The simplest solution to check if this number is among the allowed ones is to construct a string from this and compare it against a predefined string for equality. (If you have more than one allowed number, repeat for all.)

Something like this:

vcs.retrieveCallingNumber(numtel, 20);
String s = String(numtel);
if (s == "allowed number goes here") {
    // toggle LED etc.
}