Internet-Draft Error Detection and Recovery For Reliabl October 2025
Albert Expires 6 April 2026 [Page]
Workgroup:
teas
Published:
Intended Status:
Standards Track
Expires:
Author:
N. Albert
PhreakNet

Error Detection and Recovery For Reliable In-Band Signaling Over Error-Prone Links

Abstract

This document specifies a mechanism by which signaling information can reliably be communicated over links prone to errors.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 4 April 2026.

Table of Contents

1. Introduction

1.1. The Problem

Voice-over-Internet Protocol (VoIP) technologies are now a common way of connecting telephone calls in the Public Switched Telephone Network (PSTN). The use of Session Initiation Protocol (SIP) is especially common for PSTN trunking between telephone switches and phone systems.

Because IP telephony is now commonplace, dual-tone multifrequency (DTMF) tones are often conveyed out of band on such connections, usually using RFC2833 (now RFC4733) or SIP INFO. With these methods, the digit represented by the corresponding tones, as well as the duration of the tones, are emulated out of band. One of the reasons for this is that the audio quality of DTMF can degrade over voice connections, particularly when non-linear codecs (i.e. those besides G.711 ulaw/alaw) are used, and it moves the need for digital signal processing (DSP) to detect DTMF tones closer to the calling endpoint. In the case of IP telephony endpoints, DSP may not be required at all.

Out-of-band DTMF can cause various interoperability issues as well. The Ademoco Contact ID protocol makes use of DTMF tones with short frequencies, which are not well supported by out-of-band DTMF protocols; for this reason, in-band DTMF is recommended for Contact ID signaling.

One of the primary problems addressed in this document is that multifrequency signaling (MF) and dual-tone multifrequency signaling (DTMF) have several tone pairs with similar frequencies. This can cause certain MF digits to be interpreted as DTMF if out-of-band DTMF detection is being used. For this reason, in-band signaling is recommended for MF signaling.

This document outlines how out-of-band DTMF signaling schemes can interfere with MF signaling and discusses methods of detecting and working around such errors.

1.2. Background

In-band signaling MUST be used in overlay networks when the underlying network involves an in-band component. An example of this is when a POTS line is used as a trunk to reach multiple numbers accessible by Direct Inward Dialing (DID). Tto communicate the called number (the DNIS) or the calling number (properly the CPN, but which is the same as the ANI for all practical purposes in this document), in-band signaling is used by the logical overlay network, since there is no access to the out-of-band signaling channels.

There are three primary standards for in-band signaling using voice-grade frequencies: SF, MF, and DTMF. MF and DTMF use tone pairs, while SF involves single-frequency tones. Other signaling methods exist, such as dial pulsing, revertive pulsing, panel call indicator, etc., but these involves electrical manipulation of the line and are thus not possible in an overlay voice network.

DTMF is normally used on line-side signaling and is not preferred for trunk-side signaling, even in overlay networks making use of subscriber lines in the underlying network. This is due to the desire to maintain use of signaling schemes which are not used in subscriber signaling, and to avoid logging in pen registers or other SMDR equipment which may log DTMF digits.

For in-band signaling purposes, the DNIS or called number information MUST be sent in all cases for successful call routing. The ANI is optional for both incoming and outgoing calls (on incoming calls, "O" for out of area can be sent to Caller ID CPE) and on outgoing calls, the called switch in the overlay network can use a default ANI for outgoing calls). However, ANI information SHOULD be also be sent to enhance user experience and control.

Answer supervision MUST also be conveyed in-band since there is no signaling channel available to the overlay network. A brief burst of 2600 Hz SHOULD be sent from the called switch to the calling switch, to indicate answer supervision; the calling switch SHOULD convey answer supervision out of band to the caller when this happens so that billing may begin.

2. Terminology

An overlay voice network refers to a voice network that makes use of another underlying voice network as its physical layer.

An error shall refer to any signaling digit sent by the sender and not exactly received by the receiver, or likewise any digit not sent that was received. This can include false, modified, and missing digits, due to any reason.

Corruption shall refer to an entire number sequence being sent by a sender not being received exactly by a receiver.

SMDR refers to station message detail recording.

CPE refers to Customer Premises Equipment.

VoIP refers to Voice-over-Internet Protocol.

SIP refers to Session Initiation Protocol.

RFC2833 refers to the method of out-of-band DTMF signaling defined in RFC2833, since superceded by RFC4733.

SF refers to single-frequency signaling.

MF refers to multifrequency signaling.

DTMF refers to dual-tone multifrequncy signaling.

ANI refers to Automatic Number Identification.

CPN refers to the Calling Party Number, or Called ID number.

DID refers to Direct Inward Dialing.

DOD refers to Direct Outward Dialing.

DNIS refers to Dialed Number Information Service.

RDNIS refers to Remote Dialed Number Identification Service.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

3. Frequencies used in multifrequncy signaling systems

3.1. MF Frequencies

