org.mobicents.media.server.impl.resource.dtmf
Class DetectorImpl
java.lang.Object
org.mobicents.media.server.impl.BaseComponent
org.mobicents.media.server.impl.AbstractSink
org.mobicents.media.server.impl.resource.dtmf.DetectorImpl
- All Implemented Interfaces:
- Serializable, Component, MediaSink, DtmfDetector
public class DetectorImpl
- extends AbstractSink
- implements DtmfDetector
Implements inband DTMF detector.
Inband means that DTMF is transmitted within the audio of the phone
conversation, i.e. it is audible to the conversation partners. Therefore only
uncompressed codecs like g711 alaw or ulaw can carry inband DTMF reliably.
Female voice are known to once in a while trigger the recognition of a DTMF
tone. For analog lines inband is the only possible means to transmit DTMF.
Though Inband DTMF detection may work for other codecs like SPEEX, GSM, G729
as DtmfDetector is using DSP in front of InbandDetector there is no guarantee
that it will always work. In future MMS may not have DSP in front of
InbandDetector and hence Inband detection for codecs like SPEEX, GSM, G729
may completely stop
- Author:
- yulian oifa, amit bhayani
- See Also:
- Serialized Form
| Methods inherited from class org.mobicents.media.server.impl.AbstractSink |
failed, getBytesReceived, getPacketsReceived, isStarted, perform, report, reset, start, started, stop, stopped |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
events
public static final String[][] events
DetectorImpl
public DetectorImpl(String name,
org.mobicents.media.server.scheduler.Scheduler scheduler)
- Creates new instance of Detector.
getCompoundOutput
public CompoundOutput getCompoundOutput()
activate
public void activate()
- Specified by:
activate in interface Component- Specified by:
activate in interface DtmfDetector- Specified by:
activate in class AbstractSink
deactivate
public void deactivate()
- Specified by:
deactivate in interface Component- Specified by:
deactivate in interface DtmfDetector- Specified by:
deactivate in class AbstractSink
setDuration
public void setDuration(int duartion)
getDuration
public int getDuration()
setVolume
public void setVolume(int level)
- Specified by:
setVolume in interface DtmfDetector
setLasy
public void setLasy(boolean isLazy)
getVolume
public int getVolume()
- Specified by:
getVolume in interface DtmfDetector
onMediaTransfer
public void onMediaTransfer(Frame buffer)
throws IOException
- (Non Java-doc).
- Specified by:
onMediaTransfer in class AbstractSink
- Throws:
IOException- See Also:
org.mobicents.media.protocol.BufferTransferHandler.transferData().
getNativeFormats
public Formats getNativeFormats()
getMask
public String getMask()
setMask
public void setMask(String mask)
setInterdigitInterval
public void setInterdigitInterval(int interval)
- Specified by:
setInterdigitInterval in interface DtmfDetector
getInterdigitInterval
public int getInterdigitInterval()
- Specified by:
getInterdigitInterval in interface DtmfDetector
fireEvent
protected void fireEvent(String tone)
fireEvent
protected void fireEvent(DtmfEventImpl evt)
fireEvent
protected void fireEvent(Collection<DtmfEventImpl> evts)
flushBuffer
public void flushBuffer()
- Specified by:
flushBuffer in interface DtmfDetector
clearBuffer
public void clearBuffer()
addListener
public void addListener(DtmfDetectorListener listener)
throws TooManyListenersException
- (Non Java-doc.)
- Specified by:
addListener in interface DtmfDetector
- Throws:
TooManyListenersException- See Also:
org.mobicents.media.Component#addListener(NotificationListener).
removeListener
public void removeListener(DtmfDetectorListener listener)
- Specified by:
removeListener in interface DtmfDetector
clearAllListeners
public void clearAllListeners()
- Specified by:
clearAllListeners in interface DtmfDetector
clearDigits
public void clearDigits()
- Specified by:
clearDigits in interface DtmfDetector
Copyright © 2012 TeleStax, Inc.. All Rights Reserved.