Esempio n. 1
0
        private void HandleHandsetMsg(object sender, HandsetMsgArgs args)
        {
            HandsetNotifyMsg notify = args.Message as HandsetNotifyMsg;

            if (notify == null)
            {
                return;
            }

            switch (notify.MsgNotifyCode)
            {
            case HANDSETMSG_NOTIFY_CODE.MSG_NOTIFY_CALLSTATE:
                HandsetNotifyCallStateMsg statemsg = notify as HandsetNotifyCallStateMsg;
                HandleCallStateMsg(statemsg);
                break;

            case HANDSETMSG_NOTIFY_CODE.MSG_NOTIFY_INFO:
                HandsetNotifyInfoMsg info = notify as HandsetNotifyInfoMsg;
                if (info != null)
                {
                    OnHandsetAddrInfoUpdated(info);
                }
                break;

            case HANDSETMSG_NOTIFY_CODE.MSG_NOTIFY_ONLINE:
                RunSIPUA(CaptureDevice, PlaybakDevice);
                break;
            }
        }
Esempio n. 2
0
        private void OnHandsetAddrInfoUpdated(HandsetNotifyInfoMsg info)
        {
            HostAddr = info.host_addr;
            UdpPort  = info.udp_port;

            IsOnLine = true;
            if (OnHandsetOnline != null)
            {
                OnHandsetOnline(this, new HandsetOnlineArgs(Id));
            }
        }