org.mobicents.media.server.impl.resource.dtmf
Class InbandDetectorImpl
java.lang.Object
org.mobicents.media.server.impl.BaseComponent
org.mobicents.media.server.impl.AbstractSink
org.mobicents.media.server.impl.resource.dtmf.DtmfBuffer
org.mobicents.media.server.impl.resource.dtmf.InbandDetectorImpl
- All Implemented Interfaces:
- java.io.Serializable, org.mobicents.media.Component, org.mobicents.media.MediaSink, org.mobicents.media.server.spi.resource.DtmfDetector
public class InbandDetectorImpl
- extends DtmfBuffer
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
|
Field Summary |
static java.lang.String[][] |
events
|
| Fields inherited from interface org.mobicents.media.server.spi.resource.DtmfDetector |
DETECTOR_DURATION, DETECTOR_MASK, DETECTOR_SILENCE, TONE |
| Fields inherited from interface org.mobicents.media.Component |
AUDIO_PLAYER, AUDIO_RECORDER, DTMF_DETECTOR, DTMF_GENERATOR |
|
Constructor Summary |
InbandDetectorImpl(java.lang.String name)
Creates new instance of Detector. |
|
Method Summary |
void |
connect(org.mobicents.media.MediaSource otherParty)
(Non Java-doc). |
int |
getDuration()
|
org.mobicents.media.Format[] |
getFormats()
|
void |
init()
After creating instance of InbandDetector, set the Tone Duratin if its
not default = 50ms and the initialize it |
boolean |
isAcceptable(org.mobicents.media.Format format)
|
void |
receive(org.mobicents.media.Buffer buffer)
(Non Java-doc). |
void |
setDuration(int duartion)
|
void |
start()
(Non Java-doc). |
void |
stop()
(Non Java-doc). |
| Methods inherited from class org.mobicents.media.server.impl.BaseComponent |
addListener, getConnection, getEndpoint, getId, getName, getResourceType, removeListener, sendEvent, setConnection, setEndpoint, setResourceType, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.mobicents.media.MediaSink |
disconnect |
| Methods inherited from interface org.mobicents.media.Component |
addListener, getConnection, getEndpoint, getId, getName, getResourceType, removeListener, setConnection, setEndpoint, setResourceType |
events
public static final java.lang.String[][] events
InbandDetectorImpl
public InbandDetectorImpl(java.lang.String name)
- Creates new instance of Detector.
init
public void init()
- After creating instance of InbandDetector, set the Tone Duratin if its
not default = 50ms and the initialize it
start
public void start()
- (Non Java-doc).
- See Also:
org.mobicents.media.server.spi.MediaSink#start().
stop
public void stop()
- (Non Java-doc).
- See Also:
org.mobicents.media.server.spi.MediaSink#stop().
setDuration
public void setDuration(int duartion)
getDuration
public int getDuration()
receive
public void receive(org.mobicents.media.Buffer buffer)
- (Non Java-doc).
- See Also:
org.mobicents.media.protocol.BufferTransferHandler.transferData().
getFormats
public org.mobicents.media.Format[] getFormats()
isAcceptable
public boolean isAcceptable(org.mobicents.media.Format format)
connect
public void connect(org.mobicents.media.MediaSource otherParty)
- Description copied from class:
AbstractSink
- (Non Java-doc).
- Specified by:
connect in interface org.mobicents.media.MediaSink- Overrides:
connect in class AbstractSink
- See Also:
org.mobicents.MediaSink#connect(MediaStream).
Copyright © 2009. All Rights Reserved.