I am facing severe problem with silence detection with music telecom card.
Once the call is established, I need to monitor the line for silence and
notify on silence.
The card vendor says that the card & his TSP supports lineMonitorTones. The
tech support people say that this is already functioning with other
customers. His sample with native APIs is succeeding in detecting the
silence time.
This is how I am coding.
on LINECALLSTATE_CONNECTED,
LINEMONITORTONE lnMonitorTone;
lnMonitorTone.dwAppSpecific = SILENCE; //#defined as 100
lnMonitorTone.dwDuration = 2000;
lnMonitorTone.dwFrequency1 = 0;
lnMonitorTone.dwFrequency2 = 0;
lnMonitorTone.dwFrequency3 = 0;
lRes = lineMonitorTones(m_hCall, &lnMonitorTone, 1);
if( lRes!= 0)
{
//error handling
}
I have tried the code with 3 as 3rd parameter to lineMonitorTones.
I poll the messages and on LINE_MONITORTONE, I want to do my processing.
Thing is that, the lineMonitorTones succeeds. But as soon as it succeeds, it
is sending LINE_MONITORTONE though there is no silence. Later, it never
sends any LINE_MONITORTONE even if there is actual silence.
Any pointers? Is my code doing something wrong?
Thanks In Advance,
Ishwar
I am desperately looking for help.
Thanks.
Ishwar
Ishwar wrote in message ...
Craig Buck
gb...@fast.net
Ishwar wrote in message ...
>Hello,
>
>I am facing severe problem with silence detection with music telecom card.
>Once the call is established, I need to monitor the line for silence and
>notify on silence.
>
>The card vendor says that the card & his TSP supports lineMonitorTones. The
>tech support people say that this is already functioning with other
>customers. His sample with native APIs is succeeding in detecting the
>silence time.
>
>This is how I am coding.
>
>on LINECALLSTATE_CONNECTED,
>
> LINEMONITORTONE lnMonitorTone;
>
> lnMonitorTone.dwAppSpecific = SILENCE; file://#defined as 100
> lnMonitorTone.dwDuration = 2000;
> lnMonitorTone.dwFrequency1 = 0;
> lnMonitorTone.dwFrequency2 = 0;
> lnMonitorTone.dwFrequency3 = 0;
>
> lRes = lineMonitorTones(m_hCall, &lnMonitorTone, 1);
> if( lRes!= 0)
> {
> file://error handling
Ishwar
Craig Buck wrote in message ...
Ishwar wrote in message <#rd2qJ6h$GA....@cppssbbsa02.microsoft.com>...
That means you are using unimodem or unimodem/V TSP. These TSPs do not
support silence detection. lineMonitorTones failes with
LINERR_OPERATIONUNAVAILABLE error.
So, if you are using standard modem and TAPI, you are out of luck.
If want to stick to standard modems and try AT#V commands. If you enable
silence detection ( I forogot the command though), whenever the line is
silent, modem is supposed to give <DLE>'q'. The value of <DLE> is 0x10.
Duration of silence can be set in some S-register.
(Again I apologise for forgetting..)
So, you should get 0x10 'q' bytes. This is what the documentation says. I
tried it using hyperterminal. It did not seem to be working.
Other option is to go for telephony cards. They support TAPI and their own
API set.
With native APIs, the application will be efficient. But you can not run
the software on some other hardware.
For TAPI, they come with their own TSP. They implement most of the TAPI
functions. Probably, you can contact different vendors and find out whether
their products suit your requirement.
Then you can try TAPI browser to understand the TSP's behaviour.
[Unfortunately, TAPI browser does not implement few functions completely.
one of them is lineMonitorTones].
My application is working fine with interactive voice. I have to try to make
it work for automated voice...
Good Luck.
http://www2.sienanet.it/users/guido/Sportster/poundv.htm
Thanks,
Ishwar
Keith C wrote in message <8a3p57$pq2$1...@news.ihug.co.nz>...
>Hi
>
>Do note that for automated voice systems, you'd be getting into low level
>multimedia APIs anyway, eg waveInxxx/waveOutxxx or other custom telephony
>card APIs. With the audio data in your hands, you could implement silence
>detection wihout too much pain...
>
>Something to consider
>Keith
>
>
>Ishwar <ishw...@yahoo.com> wrote in message
>news:#jesnBFi$GA...@cppssbbsa02.microsoft.com...
Craig Buck
I was trying lineMonitorTones (with all frequecies set to zero). It did not
seem to be working. Even TAPI browser does not allow me to change the
parameter values. So I could not make out whether the problem is with the
code or something else.
Thanks,
Ishwar
But how could you be "listening" without having the audio data? Oh unless
you are not doing any playback/recording, and just want to detect silence.
Well, in that case, I guess I can't help you much. To implement my
suggestion, you'll basically need to record the line and set a threshold for
your silence detection.
Keith
Ishwar <ishw...@yahoo.com> wrote in message
news:uC$jbyHi$GA....@cppssbbsa02.microsoft.com...
> No... Audio data is not in my hands...
> I am writing libraries for a test station where IVR products are to be
> tested. The library I'm writing need to monitor the line for silence. I
do
> not have any control over the duration and time of silence.. I'm not
playing
> anything. I'm "listening" in stead.
>
> Thanks,
> Ishwar
>
> Keith C wrote in message <8a3p57$pq2$1...@news.ihug.co.nz>...
As you have mentioned before, unimodem/V does not support lineMonitorTones.
It is not an error in your code. Again, you could record (using waveInxxx)
the line and detect silence from the audio data coming in.
Keith
Ishwar <ishw...@yahoo.com> wrote in message
news:#mtJnnQi$GA....@cppssbbsa02.microsoft.com...
>
> >But how could you be "listening" without having the audio data? Oh unless
> >you are not doing any playback/recording, and just want to detect
silence.
> >Well, in that case, I guess I can't help you much. To implement my
> >suggestion, you'll basically need to record the line and set a threshold
> for
> >your silence detection.
> >
> >Keith
>
>
Thanks,
Ishwar
Keith C wrote in message <8a6ufi$2vd$1...@news.ihug.co.nz>...