Examples of SessionDescription


Examples of javax.sdp.SessionDescription

        Response sipResponse = messageFactory.createResponse(response);
        System.out.println("Parsed SIP Response is :\n" + sipResponse);
        contentBytes = sipResponse.getRawContent();
        contentString = new String(contentBytes);
        SdpFactory sdpFactory = SdpFactory.getInstance();
        SessionDescription sd = sdpFactory.createSessionDescription(contentString);
        System.out.println("Parsed Content is :\n" + sd.toString());

    }
View Full Code Here

Examples of net.sourceforge.peers.sdp.SessionDescription

    public void handleOptions(SipRequest sipRequest) {
        SipResponse sipResponse = buildGenericResponse(sipRequest,
                RFC3261.CODE_200_OK, RFC3261.REASON_200_OK);
        try {
            SessionDescription sessionDescription =
                sdpManager.createSessionDescription(null);
            sipResponse.setBody(sessionDescription.toString().getBytes());
        } catch (IOException e) {
            logger.error(e.getMessage(), e);
        }
        SipHeaders sipHeaders = sipResponse.getSipHeaders();
        sipHeaders.add(new SipHeaderFieldName(RFC3261.HDR_CONTENT_TYPE),
View Full Code Here

Examples of net.sourceforge.peers.sdp.SessionDescription

        // TODO 3xx
       
        // TODO 486 or 600
       
        byte[] offerBytes = sipRequest.getBody();
        SessionDescription answer;
        try {
            if (offerBytes != null && RFC3261.CONTENT_TYPE_SDP.equals(
                    contentType.getValue())) {
                // create response in 200
                try {
                    SessionDescription offer = sdpManager.parse(offerBytes);
                    answer = sdpManager.createSessionDescription(offer);
                    mediaDestination = sdpManager.getMediaDestination(offer);
                } catch (NoCodecException e) {
                    answer = sdpManager.createSessionDescription(null);
                }
View Full Code Here

Examples of net.sourceforge.peers.sdp.SessionDescription

        }
        ClientTransaction clientTransaction = transactionManager
                .createClientTransaction(sipRequest, inetAddress,
                    port, transport, null, this);
        try {
            SessionDescription sessionDescription =
                sdpManager.createSessionDescription(null);
            sipRequest.setBody(sessionDescription.toString().getBytes());
        } catch (IOException e) {
            logger.error(e.getMessage(), e);
        }
        requestHeaders.add(new SipHeaderFieldName(RFC3261.HDR_CONTENT_TYPE),
                new SipHeaderFieldValue(RFC3261.CONTENT_TYPE_SDP));
View Full Code Here

Examples of net.sourceforge.peers.sdp.SessionDescription

        if (sipListener != null) {
            sipListener.calleePickup(sipResponse);
        }

        //added for media
        SessionDescription sessionDescription =
            sdpManager.parse(sipResponse.getBody());
        try {
            mediaDestination = sdpManager.getMediaDestination(sessionDescription);
        } catch (NoCodecException e) {
            logger.error(e.getMessage(), e);
View Full Code Here

Examples of org.wso2.carbon.rulecep.commons.descriptions.rule.SessionDescription

        RuleSetDescription ruleSetDescription = ruleMediatorDescription.getRuleSetDescription();
        ruleEngine = ruleServerManager.createRuleEngine(classLoader);
        if (ruleSetDescription.getRuleSource() != null) {
            String bindURI = ruleEngine.addRuleSet(ruleSetDescription);
            SessionDescription sessionDescription = ruleMediatorDescription.getSessionDescription();
            sessionDescription.setRuleSetURI(bindURI);
        } else {
            registryKey = ruleSetDescription.getKey();
        }

        inputManager = inputOutputAdaptersService.createInputManager(
View Full Code Here

Examples of org.wso2.carbon.rulecep.commons.descriptions.rule.SessionDescription

            if (synLog.isTraceTraceEnabled()) {
                synLog.traceTrace("Message : " + synCtx.getEnvelope());
            }
        }

        SessionDescription sessionDescription = ruleMediatorDescription.getSessionDescription();

        if (registryKey != null) {
            ReturnValue returnValue = interceptor.extract(registryKey, synCtx, null);
            if (returnValue.getValue() == null) {
                handleException("RuleSet cannot be found for the registry key : " + registryKey,
View Full Code Here

Examples of org.wso2.carbon.rulecep.commons.descriptions.rule.SessionDescription

        RuleMediatorDescription ruleMediatorDescription = new RuleMediatorDescription();
        QName sessionQName = qNameFactory.createQName(CommonsConstants.ELE_SESSION, tagQName);
        OMElement sessionElement = configurationXML.getFirstChildWithName(sessionQName);

        if (sessionElement != null) {
            SessionDescription description =
                    SessionDescriptionFactory.create(sessionElement, xPathFactory);
            ruleMediatorDescription.setSessionDescription(description);
        }

        QName executionSetQName = qNameFactory.createQName(CommonsConstants.ELE_RULESET,
View Full Code Here

Examples of org.wso2.carbon.rulecep.commons.descriptions.rule.SessionDescription

                createSessionDescription(ruleServiceEngine));
    }

    private SessionDescription createSessionDescription(RuleServiceEngine ruleServiceEngine) {

        SessionDescription sessionDescription = new SessionDescription();
        AxisService axisService = ruleServiceEngine.getAxisService();
        if (isStateless(axisService.getScope())) {
            sessionDescription.setSessionType(SessionDescription.STATELESS_SESSION);
        }
        sessionDescription.setRuleSetURI(ruleServiceEngine.getRulesetURI());
        return sessionDescription;
    }
View Full Code Here

Examples of org.wso2.carbon.rulecep.commons.descriptions.rule.SessionDescription

            RuleSetDescriptionSerializer.serialize(ruleSetDescription, xPathSerializer,
                    ruleSetElement, configurationExtensionSerializer);
            ruleElement.addChild(ruleSetElement);
        }

        SessionDescription sessionDescription = ruleMediatorDescription.getSessionDescription();
        if (sessionDescription != null) {
            OMElement sessionElement =
                    SessionDescriptionSerializer.serialize(sessionDescription, xPathSerializer,
                            ruleElement.getQName());
            ruleElement.addChild(sessionElement);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.