GetCallerIDStr() 개인적인 메소드

private GetCallerIDStr ( ushort wChnlNo, byte idStr ) : ushort
wChnlNo ushort
idStr byte
리턴 ushort
예제 #1
0
        //得到主叫
        private string getCaller(LineInfo trunk)
        {
            byte[] number = new byte[128];
            InvokeVcDll.GetCallerIDStr(trunk.Number, number);
            string result = Encoding.UTF8.GetString(number);

            result = result.TrimEnd('\0');
            if (result.Length > 8)
            {
                result = result.Substring(8);
            }
            char[]   c     = { '\0' };
            string[] phone = result.Split(c);
            result            = phone[0];
            trunk.CallerPhone = result;
            log.Debug("收外线" + trunk.Number + "主叫号码:" + result);
            return(result);
        }