你要用语言卡才能实现阿老兄,下面是东进语言卡的来电显示代码:
1:begin
if checkplayend(channelno) then
begin
//得到主叫号码
if ringdetect(channelno) then
begin
resetcalleridbuffer(channelno);
channel[channelno].Countdown:=channel[channelno].Countdown+1;
//这里要根据实际情况做修改,比如FSK是在第二次响铃以后才发送,要增加这里的时间数。
if channel[channelno].Countdown=30 then
begin
offhook(channelno);
channel[channelno].Countdown:=0;
L_tel.Caption:='接受电话号码失败';
channel[channelno].step:=100;
end;
p:=stralloc(128);
a:=getcalleridstr(channelno,p);
//接受完毕,校验正确
if a=3 then
begin
s:=p;
L_tel.Caption :=s;
offhook(channelno);
channel[channelno].step:=100;
channel[channelno].Countdown:=0;
end;
//接受完毕,校验错误
if a=4 then
begin
s:=p;
//L_tel.Caption :='校验出错,号码是:'+s;
offhook(channelno);
channel[channelno].step:=100;
channel[channelno].Countdown:=0;
end;
strdispose(p);
end;
end;