Discussion:
Playing a wav file in the TSP in Windows 7/Vista
(too old to reply)
s***@yahoo.com
2013-05-27 11:22:26 UTC
Permalink
Hi,

I have written a TSP, which plays a wav file for incoming calls. I have used the PlaySound() api for playing the wav file. This works fine on Windows XP. However does not work on Windows7/Vista.

After some research, following is my understanding
- Windows services can not play the sound file(Windows XP is an exception)
- Some blogs mention to enable "interact with desktop". This cannot be done for the "Telephony Service" on windows7/Vista

Is there a way to achive this in Windows7/Vista?(i.e playing the wav file in the TSP)

Regards,
Rohan
s***@yahoo.com
2013-05-27 11:39:24 UTC
Permalink
TSP functionality implemented by me
- I have integrated the SIP stack. The call related audio is handled by the SIP stack which works fine.
- Making call(TSPI_lineMakeCall, TSPI_lineDrop etc) also are working fine.
- When I get the incoming call form SIP stack(i.e 180 ringing), I need to send "LINECALLSTATE_OFFERING" to the TAPI. This also is working fine.
- And I also need to play the "ring tone" in the system speaker/headset to indicate the user about the incoming call.
Andreas Marschall [exMVP TAPI]
2013-05-27 13:52:14 UTC
Permalink
Post by s***@yahoo.com
I have written a TSP, which plays a wav file for incoming calls. I have used the PlaySound() api for playing the wav file. This works fine on Windows XP. However does not work on Windows7/Vista.
After some research, following is my understanding
- Windows services can not play the sound file(Windows XP is an exception)
- Some blogs mention to enable "interact with desktop". This cannot be done for the "Telephony Service" on windows7/Vista
Is there a way to achive this in Windows7/Vista?(i.e playing the wav file in the TSP)
Rohan,
by default, starting wit Vista, TAPISRV is not any more running as LOCALSYSTEM.
Because of this change you cannot activate "interact with desktop" in SCM.
To be able to set this again, you need to change the account for TAPISRV to LOCALSYSTEM.
On a client OS (Vista, Win7 etc.) you 1st need to change the SvcHost mode for TAPISRV from shared mode to exclusive mode.
This has been discussed several times in this group, e.g.:
http://groups.google.com/d/msg/microsoft.public.win32.programmer.tapi/PDCTZhEUk3Q/G-_O4RMO15wJ
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
* Please post all messages and replies to the group so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
Rohan Shetty
2013-05-28 03:16:03 UTC
Permalink
Hi Andreas,

Thank you for your help.

Regards,
Rohan
Rohan Shetty
2013-05-28 03:20:32 UTC
Permalink
Hi Andreas,

Is there any other way of achieving this. Since we are going to distribute this TSP to many end users, we may not be able to change the "Telephony Service".

Somewhere, I remember reading "low level of sound api like NAudio might solve this problem". Any idea about this??

Regards,
Rohan
Andreas Marschall [exMVP TAPI]
2013-05-29 13:08:48 UTC
Permalink
Post by Rohan Shetty
Is there any other way of achieving this. Since we are going to distribute this TSP to many end users, we may not be able to change the "Telephony Service".
Rohan,
I see no problem in changing this from the Setup/Installer of your TSP.
I did the same with the Siemens HiPath TAPI 120/170TSP.

IMO there is no reason for a client OS to run TAPISRV in a shared SvcHost (as opposed to a server OS with an exclusive SvcHost by default). For stability / robust ness I strongly recommend that for all OS.

The changing from LOCALHOST to NetworkService account after WinXP did break some TSPs in the field. So I don't see much sense here too.

To sum it up, IMO MS did do some changes to TAPI after WinXP that weren't very smart...
Post by Rohan Shetty
Somewhere, I remember reading "low level of sound api like NAudio might solve this problem". Any idea about this??
Sorry, I'm not familiar with that API.
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.i-b-a-m.de/Andreas_Marschall's_Toto_Tools.htm
* Please post all messages and replies to the group so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
Rohan Shetty
2013-05-31 09:36:55 UTC
Permalink
Hi Andreas,

Thank you for your answer. I will change the installer to support this.

Regards,
Rohan

Loading...