public void OnAVCallStateChanged(SipAVCallState newState, ushort sipCode, String description) { if (onAVCallEvent != null) { onAVCallEvent(this, new SipAVCallEventArgs(newState, sipCode, description)); } }
internal static String CallStateToString(SipAVCallState state) { switch (state) { case SipAVCallState.EarlyMedia: { return("Early Media"); } case SipAVCallState.InCall: { return("In Call"); } case SipAVCallState.Incoming: { return("Incoming"); } case SipAVCallState.InProgress: { return("In Progress"); } case SipAVCallState.RemoteRinging: { return("Ringing"); } case SipAVCallState.Terminated: { return("Terminated"); } case SipAVCallState.Terminating: { return("Terminating"); } default: { return("Unknown"); } } }
virtual internal void Update() { String remotePartyDisplayName = null; String remotePartyNumber = null; SipService sipService = rtServiceManager.Instance.SipService; SipAVCallState callState = SipAVCallState.None; SipSessionState registrationState = SipSessionState.None; if (sipService != null) { registrationState = sipService.RegistrationState; SipAVCall avCall = rtServiceManager.Instance.SipService.SipActiveAVCall; if (avCall != null) { if (avCall.UriRemote != null) { remotePartyDisplayName = avCall.UriRemote.getDisplayName(); remotePartyNumber = avCall.UriRemote.getUserName(); if (String.IsNullOrEmpty(remotePartyDisplayName)) { remotePartyDisplayName = remotePartyNumber; } } callState = avCall.State; } } RegistrationState = registrationState; if (!String.IsNullOrEmpty(remotePartyDisplayName)) // Keep previsous text { RemotePartyDisplayName = remotePartyDisplayName; } if (!String.IsNullOrEmpty(remotePartyNumber)) // Keep previsous text { RemotePartyNumber = remotePartyNumber; } if (callState != SipAVCallState.None)// Keep previsous text { CallState = callState; } }
internal SipAVCallEventArgs(SipAVCallState state, ushort sipCode, String description) { mState = state; mSipCode = sipCode; mDescription = description; }
public void OnAVCallStateChanged(SipAVCallState newState, ushort sipCode, String description) { if (onAVCallEvent != null) { onAVCallEvent(this, new SipAVCallEventArgs(newState, sipCode, description)); } }
internal SipAVCallEventArgs(SipAVCallState state, ushort sipCode, String description) { mState = state; mSipCode = sipCode; mDescription = description; }
internal static String CallStateToString(SipAVCallState state) { switch (state) { case SipAVCallState.EarlyMedia: { return "Early Media"; } case SipAVCallState.InCall: { return "In Call"; } case SipAVCallState.Incoming: { return "Incoming"; } case SipAVCallState.InProgress: { return "In Progress"; } case SipAVCallState.RemoteRinging: { return "Ringing"; } case SipAVCallState.Terminated: { return "Terminated"; } case SipAVCallState.Terminating: { return "Terminating"; } default: { return "Unknown"; } } }