@Override public synchronized void dial() throws CallException { assertState(QUEUED); // Try to negotiate media with a packet relay end point. try { relayEndpoint = session.getPacketRelayEndpoint(); userAgentConnection = session.createConnection(relayEndpoint); userAgentConnection.addObserver(this); userAgentConnection.connect(ConnectionMode.SendRecv); block(1); if(!MgcpConnection.HALF_OPEN.equals(userAgentConnection.getState())) { throw new Exception(mmsTimedOutException()); } final byte[] offer = patchMedia(server.getExternalAddress(), userAgentConnection.getLocalDescriptor().toString().getBytes()); initialInvite.setContent(offer, "application/sdp"); initialInvite.send(); } catch(final Exception exception) { cleanup(); setState(FAILED); fireStatusChanged(); final StringBuilder buffer = new StringBuilder(); buffer.append("There was an error while dialing out from "); buffer.append(initialInvite.getFrom().toString()).append(" to "); buffer.append(initialInvite.getTo().toString()); throw new CallException(exception); } }
sipServletRequest.setContent(sdpOffer, "application/sdp"); MediaGroup mg = mediaSession.createMediaGroup(MediaGroup.PLAYER_SIGNALDETECTOR); sipServletRequest.getSession().setAttribute("mediaGroup", mg);
sipServletRequest.setContent(sdpOffer, "application/sdp");
outRequest.setContent(offer, request.getContentType()); } else { outRequest.setContent(sdp, request.getContentType());
sipServletRequest.setContent(sdpOffer, "application/sdp"); MediaGroup mg = mediaSession.createMediaGroup(MediaGroup.PLAYER_SIGNALDETECTOR); sipServletRequest.getSession().setAttribute("mediaGroup", mg);
outRequest.setContent(offer, request.getContentType()); } else { outRequest.setContent(sdp, request.getContentType());