Class DtmfPacket
Class for representing a DTMF event packet RTP payload. See Section 2.3 of RFC 4733.
Inherited Members
Namespace: SipLib.Rtp
Assembly: SipLib.dll
Syntax
public class DtmfPacket
Constructors
| Edit this page View SourceDtmfPacket()
Constructor
Declaration
public DtmfPacket()
Fields
| Edit this page View SourceDEFAULT_VOLUME_DBM
Default DTMF tone volume in dBm.
Declaration
public const int DEFAULT_VOLUME_DBM = -13
Field Value
Type | Description |
---|---|
int |
DTMF_PACKET_LENGTH
Length of a DTMF packet
Declaration
public const int DTMF_PACKET_LENGTH = 4
Field Value
Type | Description |
---|---|
int |
Properties
| Edit this page View SourceDuration
Gets or sets the Duration of the DTMF event. The Duration is in RTP packet Timestamp units.
Declaration
public ushort Duration { get; set; }
Property Value
Type | Description |
---|---|
ushort |
Eflag
Gets or sets the E flag value. The E flag is 1 (true) if the packet indicates the end of a DTMF event.
Declaration
public bool Eflag { get; set; }
Property Value
Type | Description |
---|---|
bool |
Event
Gets or sets the DTMF event value.
Declaration
public DtmfEventEnum Event { get; set; }
Property Value
Type | Description |
---|---|
DtmfEventEnum |
Volume
Gets or sets the DTMF tone volume in dBm. The allowable range is from 0 - -63 dBm. This value defaults to DEFAULT_VOLUME_DBM, which is -13 dBm.
Declaration
public int Volume { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceGetPacketBytes()
Gets the packet bytes.
Declaration
public byte[] GetPacketBytes()
Returns
Type | Description |
---|---|
byte[] | Returns a byte array of length DTMF_PACKET_LENGTH |
Parse(byte[], int)
Parses a byte array into a DtmfPacket object
Declaration
public static DtmfPacket Parse(byte[] packet, int Offset)
Parameters
Type | Name | Description |
---|---|---|
byte[] | packet | Input byte array |
int | Offset | Index in the input byte array that contains the DtmfPacket bytes. packet.Length - Offset must be greater than or equal to DTMF_PACKET_LENGTH |
Returns
Type | Description |
---|---|
DtmfPacket | Returns a new DtmfPacket object |