public void OnRegistrationStateChanged(SipSessionState newState, ushort sipCode, String description) { if (onRegistrationEvent != null) { onRegistrationEvent(this, new SipRegistrationEventArgs(newState, sipCode, description)); } }
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 SipRegistrationEventArgs(SipSessionState state, ushort sipCode, String description) { mState = state; mSipCode = sipCode; mDescription = description; }