public class CSCall
extends java.lang.Object
CSEvents
Constructor and Description |
---|
CSCall() |
Modifier and Type | Method and Description |
---|---|
void |
answerPstnCall(java.lang.String remoteid,
java.lang.String callid,
java.lang.String callcontextmessage,
CSLocation location)
answers an incoming pstn call.
|
void |
answerVideoCall(java.lang.String remoteid,
java.lang.String callid,
CSSurfaceViewRenderer localRender,
CSSurfaceViewRenderer remoteRender,
java.lang.String callcontextmessage,
CSLocation location)
answers an incoming video call.
|
void |
answerVoiceCall(java.lang.String remoteid,
java.lang.String callid,
java.lang.String callcontextmessage,
CSLocation location)
answers an incoming audio call.
|
boolean |
enableCallStats(boolean enable)
enableCallStats.
|
boolean |
enableDefaultlocalVideoPreviewUX(boolean enable)
enableDefaultlocalVideoPreviewUX.Set to true or false to enable or disable local preview dragging around the screen,to toggle Local and remote video between Renderer Layouts and to set layout params dynamically in video call
|
boolean |
enableSpeaker(java.lang.String callid,
boolean enablespeaker)
enable Or Disable Speaker In a Call.
|
void |
endPstnCall(java.lang.String number,
java.lang.String callid)
ends pstn call.
|
void |
endVideoCall(java.lang.String remoteid,
java.lang.String callid,
int endStatus,
java.lang.String endReason)
ends video call.
|
void |
endVoiceCall(java.lang.String remoteid,
java.lang.String callid,
int endStatus,
java.lang.String endReason)
ends audio call.
|
boolean |
holdAVCall(java.lang.String remoteid,
java.lang.String callid,
boolean toggle)
hold or unhold either audio call or video call.On success response audio/video gets muted at both caller and calle hence UI for mute functionality should be shown accordingly.Also there are no restrictions on functionality of
muteAudio muteVideo when call is on hold,Also after unhold, the previous state of mute in the call will be recovered. |
boolean |
holdPstnCall(java.lang.String callid,
boolean toggle)
hold or unhold pstn call.
|
static boolean |
isCallAnswerable(java.lang.String callid)
gets Incoming Call Status i.e whether its answerable or not.
|
boolean |
isCallStatsEnabled()
isCallStatsEnabled.
|
boolean |
muteAudio(java.lang.String callid,
boolean mute)
mute or unmute Audio in a call
|
boolean |
muteVideo(java.lang.String callid,
boolean mute)
mute or unmute video in video call.
|
boolean |
recordCall(java.lang.String callid)
Record the call.
|
boolean |
sendDtmfInPstnCall(java.lang.String digit,
java.lang.String callid)
send Dtmf In Pstn Call
|
boolean |
sendVideoCallRinging(java.lang.String remoteid,
java.lang.String callid,
boolean iscallwaiting)
send call Ringing for Video Call
|
boolean |
sendVoiceCallRinging(java.lang.String remoteid,
java.lang.String callid,
boolean iscallwaiting)
send call Ringing for Voice Call
|
boolean |
setIceTransportsType(CSConstants.IceTransportsType type)
setIceTransportsType
|
boolean |
setPreferredAudioCodec(CSConstants.PreferredAudioCodec audioCodec)
setPreferredAudioCodec.
|
boolean |
setPreferredVideoCodec(CSConstants.PreferredVideoCodec videocodec)
setPreferredVideoCodec.
|
java.lang.String |
startPstnCall(java.lang.String number,
java.lang.String fromNumber,
java.lang.String callcontextmessage,
CSLocation location)
initiates an pstn call.
|
java.lang.String |
startVideoCall(java.lang.String remoteid,
CSSurfaceViewRenderer localRender,
CSSurfaceViewRenderer remoteRender,
CSConstants.CALLRECORD callrecord,
java.lang.String callcontextmessage,
CSLocation location)
initiates an outgoing video call.
|
java.lang.String |
startVoiceCall(java.lang.String remoteid,
CSConstants.CALLRECORD callrecord,
java.lang.String callcontextmessage,
CSLocation location)
initiates an outgoing audio call.
|
boolean |
toggleCamera(java.lang.String callid)
toggle Camera In a Call
|
boolean |
toggleVideocallViews(java.lang.String callid)
toggleVideocallViews.toggle Local and remote video between Renderer Layouts.If call is in holded state this api do nothing and returns false
|
public java.lang.String startVoiceCall(java.lang.String remoteid, CSConstants.CALLRECORD callrecord, java.lang.String callcontextmessage, CSLocation location)
remoteid
- of callecallrecord
- whether to record call or not or record as per settings.callcontextmessage
- Call context messagelocation
- Location of the call
CSCALL_CALLANSWERED
CSCALL_CALLENDED
CSCALL_NOANSWER
CSCALL_NOMEDIA
CSCALL_RINGING
CSCALL_MEDIACONNECTED
CSCALL_MEDIADISCONNECTED
CSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
CSCLIENT_GSM_CALL_INPROGRESS
CSCLIENT_PERMISSION_NEEDED
CSCALL_RECORDING_STATUS
public void answerVoiceCall(java.lang.String remoteid, java.lang.String callid, java.lang.String callcontextmessage, CSLocation location)
remoteid
- of callecallid
- incoming call callidcallcontextmessage
- Call context messagelocation
- Location of the call
CSCallReceiver
CSCALL_CALLENDED
CSCALL_NOANSWER
CSCALL_NOMEDIA
CSCALL_RINGING
CSCALL_MEDIACONNECTED
CSCALL_MEDIADISCONNECTED
CSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
CSCLIENT_GSM_CALL_INPROGRESS
CSCLIENT_PERMISSION_NEEDED
CSCALL_RECORDING_STATUS
public void endVoiceCall(java.lang.String remoteid, java.lang.String callid, int endStatus, java.lang.String endReason)
remoteid
- of calle whose call is activecallid
- callidendStatus
- user defined endStatus codeendReason
- user defined endReasonCSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
public boolean sendVoiceCallRinging(java.lang.String remoteid, java.lang.String callid, boolean iscallwaiting)
remoteid
- of callecallid
- callidiscallwaiting
- callwaiting indicationCSCALL_AUDIOVIDEOCALLRINGING_RESPONSE
CSCLIENT_NETWORKERROR
public boolean sendVideoCallRinging(java.lang.String remoteid, java.lang.String callid, boolean iscallwaiting)
remoteid
- of callecallid
- callidiscallwaiting
- callwaiting indicationCSCALL_AUDIOVIDEOCALLRINGING_RESPONSE
CSCLIENT_NETWORKERROR
public java.lang.String startVideoCall(java.lang.String remoteid, CSSurfaceViewRenderer localRender, CSSurfaceViewRenderer remoteRender, CSConstants.CALLRECORD callrecord, java.lang.String callcontextmessage, CSLocation location)
remoteid
- of callelocalRender
- localRender of type CSSurfaceViewRenderer
remoteRender
- remoteRender of type CSSurfaceViewRenderer
callrecord
- whether to record call or not or record as per settings.callcontextmessage
- Call context messagelocation
- Location of the call
CSCALL_CALLANSWERED
CSCALL_CALLENDED
CSCALL_NOANSWER
CSCALL_NOMEDIA
CSCALL_RINGING
CSCALL_MEDIACONNECTED
CSCALL_MEDIADISCONNECTED
CSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
CSCLIENT_GSM_CALL_INPROGRESS
CSCLIENT_PERMISSION_NEEDED
CSCALL_RECORDING_STATUS
public void answerVideoCall(java.lang.String remoteid, java.lang.String callid, CSSurfaceViewRenderer localRender, CSSurfaceViewRenderer remoteRender, java.lang.String callcontextmessage, CSLocation location)
remoteid
- of callecallid
- incoming call callidcallcontextmessage
- Call context messagelocation
- Location of the call
localRender
- localRender of type CSSurfaceViewRenderer
remoteRender
- remoteRender of type CSSurfaceViewRenderer
CSCallReceiver
CSCALL_CALLENDED
CSCALL_NOANSWER
CSCALL_NOMEDIA
CSCALL_RINGING
CSCALL_MEDIACONNECTED
CSCALL_MEDIADISCONNECTED
CSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
CSCLIENT_GSM_CALL_INPROGRESS
CSCLIENT_PERMISSION_NEEDED
CSCALL_RECORDING_STATUS
public void endVideoCall(java.lang.String remoteid, java.lang.String callid, int endStatus, java.lang.String endReason)
remoteid
- of calle whose call is activecallid
- callidendStatus
- user defined endStatus codeendReason
- user defined endReasonCSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
public boolean enableSpeaker(java.lang.String callid, boolean enablespeaker)
enablespeaker
- true to enable speaker or false to disable speakerpublic boolean muteAudio(java.lang.String callid, boolean mute)
mute
- true to mute or false to unmuteCSCALL_MUTE_OR_UNMUTE
CSCALL_MUTE_OR_UNMUTE_ACK
public boolean muteVideo(java.lang.String callid, boolean mute)
mute
- true to mute or false to unmuteCSCALL_MUTE_OR_UNMUTE
CSCALL_MUTE_OR_UNMUTE_ACK
public boolean toggleCamera(java.lang.String callid)
callid
- callidpublic boolean toggleVideocallViews(java.lang.String callid)
callid
- callidpublic boolean enableDefaultlocalVideoPreviewUX(boolean enable)
enable
- true or falsepublic boolean setIceTransportsType(CSConstants.IceTransportsType type)
type
- IceTransportsTypepublic boolean setPreferredAudioCodec(CSConstants.PreferredAudioCodec audioCodec)
audioCodec
- audioCodecpublic boolean setPreferredVideoCodec(CSConstants.PreferredVideoCodec videocodec)
videocodec
- videocodecpublic static boolean isCallAnswerable(java.lang.String callid)
callid
- callidpublic java.lang.String startPstnCall(java.lang.String number, java.lang.String fromNumber, java.lang.String callcontextmessage, CSLocation location)
number
- of callefromNumber
- fromNumber. It can be a Caller id that can be choosen from user's available DID numbers.callcontextmessage
- Call context messagelocation
- Location of the call
CSCALL_CALLANSWERED
CSCALL_CALLENDED
CSCALL_NOANSWER
CSCALL_NOMEDIA
CSCALL_RINGING
CSCALL_SESSION_IN_PROGRESS
CSCALL_MEDIACONNECTED
CSCALL_MEDIADISCONNECTED
CSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
CSCLIENT_GSM_CALL_INPROGRESS
CSCLIENT_PERMISSION_NEEDED
CSCALL_RECORDING_AT_SERVER
public void answerPstnCall(java.lang.String remoteid, java.lang.String callid, java.lang.String callcontextmessage, CSLocation location)
remoteid
- of callecallid
- incoming call callidcallcontextmessage
- Call context messagelocation
- Location of the call
CSCallReceiver
CSCALL_CALLENDED
CSCALL_NOANSWER
CSCALL_NOMEDIA
CSCALL_RINGING
CSCALL_MEDIACONNECTED
CSCALL_MEDIADISCONNECTED
CSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
CSCLIENT_GSM_CALL_INPROGRESS
CSCLIENT_PERMISSION_NEEDED
CSCALL_RECORDING_AT_SERVER
public void endPstnCall(java.lang.String number, java.lang.String callid)
number
- of calle whose call is activecallid
- callidCSCALL_CALLTERMINATED
CSCLIENT_NETWORKERROR
public boolean holdPstnCall(java.lang.String callid, boolean toggle)
callid
- callidtoggle
- true to hold the call.false to unhold the call.CSCALL_HOLD_UNHOLD_RESPONSE
CSCLIENT_NETWORKERROR
public boolean sendDtmfInPstnCall(java.lang.String digit, java.lang.String callid)
callid
- calliddigit
- digitCSCALL_SEND_DTMF_TONE_RESPONSE
CSCLIENT_NETWORKERROR
public boolean holdAVCall(java.lang.String remoteid, java.lang.String callid, boolean toggle)
muteAudio
muteVideo
when call is on hold,Also after unhold, the previous state of mute in the call will be recovered.remoteid
- of calle whose call is activecallid
- callidtoggle
- true to hold the call.false to unhold the call.CSCALL_HOLD_UNHOLD_RESPONSE
CSCLIENT_NETWORKERROR
public boolean recordCall(java.lang.String callid)
CSCALL_MEDIACONNECTED
event.public boolean isCallStatsEnabled()
public boolean enableCallStats(boolean enable)
enable
- true or false