/// <summary> /// 软摘/挂机 1 摘机 0 挂机 /// </summary> /// <param name="hook"></param> /// <returns></returns> public static void OffOnHook(int hook) { if (hook == 1) { StartRecord(); } if (hook == 0) { EndRecord(); } BriSDKLib.QNV_SetDevCtrl((short)VoipIndex, BriSDKLib.QNV_CTRL_DOHOOK, hook); }
/// <summary> /// 初始化盒子 设置相关配置 /// </summary> public static void init() { BriSDKLib.QNV_SetParam(VoipIndex, BriSDKLib.QNV_PARAM_BUSY, 10); //修复 意外远程挂机 lineToSpk(0); //初始化线路声音到耳机 关闭 因为来电有干扰声音 很刺耳 BriSDKLib.QNV_SetDevCtrl(VoipIndex, BriSDKLib.QNV_CTRL_DOMICTOLINE, 1); //打开麦克风到电话线 BriSDKLib.QNV_SetDevCtrl(VoipIndex, BriSDKLib.QNV_CTRL_LINEOUT, 1); //打开线路输出功能 BriSDKLib.QNV_SetDevCtrl(VoipIndex, BriSDKLib.QNV_CTRL_DOPLAYTOSPK, 1); //打开播放的语音到耳机 BriSDKLib.QNV_SetDevCtrl(VoipIndex, BriSDKLib.QNV_CTRL_PLAYTOLINE, 1); //打开播放的语音到线路 BriSDKLib.QNV_SetParam(VoipIndex, BriSDKLib.QNV_PARAM_AM_MIC, 0); //获取插在设备上的麦克风增益大小// BriSDKLib.QNV_SetParam(VoipIndex, BriSDKLib.QNV_PARAM_AM_SPKOUT, 10); //设置插在设备上的耳机音量等级大小 BriSDKLib.QNV_SetParam(VoipIndex, BriSDKLib.QNV_PARAM_AM_LINEOUT, 15); //设置播放语音到线路的音量等级大小// BriSDKLib.QNV_SetParam(VoipIndex, BriSDKLib.QNV_PARAM_AM_LINEIN, 7); //电话线路信号强 BriSDKLib.QNV_SetParam(VoipIndex, BriSDKLib.QNV_PARAM_AM_DOPLAY, 15); createDirectory(crmRoot); createDirectory(Utils.crmLog); createDirectory(recordPath); }
private Int32 StopChannel(Int32 lCCHandle)//CC呼叫停止,断开通道PSTN线路 { long lID = GetCCHandleGateID(lCCHandle); if (lID >= 0) {//如果已经是接通了 if (BriSDKLib.QNV_GetDevCtrl(m_tagGateData[lID].uChannelID, BriSDKLib.QNV_CTRL_DOHOOK) > 0) { BriSDKLib.QNV_SetDevCtrl(m_tagGateData[lID].uChannelID, BriSDKLib.QNV_CTRL_DOHOOK, 0); } else//还没有接通,直接调用拒接 { BriSDKLib.QNV_General(m_tagGateData[lID].uChannelID, BriSDKLib.QNV_GENERAL_STARTREFUSE, 0, ""); } AppendStatus("停止通道转移"); m_tagGateData[lID].lCCHandle = 0; return(1); } else { return(0); } }
private void doplay_CheckedChanged(object sender, EventArgs e) { BriSDKLib.QNV_SetDevCtrl((short)selchannel.SelectedIndex, BriSDKLib.QNV_CTRL_DOPLAY, doplay.Checked ? 1 : 0); }
private void domic2line_CheckedChanged(object sender, EventArgs e) { BriSDKLib.QNV_SetDevCtrl((short)selchannel.SelectedIndex, BriSDKLib.QNV_CTRL_DOMICTOLINE, domic2line.Checked ? 1 : 0); }
private void doline2spk_CheckedChanged(object sender, EventArgs e) { BriSDKLib.QNV_SetDevCtrl((short)selchannel.SelectedIndex, BriSDKLib.QNV_CTRL_DOLINETOSPK, doline2spk.Checked ? 1 : 0); }
private void dophone_CheckedChanged(object sender, EventArgs e) { BriSDKLib.QNV_SetDevCtrl((short)selchannel.SelectedIndex, BriSDKLib.QNV_CTRL_DOPHONE, dophone.Checked ? 0 : 1); }
/// <summary> /// 打开线路声音到耳机 1打开 0 关闭 /// </summary> public static void lineToSpk(int spk) { BriSDKLib.QNV_SetDevCtrl(VoipIndex, BriSDKLib.QNV_CTRL_DOLINETOSPK, spk); }
/// <summary> /// 打开1/关闭0 麦克风到电话线 /// </summary> /// <param name="domic">1打开/0关闭</param> public static void domicToLine(int domic) { BriSDKLib.QNV_SetDevCtrl(VoipIndex, BriSDKLib.QNV_CTRL_DOMICTOLINE, domic); }
private Int32 AnswerChannel(Int32 uChannelID) //接通PSTN { BriSDKLib.QNV_SetDevCtrl((Int16)uChannelID, BriSDKLib.QNV_CTRL_DOHOOK, 1); //接通PSTN AppendStatus("接通线路"); return(1); }