كيف يمكن الحصول على رقم المتصل الهاتفي؟
#1
السلام عليكم:
كيف يمكن الحصول على رقم المتصل الهاتفي؟
حاولت باستخدام المكون hbtapi ولكن دائما الرقم يظهر فارغا
جزاكم الله خيرا
الرد
#2
procedure TForm3.FormCreate(Sender: TObject);
var i :integer;
begin
ComboBoxDevice.Items := hbTapiLine1.DeviceList;

if ComboBoxDevice.Items.Count > 0 then
ComboBoxDevice.Text := ComboBoxDevice.Items[0];
ComboBoxDevice.ItemIndex := 0;

end;
to activate
procedure TForm3.Button1Click(Sender: TObject);
var I :integer;
begin
hbTapiLine1.DeviceName := ComboBoxDevice.Text;
hbTapiLine1.Privileges.AutoSelect := True;
hbTapiLine1.MediaModes := LINEMEDIAMODE_INTERACTIVEVOICE;
hbTapiLine1.Privileges.None := True;
hbTapiLine1.Privileges.Monitor := True;
hbTapiLine1.Active := true;

end;


procedure TForm3.hbTapiLine1CallerID(Sender: ThbTapiLine; Call: ThbTapiCall);
begin
Label1.Caption := Call.CallerID.Name;
Label2.Caption := Call.CallerID.Address;

end;

procedure TForm3.hbTapiLine1CallInfo(Sender: ThbTapiLine; Call: ThbTapiCall;
InfoState: Cardinal);
begin
if not Call.CallerID.unAvail then
begin
Label2.Caption := Call.CallerID.Address;
Label1.Caption := Call.CallerID.Name;

end;
end;

procedure TForm3.hbTapiLine1CallState(Sender: ThbTapiLine; Call: ThbTapiCall;
CallState: Cardinal);
begin

if not Call.CallerID.unAvail then
begin
Label2.Caption := Call.CallerID.Address;
Label1.Caption := Call.CallerID.Name;

end;
end;

procedure TForm3.hbTapiLine1Offering(Sender: ThbTapiLine; Call: ThbTapiCall);
begin
if not Call.CallerID.unAvail then
begin
Label2.Caption := Call.CallerID.Address;
Label1.Caption := Call.CallerID.Name;

end;

end;
الرد


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم