You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds an option to the ReceiveMF application to allow specifying a
maximum number of digits.
Originally, this capability was not added to ReceiveMF as it was
with ReceiveSF because typically a ST digit is used to denote that
sending of digits is complete. However, there are certain signaling
protocols which simply transmit a digit (such as Expanded In-Band
Signaling) and for these, it's necessary to be able to read a
certain number of digits, as opposed to until receiving a ST digit.
This capability is added as an option, as opposed to as a parameter,
to remain compatible with existing usage (and not shift the
parameters).
ASTERISK-29877 #close
Change-Id: I4229167c9aa69b87402c3c2a9065bd8dfa973a0b
@@ -245,7 +257,7 @@ static int read_mf_digits(struct ast_channel *chan, char *buf, int buflen, int t
245
257
break;
246
258
}
247
259
}
248
-
if (digits_read >= (buflen-1)) { /* we don't have room to store any more digits (very unlikely to happen for a legitimate reason) */
260
+
if ((maxdigits&&digits_read >= maxdigits) ||digits_read >= (buflen-1)) { /* we don't have room to store any more digits (very unlikely to happen for a legitimate reason) */
249
261
/* This result will probably not be usable, so status should not be START */
0 commit comments