congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
JainMgcpStack
Code IndexAdd Tabnine to your IDE (free)

How to use
JainMgcpStack
in
jain.protocol.ip.mgcp

Best Java code snippets using jain.protocol.ip.mgcp.JainMgcpStack (Showing top 8 results out of 315)

origin: org.mobicents.media.client/jsr-309-driver

public void shutdown() {
  if (scheduler != null) {
    scheduler.shutdownNow();
  }
  scheduler = null;
  if (mgcpProvider != null) {
    try {
      mgcpProvider.getJainMgcpStack().deleteProvider(mgcpProvider);
    } catch (DeleteProviderException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    mgcpProvider = null;
    mgcpStack = null;
  }
  factory = null;
}
origin: org.mobicents.jsr309/mobicents-jsr309-impl

mgcpProvider = mgcpStack.createProvider();
origin: org.mobicents.media.client/jsr-309-driver

mgcpProvider = mgcpStack.createProvider();
origin: org.mobicents.servlet.sip/restcomm.media

@Override public synchronized void start() throws RuntimeException {
 assertState(SHUTDOWN);
 // Initialize the call agent.
 callAgent = new NotifiedEntity("restcomm", localIp.getHostAddress(), localPort);
 // Initialize the media gateway domain name.
 domainName = new StringBuilder().append(remoteIp.getHostAddress()).append(":")
   .append(remotePort).toString();
 // Start the MGCP stack.
 try {
  mgcpStack = new JainMgcpStackImpl(localIp, localPort);
  mgcpProvider = mgcpStack.createProvider();
  mgcpProvider.addJainMgcpListener(this);
 } catch(final Exception exception) {
  throw new RuntimeException(exception);
 }
 requestListeners = new ArrayList<JainMgcpListener>();
 requestListenersLock = new Object();
 responseListeners = new HashMap<Integer, JainMgcpListener>();
 requestId = new RangeCounter(1, Integer.MAX_VALUE);
 transactionId = new RangeCounter(1, Integer.MAX_VALUE);
 mediaSessionId = new RangeCounter(1, Integer.MAX_VALUE);
 mediaSessions = new HashMap<Integer, MgcpSession>();
 setState(RUNNING);
}
origin: org.mobicents.jsr309/mobicents-jsr309-impl

public void shutdown() {
  if (scheduler != null) {
    scheduler.shutdownNow();
  }
  scheduler = null;
  if (mgcpProvider != null) {
    try {
      mgcpProvider.getJainMgcpStack().deleteProvider(mgcpProvider);
    } catch (DeleteProviderException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    mgcpProvider = null;
    mgcpStack = null;
  }
  factory = null;
}
origin: org.restcomm/restcomm-connect.mrb

/**
 * @param ip
 * @param port
 * @throws UnknownHostException
 */
protected void bindMGCPStack(String ip, int port) throws UnknownHostException {
  mgcpStack = new JainMgcpStackImpl(DNSUtils.getByName(ip), port);
  try {
    mgcpProvider = mgcpStack.createProvider();
  } catch (final CreateProviderException exception) {
    logger.error(exception, "Could not create a JAIN MGCP provider.");
  }
}
origin: org.restcomm/restcomm-connect.mgcp

private void powerOff(final Object message) {
  // Clean up the JAIN MGCP provider.
  try {
    provider.removeJainMgcpListener(this);
    stack.deleteProvider(provider);
  } catch (final DeleteProviderException exception) {
    logger.error(exception, "Could not clean up the JAIN MGCP provider.");
  }
  // Make sure we don't leave anything behind.
  name = null;
  localIp = null;
  localPort = 0;
  remoteIp = null;
  remotePort = 0;
  useNat = false;
  externalIp = null;
  timeout = 0;
  provider = null;
  stack = null;
  agent = null;
  domain = null;
  responseListeners.clear();
  responseListeners = null;
  requestIdPool = null;
  sessionIdPool = null;
  transactionIdPool = null;
}
origin: org.mobicents.servlet.sip/restcomm.media

 @Override public synchronized void shutdown() {
  assertState(RUNNING);
  // Stop all the media sessions.
  final List<MgcpSession> sessions = new ArrayList<MgcpSession>(mediaSessions.values());
  for(final MgcpSession session : sessions) {
   session.release();
  }
  sessions.clear();
  // Shutdown the MGCP stack.
  try { 
   mgcpProvider.removeJainMgcpListener(this);
   mgcpStack.deleteProvider(mgcpProvider);
  } catch(final DeleteProviderException exception) {
   // There is nothing we can do except log the exception.
   LOGGER.error(exception);
  }
  callAgent = null;
  domainName = null;
  mgcpProvider = null;
  mgcpStack = null;
  requestListeners = null;
  requestListenersLock = null;
  responseListeners = null;
  requestId = null;
  transactionId = null;
  mediaSessionId = null;
  mediaSessions = null;
  setState(SHUTDOWN);
 }
}
jain.protocol.ip.mgcpJainMgcpStack

Most used methods

  • createProvider
  • deleteProvider

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • JFrame (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now