No RTP or SIP DTMF with libjitsi

372 views Asked by At

I'm trying to add some DTMF to an AudioMediaStreamImpl (from libjitsi). I can do with the IN_BAND method, but that's not optimal because with compression some problems can arrive.

But I can't do a working version of RTP_DTMF or SIP_INFO_DTMF, just nothing happens.

I have tried to use the standard method like :

public void sendDtmf(final DTMFTone dtmfTone) {
    // Same code with DTMFMEthod.SIP_INFO_DTMF for second test.
    mediaStream.startSendingDTMF(dtmfTone, DTMFMethod.RTP_DTMF, 100, 101, 100);

    try {
        Thread.sleep(1000L);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }

    mediaStream.stopSendingDTMF(DTMFMethod.RTP_DTMF);
}

I have tried to stop the rtp flux before, after, to not use the stopSendingDTMF but nothing is working.

I use libjitsi version 563.

If I can't get a solution with the AudioMediaStreamImpl, I will create my own SIP_INFO_DTMF, but I have heard the best method for DTMF is the RTP version.

1

There are 1 answers

0
Manticore On BEST ANSWER

I have finally found how to archive my objectif.

The startSendingDtmf start a new thread who has the task to send the DTMF. And he throw an exception because TELEPHONE_EVENT are not supported.

I need to add more information in the SDP transaction and add dynamic payload to my AudioStreamImplementation.

The RFC 2198 / 4733 define how to add the media attribute.