org.mobicents.media.server.impl.resource.dtmf
Class GeneratorImpl

java.lang.Object
  extended by org.mobicents.media.server.impl.BaseComponent
      extended by org.mobicents.media.server.impl.AbstractSource
          extended by org.mobicents.media.server.impl.resource.dtmf.GeneratorImpl
All Implemented Interfaces:
Serializable, Component, MediaSource, DtmfGenerator

public class GeneratorImpl
extends AbstractSource
implements DtmfGenerator

InbandGenerator generates Inband DTMF Tone only for uncompressed LINEAR codec. After creating instance of InbandGenerator, it needs to be initialized so that all the Tones are generated and kept ready for transmission once start is called. By default the Tone duration is 80ms. This is suited for Tone Detector who has Tone duration of greater than 40 and less than 80ms. For Tone Detector who's Tone duration is set greater than 80ms may fail to detect Tone generated by InbandGenerator(with duration 80ms). In that case increase the duration here too.

Author:
yulian oifa, amit bhayani
See Also:
Serialized Form

Field Summary
static String[][] events
           
 
Fields inherited from class org.mobicents.media.server.impl.AbstractSource
mediaSink
 
Constructor Summary
GeneratorImpl(String name, org.mobicents.media.server.scheduler.Scheduler scheduler)
           
 
Method Summary
 void activate()
           
 void deactivate()
           
 Frame evolve(long timestamp)
           
 CompoundInput getCompoundInput()
           
 String getDigit()
           
 Formats getNativeFormats()
           
 int getToneDuration()
           
 int getVolume()
           
 void setDigit(String digit)
           
 void setToneDuration(int duration)
           
 void setVolume(int volume)
           
 
Methods inherited from class org.mobicents.media.server.impl.AbstractSource
completed, connect, disconnect, failed, getBytesTransmitted, getDuration, getMediaTime, getPacketsTransmitted, isConnected, isStarted, report, reset, setDuration, setInitialDelay, setMediaTime, start, started, stop, stopped, wakeup
 
Methods inherited from class org.mobicents.media.server.impl.BaseComponent
clearEndpoint, getEndpoint, getId, getName, setEndpoint
 
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.resource.DtmfGenerator
start, stop
 
Methods inherited from interface org.mobicents.media.MediaSource
getBytesTransmitted, getDuration, getMediaTime, getPacketsTransmitted, isConnected, isStarted, setDuration, setInitialDelay, setMediaTime
 
Methods inherited from interface org.mobicents.media.Component
clearEndpoint, getEndpoint, getId, getName, reset, setEndpoint
 

Field Detail

events

public static final String[][] events
Constructor Detail

GeneratorImpl

public GeneratorImpl(String name,
                     org.mobicents.media.server.scheduler.Scheduler scheduler)
Method Detail

getCompoundInput

public CompoundInput getCompoundInput()

activate

public void activate()
Specified by:
activate in interface Component
Overrides:
activate in class AbstractSource

setDigit

public void setDigit(String digit)
Specified by:
setDigit in interface DtmfGenerator

getDigit

public String getDigit()
Specified by:
getDigit in interface DtmfGenerator

setToneDuration

public void setToneDuration(int duration)
Specified by:
setToneDuration in interface DtmfGenerator

getToneDuration

public int getToneDuration()
Specified by:
getToneDuration in interface DtmfGenerator

getVolume

public int getVolume()
Specified by:
getVolume in interface DtmfGenerator

setVolume

public void setVolume(int volume)
Specified by:
setVolume in interface DtmfGenerator

getNativeFormats

public Formats getNativeFormats()

evolve

public Frame evolve(long timestamp)
Specified by:
evolve in class AbstractSource

deactivate

public void deactivate()
Specified by:
deactivate in interface Component
Overrides:
deactivate in class AbstractSource


Copyright © 2012 TeleStax, Inc.. All Rights Reserved.