DTMF RFC2833 PROCESSING (VoIP)

7.8
RFC2833 [Schulzrinne and Petrack (2000)] describes how to carry DTMF signaling, other tone signals, and telephony events in Reat Time Protocol
(RTP) packets. The RTP payload format for a DTMF event is designated as a “telephone-event,” with the media type as an “audio/telephone-event” in negotiation. The RFC2833 payload format for telephone events does not have a static payload type number. The payload type number is established dynamically. The default clock frequency is 8000 Hz, but the clock frequency can be redefined when assigning the dynamic payload type. The named telephone events are carried as part of the voice stream and use the same sequence number and time- stamp base as the regular voice channel. RFC2833-based out-of-band telephone events are used for five different types of events/ signals—namely DTMF tones, fax-related tones, standard subscriber line tones, country-specific subscriber line tones, and trunk events.
The RTP header contains 12 bytes, and the details are given in topic 10. The use of the RTP header fields time stamp, sequence number, and marker bit are updated in the RFC2833 packet. topic 10 has some additional details on RTP header fields, which are common for both RFC2833 packets and voice packets. The RTP marker bit indicates the beginning of a new event. The marker bit should be set to “1″ for the beginning of the DTMF packet and to “0″ for all succeeding packets relating to the same event.
7.8.1


RTP Payload Format for Telephone Digits

The RTP payload format for telephone events is shown in Fig. 7.9 . The RTP payload contains 4 bytes. The 4 bytes are distributed over several fields denoted as event, End bit, R-bit, volume, and duration. The use of these fields is given as follows:
Event is of (1-byte). The event field is a number between 0 and 255 identifying a specific telephony event. DTMF-related event codes within the telephone-event payload format are shown in Fig 7.9.
End (E) bit: If set to a value of one, the “end bit” indicates that packet contains the end of the event. The duration parameter with end bit set to “one” measures the complete duration of the event.
R-bit: This field is reserved for future use. The sender must set it to zero, and the receiver must ignore it.
RTP payload format for DTMF telephone events.
Figure 7.9. RTP payload format for DTMF telephone events.
Volume (6-bits): This field describes the power level of the event, expressed in dBmO after discarding the sign. Power levels range from 0 to -63 dBmO. The range of a valid DTMF event is from 0 to -36dBm0. Power levels of lower than -55 dBm0 are rejected as an invalid digit.
Duration: The duration field in time-stamp units indicate the duration of the event or reported segment. For a nonzero value, the event begins at the instant identified by the RTP time stamp and has so far lasted as long as indicated by this parameter. The duration value of zero is reserved to indicate that the event lasts forever, and it is considered effective until updated with new details.
The transmitter packetizes the event packet as soon as it recognizes an event and every packet interval thereafter. The packet interval can vary with previous voice RTP packet intervals. The beginning of the event is indicated with the RTP time-stamp value incremented by a minimum packet interval, and the RTP sequence number is incremented by one. The duration of the start event begins at the instant identified by the RTP time stamp. The marker bit field in a 12-byte RTP header should be set to “1″ for the beginning of the DTMF packet.
If the DTMF event is pressed continuously, the RFC2833 encoder generates an RFC2833 packet with the same RTP time-stamp value corresponding to the beginning of the event and the RTP sequence number is incremented by one for each subsequent event packets. The duration of the event is increased by packet interval in time-stamp units.
If the DTMF event is released, the encoder generates the end of the event packet with the same RTP time-stamp value corresponding to the beginning of the DTMF event and the sequence number is incremented by one. The duration of the event corresponds to the total duration of the DTMF event that is pressed. The end bit field in RTP event payload is set to one to indicate the end of the event.
The start and end event packets can be retransmitted up to three times to ensure the duration of the event can be recognized correctly even if the packet is lost. The RTP sequence number and duration is not modified for duplicate or retransmitted packets. Under network impediments, there is a possibility that all end event packets, including duplicate packets, are lost. In this scenario, the receiver may play the tone continuously. To resolve the end bit miss case, tone is not extended by more than three packet intervals.
7.8.2

RFC2833 Telephone-Event Negotiation

The gateway can negotiate the RFC2833 telephone events using a session description protocol (SDP) during the call setup phase. This negotiation makes use of dynamic payload type since the “telephone-event” does not have a static payload type defined in the RTP header. The sender may send an initial tone packet as soon as a tone is detected, or it may wait until a prenegotiated pack-
etization period has elapsed. The first RFC2833 RTP packet for a tone should have the marker bit set to 1. In the case of longer duration tones, the sender should generate multiple RFC2833 packets for the same tone instance. The RTP time stamp is updated for each new packet. Subsequent packets for the same tone should have the marker bit set to 0, and the RTP time stamp in each subsequent packet must equal the sum of the time stamp and the duration in the preceding packet. A final RTP packet is generated as soon as the end of the tone is detected without waiting for the latest packetization period to elapse. At the receiver, the RFC2833 packets are decoded and playout the event as received. To take care of lost packets, the events are played with a playout delay. The receiver should play the tone without change or a break when playing out contiguous RFC2833 events with marker bit zero.

Next post:

Previous post: