Here in the USA when using my new 4G module (SIM7600A), when an incoming call occurs, the phone number in the response from the SIM7600A to the AT+CLCC command does not necessarily contain a leading + symbol; for example, when I call my Ringo phone from my cell phone, the response string looks like this:
+CLCC: 1,1,4,0,0,“1215xxxxxxx”,129
See, no + symbol!
Because of this, the incoming number is mis-extracted (potentially as garbage) in the notification and the call log, and will not match the corresponding contact, because the contacts are required by the firmware to have a leading + symbol.
So it is necessary to add two lines of code to MAKERphone.cpp to allow incoming calls to work properly with or without the leading + symbol (because elsewhere in the world, the + symbol is apparently always provided).
Therefore I suggest changing the two lines of code in MAKERphone.cpp member function incomingCall() that currently read:
uint16_t foo = localBuffer.indexOf("\"+", localBuffer.indexOf(",1,4,0,0")) + 1;
number = localBuffer.substring(foo, localBuffer.indexOf("\"", foo));
to the following 4 lines (the 2 lines marked FCP are added; the other 2 are the same):
uint16_t foo = localBuffer.indexOf("\"+", localBuffer.indexOf(",1,4,0,0")) + 1;
if(!foo) foo = localBuffer.indexOf("\"", localBuffer.indexOf(",1,4,0,0")) + 1; // FCP
number = localBuffer.substring(foo, localBuffer.indexOf("\"", foo));
if(number[0] != '+') number = '+' + number; // FCP
This insures that an incoming call from a number without a leading + symbol will be properly extracted, and furthermore converted to a number with a leading + symbol for matching with contacts.
This is hardly the best code for the circumstance, but it’s a quick and dirty fix until someone can improve this code to work properly in the USA and elsewhere. For example, blocked (*67) incoming calls are not handled well by this code or this function.