private void createContentTypeHeader() throws ParseException { setContentTypeHeader(headerFactory.createContentTypeHeader(getContentType(), getContentSubType())); }
private void sendServerError(String message, int errorCode) { try { Response response = getMessageFactory() .createResponse( Response.SERVER_INTERNAL_ERROR, this.getInviteRequest(), getHeaderFactory().createContentTypeHeader("text", "plain"), message.getBytes()); this.getServerTransaction().sendResponse(response); } catch (ParseException e) { log.severe(e.getMessage(), e); } catch (SipException e) { log.severe(e.getMessage(), e); } catch (InvalidArgumentException e) { log.severe(e.getMessage(), e); } releaseState(); }
vialist.add(via); MaxForwardsHeader mf = sipFactoryImpl.getHeaderFactory().createMaxForwardsHeader(80); ContentTypeHeader cth = sipFactoryImpl.getHeaderFactory().createContentTypeHeader("orphan", "orphan"); try { Request r = sipFactoryImpl.getMessageFactory().createRequest(uri, cseq.getMethod(), callid, cseq, fromHeader, toHeader, vialist, mf, cth, new byte[]{});
ContentTypeHeader contentType = sipHeaderFactory.createContentTypeHeader("text", "plain"); req.setContent(message, contentType);
private void finishSipSessionSetup(byte[] sdp) throws ParseException, SipException, InvalidArgumentException { ServerTransaction serverTransaction = (ServerTransaction) getServerTransactionACI() .getActivity(); ContentTypeHeader contentType = sipRaSbbInterface.getHeaderFactory() .createContentTypeHeader("application", "sdp"); String localAddress = sipRaSbbInterface.getListeningPoints()[0] .getIPAddress(); int localPort = sipRaSbbInterface.getListeningPoints()[0].getPort(); Address contactAddress = sipRaSbbInterface.getAddressFactory() .createAddress("sip:" + localAddress + ":" + localPort); ContactHeader contact = sipRaSbbInterface.getHeaderFactory() .createContactHeader(contactAddress); Response ok = sipRaSbbInterface.getMessageFactory().createResponse( Response.OK, serverTransaction.getRequest(), contentType, sdp); ok.setHeader(contact); serverTransaction.sendResponse(ok); }
private void finishSipSessionSetup(byte[] sdp) throws ParseException, SipException, InvalidArgumentException { ServerTransaction serverTransaction = (ServerTransaction) getServerTransactionACI() .getActivity(); ContentTypeHeader contentType = sipRaSbbInterface.getHeaderFactory() .createContentTypeHeader("application", "sdp"); String localAddress = sipRaSbbInterface.getListeningPoints()[0] .getIPAddress(); int localPort = sipRaSbbInterface.getListeningPoints()[0].getPort(); Address contactAddress = sipRaSbbInterface.getAddressFactory() .createAddress("sip:" + localAddress + ":" + localPort); ContactHeader contact = sipRaSbbInterface.getHeaderFactory() .createContactHeader(contactAddress); Response ok = sipRaSbbInterface.getMessageFactory().createResponse( Response.OK, serverTransaction.getRequest(), contentType, sdp); ok.setHeader(contact); serverTransaction.sendResponse(ok); }
ContentTypeHeader cth = this.headerFactory.createContentTypeHeader(subscriptionContent.getContentType().getType(), subscriptionContent.getContentType().getSubType()); request.setContent(subscriptionContent.getContent().getBytes(), cth);
viaHeaders.add(viaHeader); ContentTypeHeader contentTypeHeader = headerFactory .createContentTypeHeader("text", "plain"); CSeqHeader cSeqHeader = headerFactory.createCSeqHeader(2L, Request.MESSAGE);
contentType = headerFactory.createContentTypeHeader("application", "sdp"); } catch (ParseException ex) {
contentType = headerFactory.createContentTypeHeader("application", "sdp"); } catch (ParseException ex) {
contentType = getHeaderFactory().createContentTypeHeader("application", "sdp"); } catch (ParseException ex) {