[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

TAPI application: problem disconnecting line

Hi & Thanks for the time,
I am writing an application which should call and play wave files to one or more recipients (an Alert system).
The first call is placed fine but then the line remains busy even after all cleanups and i cannot go on to further calls.
I am using TAPI funcs and waveOut... funcs. In the cleanup I basically do:
CloseHandle( m_hComm );
lineDrop( m_hCall, NULL, 0 );
lineDeallocateCall( (HCALL)m_dwDevice );
lineClose( m_hLine );
0
dagan
Asked:
dagan
  • 3
  • 3
1 Solution
 
jhanceCommented:
Two ideas:

1) Are you checking for error conditions on each of the calls you are listing above?

2) Are you calling lineShutdown() ?
0
 
daganAuthor Commented:
error conditions are checked.
lineShutdown() !!!
That must be it (I sure hope so)
How did I miss it?!
Now I'll just restart the computer to set the line free and check if it works.
If so, you've got your points

thanks anyway
0
 
daganAuthor Commented:
Hi,
I just saw that my previuos rejection was not sent... ehmmm...
Unfortunately it was not one of the proposed answers, nor hardware problem. I've got a brand new modem and it acts the same (except that I dont need to RESTART the computer every time)
Anyway, I now also shutdown the line...

Any ideas???

thanks,
     
     Dagan
0
Turn Raw Data into a Real Career

There’s a growing demand for qualified analysts who can make sense of Big Data. With an MS in Data Analytics, you can become the data mining, management, mapping, and munging expert that today’s leading corporations desperately need.

 
jhanceCommented:
In that case, you are leaving a handle open somewhere.  TAPI can make multiple calls without rebooting, that is a known fact.

You say you are calling all of the above functions in cleanup but I'd bet that you are missing at least one of them and don't realize it.

One technique that is useful is to wrap each of the open/close functions in another function that keeps track of allocation/deallocation.

At this point, I can't offer much more due to the little amount of information you've provided.  In other words, the obvious problems are checked.  Now you need to be more detailed.  Post your code if you need to.
0
 
daganAuthor Commented:
EURECA!!!
I have found it, how foolish...
(my only excuse is that I am a TAPI beginner... still)
Anyway, since I am now in a good mood, I'll give away my points, jhance - after all you DID help and waste some precious time...
Everybody !!! this round of drinks is on me!!!

thanks,

BTW - the problem was that I didn't close the wave device, once upon a WOM_DONE message caught, before all other cleanup stuff.

ooopppsss.. if you might just send a proposed answer I can accept, it could be great.
(( "jhance has proposed an answer:
Try to close the wave device..." ))
0
 
jhanceCommented:
Thanks and I'm glad you found the problem...
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now