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:
- Oleg Kulikov, amit bhayani
- See Also:
- Serialized Form
| Methods inherited from class org.mobicents.media.server.impl.AbstractSink |
connect, disconnect, failed, getBytesReceived, getPacketsReceived, isConnected, isStarted, report, reset, started, stop, stopped, wakeup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mobicents.media.server.spi.dtmf.DtmfDetector |
stop |
events
public static final String[][] events
DetectorImpl
public DetectorImpl(String name,
org.mobicents.media.server.scheduler.Scheduler scheduler)
- Creates new instance of Detector.
start
public void start()
- Specified by:
start in interface MediaSink- Specified by:
start in interface DtmfDetector- Overrides:
start 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()
getInterface
public <T> T getInterface(Class<T> interfaceType)
- Specified by:
getInterface in interface Component- Overrides:
getInterface in class AbstractSink
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
clearDigits
public void clearDigits()
- Specified by:
clearDigits in interface DtmfDetector
Copyright © 2012 TeleStax, Inc.. All Rights Reserved.