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

boolean isGettingDigit;
boolean isTalking;

int digitCounter;
int digitValue;
String phoneNumber;

const int DIGITS_IN_PHONE_NUMBER = 11;
char phoneNumberChars[DIGITS_IN_PHONE_NUMBER + 1];

//---- gsm begin
#define SIM_PIN_NUMBER ""

    phoneNumber[0] = '7';
    phoneNumber = "+" + phoneNumber;
  }
}

void refreshButtons() {
  const long currentMillis = millis();
  buttonHandset.refresh(analogRead(HANDSET_PIN), currentMillis);
  buttonRotate.refresh(analogRead(ROTATE_PIN), currentMillis);
  buttonCounter.refresh(analogRead(COUNTER_PIN), currentMillis);
}

void setup() {
