//得到主叫 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); }