How to mute PJSUA call in android

MA
Munir Ahmad
Tue, Jun 21, 2016 3:33 PM

I am developing VOIP app in android using PJSUA, here I want to mute callI am reading doc related to PJSUA and I find method that is used for such purpose but could not implement in android APP, please anyone who can help me to set call in mute modeHere I provide the detail from PJSUA docs,    pj_status_t pjsua_conf_adjust_rx_level (pjsua_conf_port_id slot,
float level )  Adjust the signal level to be received from the specified port (to the bridge) by making it louder or quieter.Parameters slot The conference bridge slot number. level Signal level adjustment. Value 1.0 means no level adjustment, while value 0 means to mute the port. Returns PJ_SUCCESS on success, or the appropriate error code.I want solution like that to hold call in android using PJSUApublic void holdCall() {
CallOpParam prm = new CallOpParam(true);
try {
currentCall.setHold(prm);
} catch (Exception e) {
e.printStackTrace();
}
}
Regard
Munir Ahmad

I am developing VOIP app in android using PJSUA, here I want to mute callI am reading doc related to PJSUA and I find method that is used for such purpose but could not implement in android APP, please anyone who can help me to set call in mute modeHere I provide the detail from PJSUA docs, pj_status_t pjsua_conf_adjust_rx_level (pjsua_conf_port_id slot, float level ) Adjust the signal level to be received from the specified port (to the bridge) by making it louder or quieter.Parameters slot The conference bridge slot number. level Signal level adjustment. Value 1.0 means no level adjustment, while value 0 means to mute the port. Returns PJ_SUCCESS on success, or the appropriate error code.I want solution like that to hold call in android using PJSUApublic void holdCall() { CallOpParam prm = new CallOpParam(true); try { currentCall.setHold(prm); } catch (Exception e) { e.printStackTrace(); } } Regard Munir Ahmad
MA
Munir Ahmad
Fri, Jun 24, 2016 4:40 PM

Any one help me how to mute a call, is that code used to mute  a call
AudioMedia media = new AudioMediaPlayer();media.adjustRxLevel(0f);
I have tried many option but could not mute a call
and other option is that
CallMediaInfo callMediaInfo = new CallMediaInfo();callMediaInfo.setStatus(pjsua_call_media_status.PJSUA_CALL_MEDIA_LOCAL_HOLD);currentCall.getInfo().getMedia().add(callMediaInfo);
third one option is that
AudioMedia audioMedia; CallInfo ci = HomeActivity.currentCall.getInfo(); if (isMute) { for (int i = 0; i < ci.getMedia().size(); i++) { ci.getMedia() audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i); audioMedia.adjustRxLevel(0f); } } else { for (int i = 0; i < ci.getMedia().size(); i++) { audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i); audioMedia.adjustRxLevel(1f); } }
Regard
Munir Ahmad

I am developing VOIP app in android using PJSUA, here I want to mute callI am reading doc related to PJSUA and I find method that is used for such purpose but could not implement in android APP, please anyone who can help me to set call in mute modeHere I provide the detail from PJSUA docs,    pj_status_t pjsua_conf_adjust_rx_level (pjsua_conf_port_id slot,
float level )  Adjust the signal level to be received from the specified port (to the bridge) by making it louder or quieter.Parameters slot The conference bridge slot number. level Signal level adjustment. Value 1.0 means no level adjustment, while value 0 means to mute the port. Returns PJ_SUCCESS on success, or the appropriate error code.I want solution like that to hold call in android using PJSUApublic void holdCall() {
CallOpParam prm = new CallOpParam(true);
try {
currentCall.setHold(prm);
} catch (Exception e) {
e.printStackTrace();
}
}
Regard
Munir Ahmad


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Any one help me how to mute a call, is that code used to mute a call AudioMedia media = new AudioMediaPlayer();media.adjustRxLevel(0f); I have tried many option but could not mute a call and other option is that CallMediaInfo callMediaInfo = new CallMediaInfo();callMediaInfo.setStatus(pjsua_call_media_status.PJSUA_CALL_MEDIA_LOCAL_HOLD);currentCall.getInfo().getMedia().add(callMediaInfo); third one option is that AudioMedia audioMedia; CallInfo ci = HomeActivity.currentCall.getInfo(); if (isMute) { for (int i = 0; i < ci.getMedia().size(); i++) { ci.getMedia() audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i); audioMedia.adjustRxLevel(0f); } } else { for (int i = 0; i < ci.getMedia().size(); i++) { audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i); audioMedia.adjustRxLevel(1f); } } Regard Munir Ahmad I am developing VOIP app in android using PJSUA, here I want to mute callI am reading doc related to PJSUA and I find method that is used for such purpose but could not implement in android APP, please anyone who can help me to set call in mute modeHere I provide the detail from PJSUA docs, pj_status_t pjsua_conf_adjust_rx_level (pjsua_conf_port_id slot, float level ) Adjust the signal level to be received from the specified port (to the bridge) by making it louder or quieter.Parameters slot The conference bridge slot number. level Signal level adjustment. Value 1.0 means no level adjustment, while value 0 means to mute the port. Returns PJ_SUCCESS on success, or the appropriate error code.I want solution like that to hold call in android using PJSUApublic void holdCall() { CallOpParam prm = new CallOpParam(true); try { currentCall.setHold(prm); } catch (Exception e) { e.printStackTrace(); } } Regard Munir Ahmad _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
MB
Michael Barthold
Mon, Jun 27, 2016 4:46 AM

