Package com.sun.voip

Examples of com.sun.voip.CallParticipant


        return;
          }

    CallSetup setup = new CallSetup();
 
    CallParticipant cp = new CallParticipant();

    setup.cp = cp;

    setup.externalOutgoingCall = true;

    try {
        setup.bridgeInfo = vm.getVoiceBridge();
     } catch (IOException e) {
        logger.warning("Unable to get voice bridge for call " + cp + ":  "
      + e.getMessage());
        return;
    }

    cp.setPhoneNumber(listing.getContactNumber());
    cp.setName(listing.getContactName());
    cp.setCallId(externalCallID);
    cp.setConferenceId(parameters.conferenceId);
    cp.setVoiceDetection(true);
    cp.setDtmfDetection(true);
    cp.setVoiceDetectionWhileMuted(true);
    cp.setHandleSessionProgress(true);

    try {
                    externalCall = vm.createCall(externalCallID, setup);
     } catch (IOException e) {
        logger.warning("Unable to create call " + cp + ":  "
View Full Code Here


        private int readPointer;
        private int writePointer;
       
        public EchoBuffer(ConferenceManager conference) throws IOException {
            super (new CallParticipant(), null);
           
            this.conference = conference;
           
            int sampleSize = 8;
            //if (conference.getMediaInfo().getPayload() == RtpPacket.PCM_PAYLOAD) {
View Full Code Here

  VoiceManager vm = AppContext.getManager(VoiceManager.class);
 
  CallSetup setup = new CallSetup();
  setup.incomingCall = true;

  setup.cp = new CallParticipant()
  setup.cp.setCallId(callId);
  setup.cp.setConferenceId(vm.getVoiceManagerParameters().conferenceId);

  String callInfo = status.getCallInfo();
View Full Code Here

                placeCall(clientID, new PlaceCallRequestMessage(msg.getPresenceInfo(),
        msg.getPhoneNumber(), x, y, z, orientation, true));
                return;
            }

            CallParticipant cp = call.getSetup().cp;

            if (msg.getCancel() == true) {
                try {
                    call.transfer(cp, true);
                } catch (IOException e) {
                    logger.warning("Unable to cancel call transfer:  " + e.getMessage());
                }
                return;
            }

            if (msg.getPhoneNumber().equals(cp.getPhoneNumber())) {
    sender.send(clientID, new CallMigrateMessage(msg.getPresenceInfo().getCallID(), true));
                return;
            }

            cp.setPhoneNumber(msg.getPhoneNumber());

            setJoinConfirmation(cp);

            try {
                call.transfer(cp, false);
View Full Code Here

            return;
        }

        CallSetup setup = new CallSetup();

        CallParticipant cp = new CallParticipant();

        setup.cp = cp;

        String callID = info.getCallID();

        if (callID == null) {
            logger.fine("Can't place call to " + msg.getSipURL() + ".  No cell for " + callID);
            return;
        }

        VoiceManager vm = AppContext.getManager(VoiceManager.class);

  Call call = vm.getCall(callID);

  if (call != null) {
      call.getSetup().ended = true// make it look like it ended already
  }
 
  ScalableHashMap<String, ManagedReference<AudioCallStatusListener>> callIDListenerMap = callIDListenerMapRef.get();

  ManagedReference<AudioCallStatusListener> audioCallStatusListenerRef = callIDListenerMap.remove(callID);

  if (audioCallStatusListenerRef != null) {
      audioCallStatusListenerRef.get().done();
  }

        AudioCallStatusListener audioCallStatusListener = new AudioCallStatusListener(clientID, callID);

  audioCallStatusListenerRef = AppContext.getDataManager().createReference(audioCallStatusListener);

  callIDListenerMap.put(callID, audioCallStatusListenerRef);

        cp.setCallId(callID);
        cp.setName(info.getUserID().getUsername());
        cp.setPhoneNumber(msg.getSipURL());

        setJoinConfirmation(cp);

  cp.setCallEstablishedTreatment(JOIN_SOUND);
        cp.setConferenceId(vm.getVoiceManagerParameters().conferenceId);
        cp.setVoiceDetection(true);
        cp.setDtmfDetection(true);
        cp.setVoiceDetectionWhileMuted(true);
        cp.setHandleSessionProgress(true);

        sessionCallIDMapRef.get().put(clientID.getID(), callID);

        try {
            setupCall(callID, setup, msg.getX(), msg.getY(), msg.getZ(), msg.getDirection());
View Full Code Here

  CallSetup setup = new CallSetup();
 
  setup.externalOutgoingCall = true;

  CallParticipant cp = new CallParticipant();

  setup.cp = cp;

  try {
      setup.bridgeInfo = vm.getVoiceBridge();
  } catch (IOException e) {
      logger.warning("Unable to get voice bridge for call " + cp + ":  "
    + e.getMessage());
            sender.send(clientID, new VoiceChatCallEndedMessage(
          group, callee, "No voice bridge available!"));
      return;
  }

  AudioGroup audioGroup = vm.getAudioGroup(group);

  if (audioGroup == null) {
      logger.warning("No audio group " + group);
            sender.send(clientID, new VoiceChatCallEndedMessage(
          group, callee, "Audio group not found!"));
      return;
  }

  cp.setPhoneNumber(message.getPhoneNumber());
  cp.setName(callee.getUsernameAlias());
  cp.setCallId(externalCallID);
  cp.setConferenceId(vm.getVoiceManagerParameters().conferenceId);
  cp.setVoiceDetection(true);
  cp.setDtmfDetection(true);
  cp.setVoiceDetectionWhileMuted(true);
  cp.setHandleSessionProgress(true);

  new VoiceChatPhoneStatusListener(group, callee, externalCallID, clientID);
 
  Call externalCall;
View Full Code Here

TOP

Related Classes of com.sun.voip.CallParticipant

Copyright © 2018 www.massapicom. 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.