public void Start() { try { SipAgentNet.Start(); } catch (Exception x) { LogException(x, "Start Exception"); } }
public void MixerUnlink(int srcId, int dstId) { try { SipAgentNet.MixerUnlink(srcId, dstId); } catch (Exception x) { LogException(x, "MixerUnlink Exception"); } }
public void DestroyWavPlayer(int wavplayer) { try { SipAgentNet.DestroyWavPlayer(wavplayer); } catch (Exception x) { LogException(x, "DestroyWavPlayer Exception"); } }
public void HangupCall(int callid, int code) { try { _log.From().Trace("HangupCall {0}, {1}", callid, code); SipAgentNet.HangupCall(callid, code); } catch (Exception x) { LogException(x, "AnswerCall Exception"); } }
public void AnswerCall(int callid, int code) { try { _log.From().Trace($"AnswerCall {callid}, {code}"); SipAgentNet.AnswerCall(callid, code); } catch (Exception x) { LogException(x, "AnswerCall Exception"); } }
public void SquelchSet(int callid, bool valor, CORESIP_PttType tipoptt = CORESIP_PttType.CORESIP_PTT_OFF, ushort pttId = 0) { try { SipAgentNet.SqhOnOffSet(callid, valor, tipoptt, pttId); } catch (Exception x) { LogException(x, "SquelchSet Exception"); } }
public string SendOptionsMsg(string OptionsUri) { try { string callid = ""; SipAgentNet.SendOptionsMsg(OptionsUri, out callid); return(callid); } catch (Exception x) { LogException(x, "SendOptionsMsg Exception"); } return(""); }
public int CreateWavPlayer(string file, bool loop) { int wavplayer = -1; try { wavplayer = SipAgentNet.CreateWavPlayer(file, loop); } catch (Exception x) { LogException(x, "CreateWavPlayer Exception"); wavplayer = -1; } return(wavplayer); }
public void PttSet(int callid, CORESIP_PttType tipo, ushort pttId = 0, int pttMute = 0) { try { if (tipo == CORESIP_PttType.CORESIP_PTT_OFF) { SipAgentNet.PttOff(callid); } else { SipAgentNet.PttOn(callid, pttId, tipo, pttMute); } } catch (Exception x) { LogException(x, "PttSet Exception"); } }
public void Init(int maxcall = 32) { try { SipAgentNet.CallState += OnCallState; SipAgentNet.CallIncoming += OnCallIncoming; SipAgentNet.RdInfo += OnRdInfo; SipAgentNet.KaTimeout += OnKaTimeout; SipAgentNet.OptionsReceive += OnOptionsReceive; SipAgentNet.InfoReceived += OnInfoReceived; SipAgentNet.Log += OnLog; SipAgentNet.Init(settings, "ROIPSIM", IpBase, SipPort, (uint)maxcall); } catch (Exception x) { LogException(x, "Init Exception"); } }
public void End() { try { SipAgentNet.CallState -= OnCallState; SipAgentNet.CallIncoming -= OnCallIncoming; SipAgentNet.RdInfo -= OnRdInfo; SipAgentNet.KaTimeout -= OnKaTimeout; SipAgentNet.OptionsReceive -= OnOptionsReceive; SipAgentNet.InfoReceived -= OnInfoReceived; SipAgentNet.End(); SipAgentNet.Log -= OnLog; } catch (Exception x) { LogException(x, "End Exception"); } finally { SipAgentEvent = null; } }