[sip-comm-dev] GSoc 09 : DTMF progress report



Today is a good day for DTMF.
It is working using Transformers.
But there is some refactoring to do :slight_smile:

I created a new transformer called DTMF.

There is a dtmfTransformerEngine, I add it in the list of Transformer
in order to allow both DTMF and ZRTP transformation.
In CallSessionImpl :
    private void initializeRtpManager(RTPManager rtpManager,
                                      SessionAddress bindAddress)
            if (rtpManager.equals(audioRtpManager))
                dtmfEngine = new DtmfTransformEngine();


When the user press DTMF digits,
CallSession#startSendingDtmf(digit) is called.
Packet transformation start !

When the user release DTMF digit,
CallSession#stopSendingDtmf() is called.
Packet transformation stop.

A timeout is implemented in case there is is a bug when the user press
the digit, but no release event happen.

If the user release the digit too quickly, some digits could be
missing. I implemented a functioon called quickStopAvoidance which
take care of avoiding this.

In the transformers, only RTP outcoming packet are transformed.

So transfomation happens in DtmfRTPPacketTransformer, in transform function.

There is several different DTMF packets to send in DTMF. To do it I
used a state machine with 4 states :

- START_SENDING add RTP marker flas
- STOP_SENDING freeze the timestamp and the duration

The class DtmfRawPacket is creating a Raw DTMF Packet, that will be
send via the DtmfRTPPacketTransformer

I added every patch I created from now that are important for DTMF :
- DTMF.patch is used to add every DTMF functions
- DTMF_CallSessionImpl is a patch that need to be aplied after
transformer_new patch. It is for DTMF integration in CallSessionImpl.
- transformer_new is used for refactoring Transformers. We could now
use a list of engine.
- dispatcher is creating a new way of sending DTMF using OperationSetDTMF
- Configuration_GUI for the user to control how SC send DTMF (Sip INFO or RTP)



transformer_new.patch (44.3 KB)

DTMF.patch (31.3 KB)

DTMF_CallSessionImpl.patch (2.24 KB)

dispatcher.patch (38.6 KB)

Configuration_GUI.patch (8.67 KB)