That’s because your telNR is not a well formed c-string, you are missing the ‘\0’ at the end and probably some garbage in memory is also sent until it find a NULL byte (and possibly those bytes are invisible in ascii so you don’t see them in the monitor)
Declare
const byte nbDigitInPhoneNb = 8;
char telNR[nbDigitInPhoneNb+1]; // +1 for the trailing null char ‘\0’
And then
if (antT >= nbDigitInPhoneNb) {
telNR[nbDigitInPhoneNb] = ‘\0’; // terminate the c-String correctly
sim900.print("ATD");
sim900.print(telNR);
sim900.println(";");
...
Your setup() could prepare the buffer (overkill for this case because it’s a global variable so already set to 0)
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
sim900.begin(9600);
reset(); // prépare the buffer
}
Note that you could rewrite your void reset() this way:
void reset() {
antT = 0;
memset(telNR, ’\0’, nbDigitInPhoneNb+1); // http://www.cplusplus.com/reference/cstring/memset/
}
(the memset() call is not even needed as antT is really what you use to trigger the call and you don’t need to empty the buffer as it will get overwritten when you type new stuff in, so the reset function could just be antT = 0;)