   if (isGettingPhoneNumber) {
     isGettingDigit = buttonState == PRESSED;
     if (isGettingDigit) {
-      digitCounter++;
       digitValue = 0;
     } else {
-      if (digitValue == 10) {
+      if (digitValue > 0) {
+        if (digitValue == 10) {
+          digitValue = 0;
+        }
+        phoneNumber += String(digitValue);
         digitValue = 0;
       }
-      phoneNumber += String(digitValue);
-      if (digitCounter == DIGITS_IN_PHONE_NUMBER) {
+      if (isTalking) {
+        sendDigit();
+      } else if (isValidPhoneNumber()) {
         makeCall();
       }
     }

  }
}

void makeCall() {
  updatePhoneNumberForRussia();
  phoneNumber.toCharArray(phoneNumberChars, DIGITS_IN_PHONE_NUMBER + 1);
  if (gsmVoiceCall.voiceCall(phoneNumberChars)) {
    isTalking = true;
    while (isTalking && (gsmVoiceCall.getvoiceCallStatus() == TALKING));
    // ПРОВЕРИТЬ: когда трубку кладут "тут" и когда кладут "там".
    // ПРОВЕРИТЬ: когда занято.
  }
}

void updatePhoneNumberForRussia() {

void pickedUpHandler(telephone::ButtonState buttonState) {
  isGettingPhoneNumber = buttonState == PRESSED;
  if (isGettingPhoneNumber) {
    Serial.println("Headset up");
    phoneNumber = "";
  } else {
    Serial.println("Headset down");
    isGettingDigit = false;
    if (isTalking) {
      gsmVoiceCall.hangCall();
