Package org.jdesktop.wonderland.client.softphone

Examples of org.jdesktop.wonderland.client.softphone.SoftphoneControlImpl$JavaVersion


    }
   
    public void placeCall(CallListing listing) {
  WonderlandSession session = phoneCell.getCellCache().getSession();

  SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();

  listing.setSoftphoneCallID(sc.getCallID());

        PlaceCallMessage msg = new PlaceCallMessage(phoneCell.getCellID(),
      listing);

  LOGGER.fine("Sending place call message " + phoneCell.getCellID() + " "
      + " softphoneCallID " + sc.getCallID() + " " + listing);

  synchronized (phoneForm) {
            mostRecentCallListing = listing;     

            channelComp.send(msg);   
View Full Code Here


}//GEN-LAST:event_nameTextFieldActionPerformed

private void volumeSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_volumeSliderStateChanged
    float volume = volumeConverter.getVolume(volumeSlider.getValue());

    SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();

    channelComp.send(new OrbSetVolumeMessage(orbCell.getCellID(), sc.getCallID(), volume));
}//GEN-LAST:event_volumeSliderStateChanged
View Full Code Here

                    });

            audioQualityMenu.add(mitem);
            audioQualityButtons.add(mitem);

            SoftphoneControlImpl softphoneControlImpl =
                    SoftphoneControlImpl.getInstance();

            if (quality.equals(softphoneControlImpl.getAudioQuality())) {
                mitem.setSelected(true);
            }
        }

        audioQualityMenu.setEnabled(true);
View Full Code Here

        synchronized (volumeChangeMap) {
            volumeChangeMap.put(info, volume);
        }

        SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();

        session.send(client, new AudioVolumeMessage(info.getCellID(), sc.getCallID(),
                info.getCallID(), volume, true));
    }
View Full Code Here

        logger.fine("[AudioManagerClient] " +
                "Sending message to server to get voice bridge...");

        logger.warning("Sending message to server to get voice bridge... ");

        SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();
        sendMessage(new GetVoiceBridgeRequestMessage(sc.getCallID()));
    }
View Full Code Here

        SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();
        sendMessage(new GetVoiceBridgeRequestMessage(sc.getCallID()));
    }

    public void showSoftphone() {
        SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();
        sc.setVisible(!sc.isVisible());
    }
View Full Code Here

    public void setMute(boolean isMuted) {
        if (this.isMuted == isMuted) {
      return;
  }

        SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();

        String callID = sc.getCallID();

        if (callID == null) {
            // if there is no call id, we still want the UI to be correct,
            // so we fake a call to softphoneMuted() as if the softphone
            // was reporting a mute
            softphoneMuted(isMuted);
            return;
        }

        sc.mute(isMuted);

        sendMessage(new MuteCallRequestMessage(callID, isMuted));
    }
View Full Code Here

    public void softphoneConnected(boolean connected) {
        if (connected == false) {
      softphoneProblem("Softphone Disconnected");
  } else if (isMute()) {
            // sync up mute state
            SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();

            String callID = sc.getCallID();
            if (callID != null) {
                sc.mute(true);
                sendMessage(new MuteCallRequestMessage(callID, true));
            }
        }
    }
View Full Code Here

            sendMessage(new PlaceCallRequestMessage(presenceInfo, phoneNumber,
                    Double.parseDouble(x), Double.parseDouble(y), Double.parseDouble(z), 90., false));
            return;
        }

        SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();

        /*
         * The voice bridge info is a String of values separated by ":".
         * The numbers indicate the index in tokens[].
         *
         *     0      1      2                   3                 4
         * <bridgeId>::<privateHostName>:<privateControlPort>:<privateSipPort>
         *       5                   6                 7
         *       :<publicHostName>:<publicControlPort>:<publicSipPort>
         */
        String tokens[] = msg.getBridgeInfo().split(":");

        String registrarAddress = tokens[5] + ";sip-stun:";

        registrarAddress += tokens[7];

        localAddress = null;

        try {
            InetAddress ia = NetworkAddress.getPrivateLocalAddress(
                    "server:" + tokens[5] + ":" + tokens[7] + ":10000");

            localAddress = ia.getHostAddress();
        } catch (UnknownHostException e) {
            logger.warning(e.getMessage());

            logger.warning("The client is unable to connect to the bridge " +
                    "public address. Trying InetAddress.getLocalHost().");

            try {
                //InetAddress ia = NetworkAddress.getPrivateLocalAddress(
                //        "server:" + tokens[2] + ":" + tokens[4] + ":10000");

                //localAddress = ia.getHostAddress();
    localAddress = InetAddress.getLocalHost().getHostAddress();

    if (localAddress.startsWith("127")) {
        logger.warning("local address is " + localAddress
      + ".  This can only work if the server is running locally.");
    }
            } catch (UnknownHostException ee) {
                logger.warning(ee.getMessage());
            }
        }

        if (localAddress != null) {
            try {
                String sipURL = sc.startSoftphone(presenceInfo.getUserID().getUsername(),
        registrarAddress, 10, localAddress);

                logger.fine("Starting softphone:  " + presenceInfo);

                if (sipURL != null) {
View Full Code Here

    public VuMeterMiniPanel(final AudioManagerClient client) {
        this.client = client;

        initComponents();

        SoftphoneControlImpl sc = SoftphoneControlImpl.getInstance();
        sc.addSoftphoneListener(this);

        micMutedIcon = new ImageIcon(getClass().getResource(
                "/org/jdesktop/wonderland/modules/audiomanager/client/" +
                "resources/UserListMicMuteOn24x24.png"));
        micUnmutedIcon = new ImageIcon(getClass().getResource(
                "/org/jdesktop/wonderland/modules/audiomanager/client/" +
                "resources/UserListMicMuteOff24x24.png"));
        micDisconnectedIcon = new ImageIcon(getClass().getResource(
                "/org/jdesktop/wonderland/modules/audiomanager/client/" +
                "resources/UserListMicMuteOn24x24.png"));

        // set initial state
        try {
            softphoneConnected(sc.isRunning() && sc.isConnected());
            softphoneMuted(sc.isMuted());
        } catch (IOException ioe) {
            LOGGER.log(Level.WARNING, "Error getting softphone state", ioe);
        }

View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.softphone.SoftphoneControlImpl$JavaVersion

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.