I need detect the ring tones in Outgoing callings and for this i add this code and work fine
CWay2CallDriver.OnToneMonitored +=
new CWay2CallDriver.DelegateOnToneMonitored(xDriver_OnToneMonitored);
CWay2CallDriver.CDevice.TONE_MONITOR_IDS iTone0 =
CWay2CallDriver.CDevice.TONE_MONITOR_IDS.TONE_ID_00;
xDriver.Device.ToneMonitor.Tone[iTone0].Duration = 1000; xDriver.Device.ToneMonitor.Tone[iTone0].Frequency1 = 425; xDriver.Device.ToneMonitor.Tone[iTone0].Frequency2 = 2100; xDriver.Device.ToneMonitor.Tone[iTone0].Frequency3 = 0; xDriver.Device.ToneMonitor.Tone[iTone0].Enabled = true; xDriver.Device.ToneMonitor.Start();
This cod work fine and fire the event
Now i need detect the fax answer and i have 2 options
1.- Add event
CWay2CallDriver.OnCallProgressFaxAnswer +=
new CWay2CallDriver.DelegateNoParams(xDriver_OnCallProgressFaxAnswer);
but this codo not fire the even when i call to a fax number
2.- add secon tone detect.
CWay2CallDriver.CDevice.TONE_MONITOR_IDS iTone1 =
CWay2CallDriver.CDevice.TONE_MONITOR_IDS.TONE_ID_01; xDriver.Device.ToneMonitor.Tone[iTone1].Duration = 1000; xDriver.Device.ToneMonitor.Tone[iTone1].Frequency1 = 2100; xDriver.Device.ToneMonitor.Tone[iTone1].Frequency2 = 0; xDriver.Device.ToneMonitor.Tone[iTone1].Frequency3 = 0; xDriver.Device.ToneMonitor.Tone[iTone1].Enabled = true;
But this either fire the event xDriver_OnToneMonitored
I I change the Tone detect, in first case frecuency 2100 (Fax answer) and then 425( Ring tone) then the event not fired when the call is in progress. If the frequency 425 is the first tone, then the program fire the event for the ring tones.
Some Ideas for detect both tones? (Ring tone and fax answer)
Thanks
|