congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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