Use AudioDevManager with .getCaptureMedia().stopTransmit() // startTransmit() for microphone muting and .setOutputRoute(LOUDSPEAKER // EARPIECE) for speaker on/off.

Kind regards,

mit freundlichen Grüßen | kind regards

Michael Barthold
Senior Software Architect

UNICOPE GmbH | Wien
T +43 5 06216-5285

[Leitbetriebe]

Von: pjsip [mailto:pjsip-bounces@lists.pjsip.org] Im Auftrag von Munir Ahmad
Gesendet: Freitag, 24. Juni 2016 18:40
An: pjsip@lists.pjsip.org
Betreff: [pjsip] How to mute PJSUA call in android

Any one help me how to mute a call,
is that code used to mute  a call

AudioMedia media = new AudioMediaPlayer();
media.adjustRxLevel(0f);

I have tried many option but could not mute a call

and other option is that

CallMediaInfo callMediaInfo = new CallMediaInfo();
callMediaInfo.setStatus(pjsua_call_media_status.PJSUA_CALL_MEDIA_LOCAL_HOLD);
currentCall.getInfo().getMedia().add(callMediaInfo);

third one option is that

                  AudioMedia audioMedia;
                               CallInfo ci = HomeActivity.currentCall.getInfo();
                               if (isMute) {
                                           for (int i = 0; i < ci.getMedia().size(); i++) {
                                                       ci.getMedia()
                                                       audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i);
                                                       audioMedia.adjustRxLevel(0f);
                                           }
                               } else {

                                           for (int i = 0; i < ci.getMedia().size(); i++) {
                                                       audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i);
                                                       audioMedia.adjustRxLevel(1f);
                                           }
                               }

Regard

Munir Ahmad


I am developing VOIP app in android using PJSUA, here I want to mute call
I am reading doc related to PJSUA and I find method that is used for such purpose but could not implement in android APP, please anyone who can help me to set call in mute mode
Here I provide the detail from PJSUA docs,

 pj_status_t pjsua_conf_adjust_rx_level (pjsua_conf_port_id slot,

float level )

Adjust the signal level to be received from the specified port (to the bridge) by making it louder or quieter.
Parameters slot The conference bridge slot number. level Signal level adjustment. Value 1.0 means no level adjustment, while value 0 means to mute the port. Returns PJ_SUCCESS on success, or the appropriate error code.
I want solution like that to hold call in android using PJSUA

public void holdCall() {

CallOpParam prm = new CallOpParam(true);

try {

    currentCall.setHold(prm);

} catch (Exception e) {

    e.printStackTrace();

}

}

Regard

Munir Ahmad

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.orgmailto:pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Use AudioDevManager with .getCaptureMedia().stopTransmit() // startTransmit() for microphone muting and .setOutputRoute(LOUDSPEAKER // EARPIECE) for speaker on/off. Kind regards, mit freundlichen Grüßen | kind regards Michael Barthold Senior Software Architect ---------------------------------------------- UNICOPE GmbH | Wien T +43 5 06216-5285 ---------------------------------------------- [Leitbetriebe] Von: pjsip [mailto:pjsip-bounces@lists.pjsip.org] Im Auftrag von Munir Ahmad Gesendet: Freitag, 24. Juni 2016 18:40 An: pjsip@lists.pjsip.org Betreff: [pjsip] How to mute PJSUA call in android Any one help me how to mute a call, is that code used to mute a call AudioMedia media = new AudioMediaPlayer(); media.adjustRxLevel(0f); I have tried many option but could not mute a call and other option is that CallMediaInfo callMediaInfo = new CallMediaInfo(); callMediaInfo.setStatus(pjsua_call_media_status.PJSUA_CALL_MEDIA_LOCAL_HOLD); currentCall.getInfo().getMedia().add(callMediaInfo); third one option is that AudioMedia audioMedia; CallInfo ci = HomeActivity.currentCall.getInfo(); if (isMute) { for (int i = 0; i < ci.getMedia().size(); i++) { ci.getMedia() audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i); audioMedia.adjustRxLevel(0f); } } else { for (int i = 0; i < ci.getMedia().size(); i++) { audioMedia = (AudioMedia) HomeActivity.currentCall.getMedia(i); audioMedia.adjustRxLevel(1f); } } Regard Munir Ahmad ________________________________ I am developing VOIP app in android using PJSUA, here I want to mute call I am reading doc related to PJSUA and I find method that is used for such purpose but could not implement in android APP, please anyone who can help me to set call in mute mode Here I provide the detail from PJSUA docs, pj_status_t pjsua_conf_adjust_rx_level (pjsua_conf_port_id slot, float level ) Adjust the signal level to be received from the specified port (to the bridge) by making it louder or quieter. Parameters slot The conference bridge slot number. level Signal level adjustment. Value 1.0 means no level adjustment, while value 0 means to mute the port. Returns PJ_SUCCESS on success, or the appropriate error code. I want solution like that to hold call in android using PJSUA public void holdCall() { CallOpParam prm = new CallOpParam(true); try { currentCall.setHold(prm); } catch (Exception e) { e.printStackTrace(); } } Regard Munir Ahmad _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org<mailto:pjsip@lists.pjsip.org> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org