Hi Yulian :
According to the previous topic that I have asked about how to handle Media Format:97 in SDP response, after editing the code as you suggested, I have informed the test result that Media server could detect DTMF in RTP payload type telephone-event format97 very well.
In fact, in previous test, DTMF signal appear in both in-band DTMF tone and out-of-band RFC2833 in payload type telephone-event 97.
A couple of day ago, I just realized that when there is no in-band DTMF tone, DTMF only appear as out-of-band RFC2833 in payload type telephone-event 97, Media server could not detect any DTMF digit coming.
But for the case of telephone-event 101 in the same scenario, no in-band DTMF tone, DTMF only appear as out-of-band RFC2833 in payload type telephone-event 101, Media server could detect and send notify event perfectly.
I have attached image of captured 2 RTP stream, the first one containing DTMF in telephone-event 97, the other one containing DTMF in telephone-event 101.
Hi Yulian :
I have attached
captured .pcap files from 2
session of test calls : one has
telephone-event 97 , another has telephone-event 101.
so you can see media format in SDP and Payload type in RTP.
Before making these 2 test calls, I have add logging lines as follow:
RTPInput.java
public void write(RtpPacket event) {
//obtain payload
event.getPyalod(data, 0);
logger.debug("RTPInput data length is " + data.length);
if(data.length==0)
return;
}
RTPDataChannel.java
if (format != null && format.getFormat().matches(dtmf)){
logger.debug("RTPDataChannel format match dtmf");
input.write(rtpPacket);
}
Server log from these 2 tests call are attached.
You can see that
In session call of event 101, processed pass to Dtmf Intput and provide these lines:
[RTPInput] … RTPInput data length is 4
[RTPDataChannel] … RTPDataChannel format match dtmf
But in session call of event 97
no these 2 lines, instead there is
if (f.sampleRate != this.sampleRate) return false;And instead of
set :
if (this.sampleRate!=0 && f.sampleRate!=0 && f.sampleRate != this.sampleRate) return false;
Instead of
if (f.sampleSize != this.sampleSize) return false;
set:
if (this.sampleSize!=-1 && f.sampleSize!=-1 && f.sampleSize != this.sampleSize) return false;
if (f.channels != this.channels) return false;
set:
if (this.channels!=-1 && f.channels!=-1 && f.channels != this.channels) return false;