[sip-comm-dev] GSoC 09 : DTMF Reception


#1

Hi

I just finish the DTMF Reception .
DTMF Reception is quite imbricate with DTMF Generation.

DTMF Generation is done by doing packet transformation.
DTMF Reception is done by analyzing RTP packet via reverseTransformation.

To explain the process:
First there is the SDP detection. If the remote side accepts DTMF, we save
the payload type number.

Each time we saw an incoming packet with this payload type number, we do
some processing.

DTMF Reception works with a machine sate (with only 2 two states :wink: ) :
  - WAITING_RECEPTION
  - RECEPTION_STARTED

WAITING_RECEPTION become RECEPTION_STARTED when we saw a DTMF packet with
the RTP Marker set. The RTP Marker is used to flag the first DTMF packet of
the DTMF flow. Some implementation sends multiple DTMF packets with the RTP
Marker set. SIP Communicator will only look for 1 packet with the RTP Marker
set, the other will be ignored.

RECEPTION_STARTED become WAITING_RECEPTION when we saw one DTMF packet with
the End flag set. The other packets with the End flag set will be ignored.

Each time state changes, we fire a DtmfReceptionEvent. So there is one event
fire when DTMF starts and one event fire when DTMF stop.
The interface DtmfReceptionListener is defined in the package
service.protocol.event and could be implemented in plug-in.

DtmfReceptionEvent contains DTMF information as:
  - The DTMFTone pressed (1, 2, 3 ..., *, #, A, B, C, D)
  - The timestamp of the DTMF flow as indicated in the RTP packets
  - The duration of the DTMF flow as indicated in the RTP packets
  - The volume

I think that only the DTMFTone will be used, but I added the other DTMF
information, just in case...

I enclosed one screenshot of the log when receiving DTMF.

Cheers

Romain Philibert

Configuration_GUI.patch (8.67 KB)

DTMF_core.patch (119 KB)

transformers_refactored.patch (34.1 KB)


#2

Now it is working with the last revision of SVN

Configuration_GUI.patch (7.51 KB)

DTMF_core.patch (118 KB)

transformer_refactored.patch (34.1 KB)

···

2009/8/13 Romain <filirom1@gmail.com>

Hi

I just finish the DTMF Reception .
DTMF Reception is quite imbricate with DTMF Generation.

DTMF Generation is done by doing packet transformation.
DTMF Reception is done by analyzing RTP packet via reverseTransformation.

To explain the process:
First there is the SDP detection. If the remote side accepts DTMF, we save
the payload type number.

Each time we saw an incoming packet with this payload type number, we do
some processing.

DTMF Reception works with a machine sate (with only 2 two states :wink: ) :
  - WAITING_RECEPTION
  - RECEPTION_STARTED

WAITING_RECEPTION become RECEPTION_STARTED when we saw a DTMF packet with
the RTP Marker set. The RTP Marker is used to flag the first DTMF packet of
the DTMF flow. Some implementation sends multiple DTMF packets with the RTP
Marker set. SIP Communicator will only look for 1 packet with the RTP Marker
set, the other will be ignored.

RECEPTION_STARTED become WAITING_RECEPTION when we saw one DTMF packet with
the End flag set. The other packets with the End flag set will be ignored.

Each time state changes, we fire a DtmfReceptionEvent. So there is one
event fire when DTMF starts and one event fire when DTMF stop.
The interface DtmfReceptionListener is defined in the package
service.protocol.event and could be implemented in plug-in.

DtmfReceptionEvent contains DTMF information as:
  - The DTMFTone pressed (1, 2, 3 ..., *, #, A, B, C, D)
  - The timestamp of the DTMF flow as indicated in the RTP packets
  - The duration of the DTMF flow as indicated in the RTP packets
  - The volume

I think that only the DTMFTone will be used, but I added the other DTMF
information, just in case...

I enclosed one screenshot of the log when receiving DTMF.

Cheers

Romain Philibert