Exemple #1
0
        private void OnRdInfo(int call, CORESIP_RdInfo info)
        {
            _log.From().Trace("OnRdInfo {0}, {1}, {2}, {3}", call, info.PttType, info.PttId, info.Squelch);
            switch (info.PttType)
            {
            case CORESIP_PttType.CORESIP_PTT_NORMAL:
            case CORESIP_PttType.CORESIP_PTT_PRIORITY:
            case CORESIP_PttType.CORESIP_PTT_EMERGENCY:
            case CORESIP_PttType.CORESIP_PTT_COUPLING:
                SipAgentEvent?.Invoke(SipAgentEvents.PttOn, call, "", info);
                break;

            case CORESIP_PttType.CORESIP_PTT_OFF:
                SipAgentEvent?.Invoke(SipAgentEvents.PttOff, call, "", info);
                break;
            }
        }
Exemple #2
0
        private void OnCallState(int call, CORESIP_CallInfo info, CORESIP_CallStateInfo stateInfo)
        {
            _log.From().Trace("OnCallState {0}, {1}, {2}", call, stateInfo.State, stateInfo.LastCode);
            switch (stateInfo.State)
            {
            case CORESIP_CallState.CORESIP_CALL_STATE_DISCONNECTED:
                SipAgentEvent?.Invoke(SipAgentEvents.CallDisconnected, call, "", null);
                break;

            case CORESIP_CallState.CORESIP_CALL_STATE_CONFIRMED:
                SipAgentEvent?.Invoke(SipAgentEvents.CallConnected, call, "", null);
                break;

            case CORESIP_CallState.CORESIP_CALL_STATE_INCOMING:
            case CORESIP_CallState.CORESIP_CALL_STATE_CALLING:
            case CORESIP_CallState.CORESIP_CALL_STATE_CONNECTING:
            case CORESIP_CallState.CORESIP_CALL_STATE_EARLY:
            case CORESIP_CallState.CORESIP_CALL_STATE_NULL:
                break;
            }
        }
Exemple #3
0
 private void OnKaTimeout(int call)
 {
     _log.From().Trace("OnKaTimeout {0}", call);
     SipAgentEvent?.Invoke(SipAgentEvents.KaTimeout, call, "", null);
 }
Exemple #4
0
 private void OnCallIncoming(int call, int call2replace, CORESIP_CallInfo info, CORESIP_CallInInfo inInfo)
 {
     _log.From().Trace("OnCallIncoming {0}, {1}", call, inInfo.DstId);
     SipAgentEvent?.Invoke(SipAgentEvents.IncomingCall, call, inInfo.DstId, null);
 }