for (u_int i = 0; i < NNOISE; i++)
if (strneq(s, noiseMsgs[i], strlen(noiseMsgs[i])))
return (true);
- // some modems echo the dialed number
- if (fxStr(s) == dialedNumber) return (true);
+ /*
+ * Some modems echoes the DTMF of the dialed number, and this should be
+ * ignored too.
+ * Instead of simply checking if "dialedNumber" is equal to "s" we must
+ * consider the possibility of having more numbers at "conf.dialCmd".
+ * Eg.: conf.dialCmd = atdt0%s (zero will be echoed)
+ * The easiest way is to find if "dialedNumber" is a sub-string of "s".
+ */
+ if (strstr(s, (const char *) dialedNumber) != NULL) return (true);
return (false);
}
#undef NNOISE