SimpleVoipReceiver

Package: inet.applications.voip

SimpleVoipReceiver

simple module

Receives a VoIP stream generated by a SimpleVoipSender, and records statistics. The most important statistic is MOS (Mean Opinion Score, a value between 1 and 5, representing a human user's view of the voice quality), computed using the E Model defined in the ITU-T G.107 standard. The parameters starting with "emodel_" correspond to the parameters of the E model.

The E Model was originally developed within ETSI as a transmission planning tool, described in ETSI technical report ETR 250, and then standardized by the ITU as G.107. The objective of the model was to determine a quality rating that incorporated the "mouth to ear" characteristics of a speech path.

The playout delay, buffer space, the UDP port to listen on, and other input can be specified in module parameters.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
localPort int
emodelIe int 5

Equipment impairment factor

emodelBpl int 10

Packet-loss robustness factor

emodelA int 5

Advantage factor

emodelRo double 93.2

Basic signal-to-noise ratio

playoutDelay double 0s

initial delay for beginning playout after receiving the first packet

adaptivePlayoutDelay bool false

if true, adjust playoutDelay after each talkspurt

bufferSpace int 20

buffer size in packets

mosSpareTime double 1s

spare time before calculating MOS (after calculated playout time of last packet)

Properties

Name Value Description
display i=block/source

Gates

Name Direction Size Description
socketIn input
socketOut output

Signals

Name Type Unit
voipPacketDelay simtime_t
voipPlayoutLossRate double
voipPlayoutDelay simtime_t
voipTaildropLossRate double
voipPacketLossRate double
voipMosRate double

Statistics

Name Title Source Record Unit Interpolation Mode
mos VoIP MOS voipMosRate stats, vector MOS
playoutDelay VoIP Playout Delay voipPlayoutDelay stats, vector s
packetLossRate VoIP Packet Loss voipPacketLossRate stats, vector ratio
playoutLossRate VoIP Playout Loss Rate voipPlayoutLossRate stats, vector ratio
taildropLossRate VoIP Tail Drop Loss Rate voipTaildropLossRate stats, vector ratio
endToEndDelay VoIP Packet End-to-End Delay voipPacketDelay stats, vector s

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
omnetpp::cMessage0selfTalkspurtFinished

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
socketInPacket0 (UdpStatusInd::UDP_I_DATA)UdpDscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, L4PortInd, NetworkProtocolInd, SocketInd, TosInd, TransportProtocolInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
socketOutRequest1 (UdpCommandCode::UDP_C_BIND)UdpBindCommandUdpDispatchProtocolReq, SocketReq

Packet operations (observed)

chunkTypepacketAction
SimpleVoipPacketpeekAtFront

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTagIfAbsent
SocketIndfindTag
SocketReqaddTagIfAbsent

Source code

//
// Receives a VoIP stream generated by a ~SimpleVoipSender, and records statistics.
// The most important statistic is MOS (Mean Opinion Score, a value between 1
// and 5, representing a human user's view of the voice quality), computed using
// the E Model defined in the ITU-T G.107 standard. The parameters starting with
// "emodel_" correspond to the parameters of the E model.
//
// The E Model was originally developed within ETSI as a transmission planning tool,
// described in ETSI technical report ETR 250, and then standardized by the ITU as G.107.
// The objective of the model was to determine a quality rating that incorporated the
// "mouth to ear" characteristics of a speech path.
//
// The playout delay, buffer space, the UDP port to listen on, and other input
// can be specified in module parameters.
//
simple SimpleVoipReceiver like IApp
{
    parameters:
        int localPort;
        int emodelIe = default(5);        // Equipment impairment factor
        int emodelBpl = default(10);      // Packet-loss robustness factor
        int emodelA = default(5);         // Advantage factor
        double emodelRo = default(93.2);  // Basic signal-to-noise ratio

        double playoutDelay @unit(s) = default(0s);      // initial delay for beginning playout after receiving the first packet
        bool adaptivePlayoutDelay = default(false);      // if true, adjust playoutDelay after each talkspurt
        int bufferSpace = default(20);      // buffer size in packets
        double mosSpareTime @unit(s) = default(1s); // spare time before calculating MOS (after calculated playout time of last packet)

        @signal[voipPacketDelay](type="simtime_t");      // when receive a frame
        @signal[voipPacketLossRate](type="double");      // at end of talkspurt
        @signal[voipPlayoutDelay](type="simtime_t");    // at end of talkspurt
        @signal[voipPlayoutLossRate](type="double");    // at end of talkspurt
        @signal[voipMosRate](type="double");          // at end of talkspurt
        @signal[voipTaildropLossRate](type="double");   // at end of talkspurt
        @statistic[endToEndDelay](title="VoIP Packet End-to-End Delay"; unit="s"; source="voipPacketDelay"; record=stats,vector);
        @statistic[packetLossRate](title="VoIP Packet Loss"; unit="ratio"; source="voipPacketLossRate"; record=stats,vector);
        @statistic[playoutDelay](title="VoIP Playout Delay"; unit="s"; source="voipPlayoutDelay"; record=stats,vector);
        @statistic[playoutLossRate](title="VoIP Playout Loss Rate"; unit="ratio"; source="voipPlayoutLossRate"; record=stats,vector);
        @statistic[mos](title="VoIP MOS"; unit="MOS"; source="voipMosRate"; record=stats,vector);
        @statistic[taildropLossRate](title="VoIP Tail Drop Loss Rate"; unit="ratio"; source="voipTaildropLossRate"; record=stats,vector);

        @display("i=block/source");
    gates:
        input socketIn @labels(UdpControlInfo/up);
        output socketOut @labels(UdpControlInfo/down);
}

File: src/inet/applications/voip/SimpleVoipReceiver.ned