DTMF issue with jabber call

hi, DTMF tones not being processed by our handler when it comes from jabber but working fine with phone and skype. wireshark traffic shows the RTP events received to the machine where the Handler is listening but handler does not process. here is our handler code . can some one please help what went wrong .

class Handler extends BasicDataSink with BufferTransferHandler with InboundOutboundConnector with LogEmitter {
private var source: net.sf.fmj.media.protocol.rtp.DataSource = _

private var streams: Array[PushBufferStream] = _

private var MedLocator: MediaLocator = _

private var totalPktCount = 0

override def setOutputLocator(output: MediaLocator): Unit = this.MedLocator = output

override def getOutputLocator: MediaLocator = this.MedLocator

override def start(): Unit = source.start()

override def stop(): Unit = source.stop()

override def open(): Unit = connectAgent()

override def close(): Unit = cleanUpAgent()

override def getContentType: String = “”

override def getControls: Array[AnyRef] = Array.empty

override def getControl(controlType: String): AnyRef = new Object

override def setSource(dSrc: DataSource): Unit =
dSrc match {
case src: net.sf.fmj.media.protocol.rtp.DataSource =>
source = src
streams = source.getStreams

    // Register self as a listener for all streams from caller.
    streams.map(s => s.setTransferHandler(this))

override def transferData(stream: PushBufferStream): Unit = {
info(s"Transfer data start for stream:${stream.hashCode()}")
val buffer = new Buffer
val byteArray = buffer.getData.asInstanceOf[Array[Byte]]
val rtpPayload = getRTPPayload(buffer, byteArray)
info(s"RTP Payload length:${rtpPayload.length} And Format is: ${buffer.getFormat()}")
rtpPayload.length match {
case DTMF.PayloadLength if isTelePhonyEventFormat(buffer) =>
val DtmfInfo = parseDTMFInput(rtpPayload)
info(s"Sending DTMF Info to agent is endBit: ${DtmfInfo.endBit}")
case _ =>
botConfig match {
case _: EchoBotConfig =>
streamToVirtualAgent(rtpPayload, SilenceDetected)
case _ => streamToVirtualAgent(rtpPayload)



def isTelePhonyEventFormat(buffer: Buffer): Boolean = {
val isTelEvent = buffer.getFormat().toString.equals(TelephoneFormat)

def sendInputPacketToAgent(packetInfo: DTMFInput): Unit =

private def parseDTMFInput(payload: Array[Byte]): DTMFInput = {
val Dtmf = DTMF.parse(payload)
totalPktCount = totalPktCount + 1
val eventId = DTMF.DtmfSpecialKeyMap
DTMFInput(eventId, Dtmf.isEnd)

def getRTPPayload(buffer: Buffer, byteArray: Array[Byte]): Array[Byte] =
.take(buffer.getLength) // take the raw body only up to length