This table shows the frequencies used for each MF tone.

Table 1
- 900 Hz 1100 Hz 1300 Hz 1500 Hz 1700 Hz
700 Hz 1 2 4 7 ST3P
900 Hz - 3 5 8 STP
1100 Hz - - 6 9 KP
1300 Hz - - - 0 ST2P
1500 Hz - - - - ST

3.2. DTMF Frequencies

This table shows the frequencies used for each DTMF tone.

Table 2
1209 Hz 1336 Hz 1477 Hz 1633 Hz
697 Hz 1 2 3 A
770 Hz 4 5 6 B
852 Hz 7 8 9 C
941 Hz * 0 # D

3.3. Frequency Similarities

Several MF/DTMF tone pairs share similar frequencies.

Table 3
MF Frequency DTMF Frequency
700 Hz 697 Hz
1500 Hz 1477 Hz

Improperly tuned DTMF detectors are thus capable of falsely detecting MF digits as the frequency-similar DTMF digits.

Extensive testing has shown that the MF digits 7 and 8 are most likely to be falsely conflated as DTMF by out-of-band DTMF detectors. Typically, this results in the actual MF digit being squelched out of the audio and a spurious DTMF tone being added to the audio.

Table 4
MF Digit DTMF Digit
7 (700+1500) 3 (697+1477)
8 (900+1500) ?

4. Protocols for Error-Detecting In-Band Signaling

MF signaling is prefered to SF signaling due to its speed and flexibility - MF signaling can transmit upwards of ten digits per second, while SF signaling can, in the worst case, take over a second to transmit one digit.

4.1. Signaled Values

It is assumed that for any signaling transmission, two numbers are sent, one of fixed length (or of a set of fixed lengths known in advance) and one of variable length that is unknown by the other side in advance.

On incoming calls, terminating to a subscriber system, it is assumed that the DNIS is of fixed length and the ANI is of variable length. On outgoing calls, the ANI is of fixed length while the called number may be of variable length.

4.2. MF Signaling with Error Detection

The class of error that occurs with MF signaling are loss of digits, typically the digits 7 and 8.

Normally, only KP, the numeric digits, and ST are needed to transmit numeric information using MF signaling. This leaves the digits STP, ST2P, and ST3P, which have been used over the years in various signaling schemes to convey specific types of informations. The use of these three additional start digits can thus be used to enrich the payload at no additional cost.

Because the typical failure mode of MF signaling is loss of digits, error detection can be performed by ues of a checksum over the number of digits in the variable-length number (errors can be detected trivially in the fixed-length number simply by checking its length). Because four start digits are available, the number of digits in the number modulo 4 can be mapped to one of the start digits, e.g. as follows:

Table 5
Number of Digits Modulus (% 4) MF Digit Asterisk Digit
0, 4, 8, 12, etc. 0 ST3P C
1, 5, 9, 13, etc. 1 ST2P B
2, 6, 10, 14, etc. 2 STP A
3, 7, 11, 15, etc. 3 ST #

This error detection scheme can successfully detect errors with no additional signaling digits as long as the number of errors is not a multiple of 4. Unfortunately, 4 dropped digits is possible if there are four 7s or four 8s in the number, which is not particularly unlikely. If the lack of a valid number (i.e. invalid dialed number or invalid ANI) can be detected in the presence of 4 dropped digits (i.e. the numbering length cannot differ by up to 4, for any valid numbers), error detection may still be possible by another method.

An extension of this scheme involves using KP2 (same as ST2P) instead of KP in certain calls, allowing both the key pulse and the start digit to be used for checksum information. Instead of 4 possible checksums, this would allow for 8 possible checksums. However, a number with 8 '7' and '8' digits combined could still result in this checksum passing.

A more robust checksum scheme involves the addition of an additional checksum digit, prefixed to the numeric digits, e.g. KP + C + XXX + ST, where C represents the dedicated checksum digit. Since C can have ten possible values (as opposed to only two possible key pulse digits), there are now 40 possible checksums possible. This should be more than adequate to cover any number of dropped digits in any reasonably plausible signaling scenario, particularly for ten-digit U.S. numbers.

4.3. SF Signaling with Error Detection

Unlike with MF signaling, because SF signaling involves individual pulses, which themselves are immune to the problems posed to MF signaling by out of band DTMF, SF signaling is more robust against errors. However, occasionally a pulse from a digit may be dropped, leading, for example, a sent 0 to be received as a 9 instead. Therefore, the class of error with SF signaling is not outright loss of digits but digit mutation - unlike MF signaling where the digits received are assumed to be correct, but digits may be missing, received SF digits themselves may be suspect

