[sip-comm-dev] GSOC 09 : Dtmf progress report

Romain filirom1 at gmail.com
Fri Jul 10 17:06:23 CEST 2009


Here is my week report, Dtmf on RTP is building quickly :

 1 - Transformer refactoring :

I refactor TransformConnector as a less specialized class : Connector.
Now a Connector can do transformation or NOT. (Transformer are used in

A connector is create like this :
connector = new Connector(bindAddress);

If you want this connector to do packetTransformation you just add a
TransformEngine like this :
ZRTPTransformEngine engine = new ZRTPTransformEngine();

With the connector you can inject packet (in progress, not finished)
connector.getDataOutputStream().write(buffer, offset, length);

Here is where i have problems :
When I call this function I have no error, but no DTMF packet are sent.
I did some debug :
int l = connector.getDataOutputStream().write(buffer, offset, length);
System.out.println("send DTMF "+dtmfTone+" len = "+length+" sent : "+l);
System.out.println("dataSocket "+connector.getDataSocket().toString());

This is what I see :
send DTMF 0 len = 16 sent : 16
dataSocket java.net.DatagramSocket at 107c615
localAdress /
inetAddress null

InetAddress is null. I think this is why nothing is sent.

An other thing, actually I am generating DtmfPacket, and the SequenceNumber
and Timestamp field are 0xFFFF....
I need those values. So I think that I will clone an audio packet, transform
it in a dtmf packet, and inject it using the connector. In so doing I keep
the timestamp and Sequence number.

 2 - Configuration :

Now there is an option in the advanced SIP configuration called "Send DTMF
Tone on RTP: RFC4733".
You can see it in the screenshot

Now I need to get the configuration value in the media package. It looks

 3 - Communication between OperationSetDTMF and CallSessionImpl :

OperationSetDTMF know when digits are pressed, CallSessionImpl has a
connector where I can inject packet, so I need communication between this
In order to do it I added a function in the CallSession interface :

And now I am able to call this function in OperationSetDTMF like this :
CallSipImpl call = (CallSipImpl) callParticipant.getCall();
CallSession cs = call.getMediaCallSession();

I don't know if it's the good way to do it. If not tell me, I will correct

 4 - OperationSetDtmf like a dispatcher :
Because there is two ways to send Dtmf packets (RTP and SIP INFO),
OperationSetDTMF dispatch the sendDtmf(tone) call to DtmfRtpHandler or to

You can find the sources in the zip.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jitsi.org/pipermail/dev/attachments/20090710/6463cab1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: net.zip
Type: application/zip
Size: 567273 bytes
Desc: not available
URL: <http://lists.jitsi.org/pipermail/dev/attachments/20090710/6463cab1/attachment.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configuration.png
Type: image/png
Size: 96075 bytes
Desc: not available
URL: <http://lists.jitsi.org/pipermail/dev/attachments/20090710/6463cab1/attachment.png>
-------------- next part --------------
To unsubscribe, e-mail: dev-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: dev-help at sip-communicator.dev.java.net

More information about the dev mailing list