congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SipSession.createRequest
Code IndexAdd Tabnine to your IDE (free)

How to use
createRequest
method
in
javax.servlet.sip.SipSession

Best Java code snippets using javax.servlet.sip.SipSession.createRequest (Showing top 3 results out of 315)

origin: org.mobicents.servlet.sip/restcomm.media

private void terminate() {
  final SipSession sipSession = initialInvite.getSession();
  final SipServletRequest bye = sipSession.createRequest("BYE");
  try {
    bye.send();
  } catch(final IOException exception) {
    logger.error(exception);
  }
  server.destroyMediaSession(session);
}
origin: org.mobicents.servlet.sip.examples/shopping-demo-business-jsr309

public void onEvent(PlayerEvent event) {
  try {
    logger.info("ENDING CALL ");
    Player player = event.getSource();
    MediaGroup mg = player.getContainer();
    if (event.isSuccessful()
        && (PlayerEvent.PLAY_COMPLETED == event.getEventType())) {
      MediaSession session =(MediaSession)sipSession.getAttribute("mediaSession");
      session.release();
      Thread.sleep(1500);
      
      SipServletRequest byeRequest = sipSession.createRequest("BYE");				
      byeRequest.send();
      
    }
  }
  catch (Exception e) {
    logger.error("Error", e);
  }
}
origin: org.mobicents.servlet.sip/sip-servlets-impl

final MobicentsSipSession sessionImpl = (MobicentsSipSession) session;
final SipServletRequestImpl newSubsequentServletRequest = (SipServletRequestImpl) session.createRequest(origRequest.getMethod());
javax.servlet.sipSipSessioncreateRequest

Javadoc

Returns a new request object. This method is used by user agents only. Note that this method must not be used to create ACK or CANCEL requests. User agents create ACKs by calling SipServletResponse.createAck() and CANCELs are created by calling SipServletRequest.createCancel().

Popular methods of SipSession

  • getAttribute
    Returns the object bound with the specified name in this session, or null if no object is bound unde
  • setAttribute
    Binds an object to this session, using the name specified. If an object of the same name is already
  • getApplicationSession
    Returns the application session with which this SipSession is associated.
  • getServletContext
    Returns the ServletContext to which this session belongs. By definition, there is one ServletContext
  • getState
    Returns the current SIP dialog state, which is one of INITIAL, EARLY, CONFIRMED, or TERMINATED. Thes
  • invalidate
    Invalidates this session and unbinds any objects bound to it. A session cannot be invalidate if it i
  • isValid
    Returns true if this SipSession is valid, false otherwise. The SipSession can be invalidated by call
  • setHandler
    Sets the handler for this SipSession. This method can be used to explicitly specify the name of the

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 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