[Asterisk-Users] How I Detect Any Tone using TAPI 2.0 API

As Kiran askiran2002 at yahoo.com
Wed Mar 31 02:52:57 MST 2004


I am Working on TAPI 2.0 and I develop a Software like Predictive Dialer IN Visual C++ 6 and 
Facing Some Problems. 
Problem 1: Problem is that I want to Detect Any Tone e.g(Fax Tone, Ringing Tone, Busy Tone.....) 
Problem 2: My program  also skip few Events (Ringning, Accepted).
I Used these Steps
 
Line Initialize:
----------------
  lparams = new LINEINITIALIZEEXPARAMS;
  lparams->dwOptions =LINEINITIALIZEEXOPTION_USEHIDDENWINDOW;
  lparams->dwTotalSize = sizeof (LINEINITIALIZEEXPARAMS);
  lparams->dwNeededSize =  sizeof (LINEINITIALIZEEXPARAMS)*2;
  lparams->Handles.hEvent = MyCallBack;
1>lineInitializeEx(&hLineApp,hcurr,MyCallBack,szAppName,&no,&ApiVersion,lparams)
     .....(Few Line of Code)
2>lineOpen(hLineApp,dwDeviceID,&hLine, ApiVersion,0, (DWORD)MyCallBack,
   LINECALLPRIVILEGE_MONITOR,LINEMEDIAMODE_INTERACTIVEVOICE  , 0)
          ......(Few Line of Code)
Select Device
------------- 
       lineGetDevCaps(hLineApp,i,dwAPIVersion,0,lpLineDevCaps)
         .....(Few Line of Code)
 
Dial Number
-----------
 lineMakeCall(hLine,&lphCall,lpsz ,0,NULL);
 
On Event Line_Reply
-------------------
 lineSetCallPrivilege(*lphCall,LINECALLPRIVILEGE_MONITOR);
 
 
On Event LINECALLSTATE_CONNECTED
--------------------------------
 LINEMONITORTONE LineTone[10]; 
 LineTone[0].dwAppSpecific  = CallBackInst; 
 LineTone[0].dwDuration   = 750;
 LineTone[0].dwFrequency1  = 400;
 ......(Few Line of Code)
 
 lineMonitorTones(lphCall,LineTone,0);

I Use MODEM
       Maze InterNal 56k Fax Modem ITU-T V.92/90
 

Thanks 
As Kiran
shahzi77 at yahoo.com
askiran2002 at yahoo.com
shah_khunbati at hotmail.com


---------------------------------
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040331/e24a82f2/attachment.htm


More information about the asterisk-users mailing list