[sip-comm-dev] Gsoc 09 : Dtmf Report


#1

Hello

One week ago, I started my second GSoC project : DTMF, here is my progress
:

I tried to figure out how implementing DTMF in S-C.
To illustrate my explanation I added some UML, joint in this mail.

In the sequence diagram I saw that DialPanel (the GUI) call the function
sendDTMF in OperationSetDTMFSipImpl.
My idea was to create a new OperationSetDTMF4733SipImpl implementing
OperationSetDTMF.
The function sendDTMF will fire a new Event : Dtmf4733PressedEvent
containing the value of the pressed key. CallSessionImpl will Listen that
Event.
When it occures CallSessionImpl will use Transformers to tranform an audio
packet into dtmf packet.
When the user release the dtmf digit (Dtmf4733ReleasedEvent) the
transformation end.

The transformer part :
I found no way to add a transformerConnector during a call.
So I add the transformerConnector at initilization. During a call, the
transformerEngine will choose one PacketTransformer between
VoidPacketTransformer (does no transformation) and DtmfPacketTransformer
(change an audio packet into a dtmf packet)
The Dtmf packet is described in DTMFRawPacket.

I started implementing it, you can find the zip joint in this mail.

Now I need to figure that points :
  - where do I call addDtmfListener, removeDtmfListener and fireDtmfEvents
  - check that this conception work (finish the code). I have doubts on the
transformerEngine.
  - how to add options in the Configuration GUI and Wizard
  - write the real transformation code (DTMFRawPacket is empty).

Cheers

Romain

net.zip (35 KB)


#2

Hello
We had a long phone conversation today with Emil, S-C works well :slight_smile:

We made some changes in the previous conception :
1 - I used transformer which substitute audio packet for dtmf packet.
We don't want to loose audio packet so instead we will inject dtmf packet.

In order to inject packet without transformation, I will refactor the
impl.media.transform package.
The TransformConnector will be generalized as a simple Connector.
This connector will handle TransformInputStream or just simple InputStream
(same thing for OutputStream).
We will inject packet using OutputStream#write(buffer,offset,length)
Also, we will be able to create a Connector without a TranformEngine, and
add it later.

2 - I made some changes in CalSessionImpl
But the CallSessionImpl will change soon, so I will try to write my code as
a standalone entity.
I will create an Object DtmfControl that will contains every function
previously added in CallSessionImpl.

3 - I used several OperationSetDtmfSipImpl : one for DtmfRTP and one other
for DtmfSipInfo.
I will use only one OperationSetDtmfSipImpl which will dispatch to
DtmfSipInfoHandler or DtmfRtpHandler acording to the configuration.

4 - In SipInfoDtmf the duration of a digit is not handled.
With RtpDTmf the duration is needed. So I will change the method
sendDtmf(tone) in OperationSetDtmfSipImpl with startSendingDtmf(tone) and
stopSendingDtmf(tone). I will add a TimeOut if the Gui make some strange
things.

5 - I used Listener in order to communicate between the
OperationSetDtmfSipImpl and the CallSessionImpl. There is no need, I can
call directly the CallSessionImpl Object.

Cheers

Romain

···

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

Hello

One week ago, I started my second GSoC project : DTMF, here is my progress
:

I tried to figure out how implementing DTMF in S-C.
To illustrate my explanation I added some UML, joint in this mail.

In the sequence diagram I saw that DialPanel (the GUI) call the function
sendDTMF in OperationSetDTMFSipImpl.
My idea was to create a new OperationSetDTMF4733SipImpl implementing
OperationSetDTMF.
The function sendDTMF will fire a new Event : Dtmf4733PressedEvent
containing the value of the pressed key. CallSessionImpl will Listen that
Event.
When it occures CallSessionImpl will use Transformers to tranform an audio
packet into dtmf packet.
When the user release the dtmf digit (Dtmf4733ReleasedEvent) the
transformation end.

The transformer part :
I found no way to add a transformerConnector during a call.
So I add the transformerConnector at initilization. During a call, the
transformerEngine will choose one PacketTransformer between
VoidPacketTransformer (does no transformation) and DtmfPacketTransformer
(change an audio packet into a dtmf packet)
The Dtmf packet is described in DTMFRawPacket.

I started implementing it, you can find the zip joint in this mail.

Now I need to figure that points :
  - where do I call addDtmfListener, removeDtmfListener and fireDtmfEvents
  - check that this conception work (finish the code). I have doubts on the
transformerEngine.
  - how to add options in the Configuration GUI and Wizard
  - write the real transformation code (DTMFRawPacket is empty).

Cheers

Romain