Exemple #1
0
        public static bool Answer(int callHandle, CallModeEnum callMode, bool sutLiteEnable)
        {
            var errno = ErrorNumberEnum.PLCM_SAMPLE_OK;

            string CryptoSuiteType = "AES_CM_128_HMAC_SHA1_80";
            string SRTPKey         = "HfVGG79oW5XStt9DewUYrdngYlV/QqDBGIDNFB7m";
            var    m_authToken     = "AApzdG1lZXRpbmcxAAdzdHVzZXIxAAABPcJe1o4CsXgvirq1RQys3JCU0U8RvJ4uoA==";

            log.Debug("[answer], CryptoSuiteType=" + CryptoSuiteType + "  SRTPKey:" + SRTPKey);
            errno = WrapperProxy.AnswerCall(callHandle, callMode, m_authToken, CryptoSuiteType, SRTPKey, sutLiteEnable);

            if (errno != ErrorNumberEnum.PLCM_SAMPLE_OK)
            {
                log.Error("Answer a Call failed. ErrorNum = " + errno.ToString());
                return(false);
            }
            return(true);
        }
Exemple #2
0
        public static bool Answer(bool isVideo, bool sutLiteEnable)
        {
            var currentCall = callManager.CurrentCall;

            if (currentCall == null)
            {
                log.Error("answer a NULL call.");
                return(false);
            }
            var errno = ErrorNumberEnum.PLCM_SAMPLE_OK;

            string CryptoSuiteType = "AES_CM_128_HMAC_SHA1_80";
            string SRTPKey         = "HfVGG79oW5XStt9DewUYrdngYlV/QqDBGIDNFB7m";
            var    m_authToken     = "AApzdG1lZXRpbmcxAAdzdHVzZXIxAAABPcJe1o4CsXgvirq1RQys3JCU0U8RvJ4uoA==";

            log.Debug("[answer], CryptoSuiteType=" + CryptoSuiteType + "  SRTPKey:" + SRTPKey);
            if (isVideo)
            {
                errno = WrapperProxy.AnswerCall(currentCall.CallHandle, CallModeEnum.PLCM_MFW_AUDIOVIDEO_CALL, m_authToken, CryptoSuiteType, SRTPKey, sutLiteEnable);
            }
            else
            {
                errno = WrapperProxy.AnswerCall(currentCall.CallHandle, CallModeEnum.PLCM_MFW_AUDIO_CALL, m_authToken, CryptoSuiteType, SRTPKey, sutLiteEnable);
            }
            if (errno == ErrorNumberEnum.PLCM_SAMPLE_OK)
            {
                /*add the answered call to calllist*/
                callManager.AddCall(currentCall);
            }
            else
            {
                log.Error("Answer a Call failed. ErrorNum = " + errno.ToString());
                return(false);
            }
            return(true);
        }