The checksum for SF signaling involves the use of the digit sum over all the digits in the number sent, both the fixed-length number and the variable-length number. (The digit sum of the number 9-8-7, for example, is 9+8+7 = 24.) The checksum digit is then simply the digit sum modulo M, where M is a suitably large modulus, but no greater than 10. M can be interpreted as the number of SF pulses that would need to be dropped from the entire number in order for a false negative to occur in error detection. 10 is a natural choice for M, but 5 MAY also be used since it evenly divides 10. The reason for preferring 5 is that it is still reasonably resistant to false negatives and ensures that the checksum digit can take at most a little over half a second of transmission time, as opposed to a little over a second.

As an example with M=5, if the digits 9+8 are sent, the checksum is 17, and 17 % 5 = 2. This digit is sent first. If the digits were received as 8+8, the receiver would calculate this value to be 1, and the mismatch indicates at least one digit has been corrupted.

An optimization that SHOULD be made is to use a single checksum calculated from the digit sum over both the fixed and variable-length numbers that are sent. For efficiency, only one digit is used for checksum purposes instead of two, which is more important with SF signaling due to how slow it is compared to MF signaling. As long as no more than five pulses are dropped from both numbers combined, this method will successfully detect SF signaling errors. In practice, it has been found that most SF signaling transmissions complete without error, or with only one error if errors occur.

4.4. Communicating Error Detection Results

Errors can occur in both MF signaling and SF signaling; however, the nature of the errors differs in a manner that usually allows one to complete successfully. A typical failure mode is for MF signaling to fail because the transmitted number includes 7s or 8s, while SF signaling failures tend to involve digits being off by one. If MF fails, both sides can agree to fall back to SF signaling to transmit the corrupted information. This section describes how the receiver can communicate to the sender when it has detected errors to request that a number (or multiple numbers) be retransmitted.

MF signaling SHOULD be attempted first, because if the receiver does not detect any errors, the transmission can be completed relatively quickly, in a couple seconds or so. Using the error detection scheme described for MF signaling, the receiver calculates whether the variable-length number was corrupted. Using a simple length check, the receiver calculates whether the fixed-length number was corrupted. The receiver SHOULD then indicate to the sender whether the fixed-length number, the variable-length number, both, or neither was corrupted. The receiver indicates this to the sender by the use of an MF digit, referred to here as the "error digit". If error recovery is being used, the sender MUST wait up to 1 second for the error digit after completing MF sending.

Table 6
Call Direction DNIS Corrupted Dialed Number Corrupted ANI Corrupted MF Digit Asterisk Digit
In No - No - -
In Yes - No STP / Code 12 A
In No - Yes ST3P / Code 11 C
In Yes - Yes ST2P B
Out - No No - -
Out - Yes No STP / Code 12 A
Out - No Yes ST3P / Code 11 C
Out - Yes Yes ST2P B

Importantly, if an MF digit is sent, the digit sent is not one that is likely to be dropped or corrupted due to out-of-band DTMF squelching.

In the case that no errors occur, no error digit is sent and the 1 second timeout expires at the sender.

If the sender receivers an error digit, it MUST retransmit the corrupted number(s) using SF signaling. It will first decode the digit to determine if one or two failures occured, and then retransmit this information using SF, according to the Error-Detecting SF signaling scheme described above. The receiver will then detect if errors have occured. If the information has been corrupted a second time, the receiver routes the call to an intercept messaging informing the caller that his call did not go through. The caller SHOULD then retry his call as it is possible the call will complete successfully in a subsequent attempt.

5. Implementation Guidelines

Extending the duration of MF digits does not improve reliability in the face of corruption due to out-of-band DTMF detection. The length of digits and silence intervals SHOULD be at least 50 ms.

Any SIP trunks used MUST be configured to operate in G.711 ulaw/alaw only. Other codecs, such as G.722 MUST NOT be used.

Any local DSP processing on the receiver side of the phone call, i.e. to detect DTMF locally on in-band connections, MUST be disabled.

Any SIP trunks used SHOULD be configured to operate in in-band DTMF, to reduce the likliehood of signaling errors caused by out-of-band DTMF detection. However, because telephone networks involve multiple trunks distributed over multiple non-cooperating entities, it is possible that even if both sides are set to in-band, intermediate carriers may leverage out of band DTMF, thus corrupting MF signaling transmissions. This is the scenario for which the error detection and recovery procedures described in this document have been devised.

6. Security Considerations

Despite the possibility of ANI spoofing, information is often relied upon to be accurate. Signaling errors which result in connections to wrong numbers or have wrong identity information have the potential of misleading users, particularly if errors occur in a way not captured by the checksum, resulting in a false negative. All efforts should be made to preserve the integrity of signaling information.

Additionally, the use of in-band signaling in an overlay voice network as described opens the network up to potential fradulent signaling attacks from unauthenticated sources. If a POTS line is configured to terminate any calls received with valid signaling information, it is possible an attacker could terminate a call to the service, spoof signaling information, and terminate calls successfully. Further checks of ANI information or the use of other security credentials for trunk synchronization MAY be employed for stronger authentication guarantees.

7. References

7.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.

7.2. Informative References

Authors' Addresses

Naveen Albert
PhreakNet
United States