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