[Delphi] Telephony API

Fermé
Dinheru Messages postés 1019 Date d'inscription mercredi 20 avril 2005 Statut Membre Dernière intervention 17 avril 2009 - 23 juin 2008 à 13:42
Dinheru Messages postés 1019 Date d'inscription mercredi 20 avril 2005 Statut Membre Dernière intervention 17 avril 2009 - 23 juin 2008 à 15:06
Bonjour,

Voila je travaille sur une application Delphi utilisant la telephonie.
Ma question est la suivante : Comment être sûr que la personne que j'appel à bien décroché le téléphone.

Pour l'instant j'arrive à détecter pas mal d'événement, mais quand j'arrive à l'etat LINECALLSTATE_CONNECTED, je voudrais être sûr que la personne décroche avant de continuer à faire quoi que ce soit. Or j'arrive dans cette état dès que le téléphone sonne chez le destinataire mais je suis pas sûr qu'il est décroché (-_-!).

Ma fonction :

procedure lineCallBack(hDevice, dwMsg, dwCallbackInstance, dwParam1, dwParam2, dwParam3 : longint);
stdcall;
begin
     case dwMsg of

          LINE_REPLY :
          begin
             Form1.traceExec.Items.Add('LINE_REPLY');
          end;

          LINE_MONITORDIGITS :
          begin
             //*** ETOILE ***//
             if dwParam1 = 42 then
             begin
                 Form1.traceExec.Items.Add('Touche étoile tapée');
                 //Form1.LireMessage(1);
             end;

             //*** DIESE ***//
             if dwParam1 = 35 then
             begin
                  Form1.traceExec.Items.Add('Touche dièse tapée');
                  lineClose(Form1.line);
             end;

             //*** CHIFFRE ***//
             if dwParam1 in [48..57] then
             begin
                 Form1.traceExec.Items.Add('Touche chiffrée tapée');
             end;
          end;

          LINE_CALLSTATE :
          begin
               Form1.call := THCall(hDevice);
               case dwParam1 of
                    LINECALLSTATE_IDLE :
                    begin
                        Form1.traceExec.Items.Add('LINECALLSTATE_IDLE');
                    end;

                    LINECALLSTATE_BUSY :
                    begin
                        Form1.traceExec.Items.Add('LINECALLSTATE_BUSY');
                    end;

                    LINECALLSTATE_CONNECTED :
                    begin
                        Form1.traceExec.Items.Add('LINECALLSTATE_CONNECTED');
                        lineMonitorDigits(form1.call, LINEDIGITMODE_DTMF);
                        //Form1.LireMessage(0);

                    end;

                    LINECALLSTATE_DISCONNECTED :
                    begin
                        Form1.traceExec.Items.Add('LINECALLSTATE_DICONECTED');
                        lineClose(Form1.line);
                    end;
               end;
          end;
     end;
end;

1 réponse

Dinheru Messages postés 1019 Date d'inscription mercredi 20 avril 2005 Statut Membre Dernière intervention 17 avril 2009 67
23 juin 2008 à 15:06
Il y a vraiment personne pour m'aider ? Pleaze !
0