Search in sources :

Example 21 with CallParticipant

use of com.sun.voip.CallParticipant in project Openfire by igniterealtime.

the class CallHandler method setMuteWhisperGroup.

/**
     * Mute or unmute member in a whisperGroup
     */
public static void setMuteWhisperGroup(String callId, boolean isMuted) {
    if (callId == null) {
        return;
    }
    synchronized (activeCalls) {
        for (int i = 0; i < activeCalls.size(); i++) {
            CallHandler call = (CallHandler) activeCalls.elementAt(i);
            CallParticipant cp = call.getCallParticipant();
            if (match(cp, callId)) {
                if (Logger.logLevel >= Logger.LOG_DETAIL) {
                    String s = "";
                    if (isMuted == false) {
                        s = "un";
                    }
                    Logger.println(cp.getCallId() + ":  " + s + "muted");
                }
                MemberReceiver memberReceiver = call.getMemberReceiver();
                if (memberReceiver != null) {
                    memberReceiver.setMuteWhisperGroup(isMuted);
                }
            }
        }
    }
}
Also used : CallParticipant(com.sun.voip.CallParticipant)

Example 22 with CallParticipant

use of com.sun.voip.CallParticipant in project Openfire by igniterealtime.

the class CallHandler method setCnThresh.

/*
     * Set cnThresh for the speech detector for a conference member.
     */
public static void setCnThresh(String callId, int cnThresh) {
    synchronized (activeCalls) {
        for (int i = 0; i < activeCalls.size(); i++) {
            CallHandler call = (CallHandler) activeCalls.elementAt(i);
            CallParticipant cp = call.getCallParticipant();
            if (match(cp, callId)) {
                MemberReceiver memberReceiver = call.getMemberReceiver();
                if (memberReceiver != null) {
                    memberReceiver.setCnThresh(cnThresh);
                }
            }
        }
    }
}
Also used : CallParticipant(com.sun.voip.CallParticipant)

Example 23 with CallParticipant

use of com.sun.voip.CallParticipant in project Openfire by igniterealtime.

the class CallHandler method setConferenceMuted.

/**
     * Mute or unmute a conference from a particular call.
     */
public static void setConferenceMuted(String callId, boolean isMuted) {
    if (callId == null) {
        return;
    }
    synchronized (activeCalls) {
        for (int i = 0; i < activeCalls.size(); i++) {
            CallHandler call = (CallHandler) activeCalls.elementAt(i);
            CallParticipant cp = call.getCallParticipant();
            if (match(cp, callId)) {
                if (Logger.logLevel >= Logger.LOG_DETAIL) {
                    String s = "";
                    if (isMuted == false) {
                        s = "un";
                    }
                    Logger.println(cp.getCallId() + ":  conference " + s + "muted");
                }
                ConferenceMember member = call.getMember();
                if (member != null) {
                    member.setConferenceMuted(isMuted);
                }
            }
        }
    }
}
Also used : CallParticipant(com.sun.voip.CallParticipant)

Example 24 with CallParticipant

use of com.sun.voip.CallParticipant in project Openfire by igniterealtime.

the class CallHandler method setPowerThresholdLimit.

/*
     * Set powerThresholdLimit for the speech detector for a member.
     */
public static void setPowerThresholdLimit(String callId, double powerThresholdLimit) {
    synchronized (activeCalls) {
        for (int i = 0; i < activeCalls.size(); i++) {
            CallHandler call = (CallHandler) activeCalls.elementAt(i);
            CallParticipant cp = call.getCallParticipant();
            if (match(cp, callId)) {
                MemberReceiver memberReceiver = call.getMemberReceiver();
                if (memberReceiver != null) {
                    memberReceiver.setPowerThresholdLimit(powerThresholdLimit);
                }
            }
        }
    }
}
Also used : CallParticipant(com.sun.voip.CallParticipant)

Example 25 with CallParticipant

use of com.sun.voip.CallParticipant in project Openfire by igniterealtime.

the class CallHandler method setDropPackets.

/*
     * force packets to be dropped for debugging.
     */
public static void setDropPackets(String callId, int dropPackets) {
    if (callId == null) {
        return;
    }
    synchronized (activeCalls) {
        for (int i = 0; i < activeCalls.size(); i++) {
            CallHandler call = (CallHandler) activeCalls.elementAt(i);
            CallParticipant cp = call.getCallParticipant();
            if (match(cp, callId)) {
                MemberReceiver memberReceiver = call.getMemberReceiver();
                if (memberReceiver != null) {
                    memberReceiver.setDropPackets(dropPackets);
                }
            }
        }
    }
}
Also used : CallParticipant(com.sun.voip.CallParticipant)

Aggregations

CallParticipant (com.sun.voip.CallParticipant)25 ParseException (java.text.ParseException)4 CallEvent (com.sun.voip.CallEvent)2 Vector (java.util.Vector)2 CallEventListener (com.sun.voip.CallEventListener)1 CallState (com.sun.voip.CallState)1 MediaInfo (com.sun.voip.MediaInfo)1 SdpInfo (com.sun.voip.SdpInfo)1 IOException (java.io.IOException)1 InetSocketAddress (java.net.InetSocketAddress)1 UnknownHostException (java.net.UnknownHostException)1 ArrayList (java.util.ArrayList)1 NoSuchElementException (java.util.NoSuchElementException)1