b***@gmail.com
2012-03-06 07:30:32 UTC
hi all
i am developing a Tapi service in my workplace, and the make call and incoming call works fine
now i am trying to play a wav file to the call but keep getting casting problems
i currently try 2 ways, both giving exceptions when trying to make ITTerminal/Support:
1. ITAddress lineAddress = myAddressAll[sta.Station];
ITCallInfo ici = (ITCallInfo)myCall;
ITTerminalSupport myTerminalSupport = (ITTerminalSupport)lineAddress;
--> catch : NOINTERFACE
2. ITAddress lineAddress = myAddressAll[sta.Station];
ITCallInfo ici = (ITCallInfo)myCall;
ITBasicCallControl2 myCallControl2 = (ITBasicCallControl2)ici;
ITTerminal playbackTerminal;
TERMINAL_DIRECTION capture = TAPI3Lib.TERMINAL_DIRECTION.TD_CAPTURE;
playbackTerminal = myCallControl2.RequestTerminal(
TapiConstants.CLSID_String_FilePlaybackTerminal,
TapiConstants.TAPIMEDIATYPE_AUDIO,
capture);
--> catch : specific xast is not valid
please help me
ariel
i am developing a Tapi service in my workplace, and the make call and incoming call works fine
now i am trying to play a wav file to the call but keep getting casting problems
i currently try 2 ways, both giving exceptions when trying to make ITTerminal/Support:
1. ITAddress lineAddress = myAddressAll[sta.Station];
ITCallInfo ici = (ITCallInfo)myCall;
ITTerminalSupport myTerminalSupport = (ITTerminalSupport)lineAddress;
--> catch : NOINTERFACE
2. ITAddress lineAddress = myAddressAll[sta.Station];
ITCallInfo ici = (ITCallInfo)myCall;
ITBasicCallControl2 myCallControl2 = (ITBasicCallControl2)ici;
ITTerminal playbackTerminal;
TERMINAL_DIRECTION capture = TAPI3Lib.TERMINAL_DIRECTION.TD_CAPTURE;
playbackTerminal = myCallControl2.RequestTerminal(
TapiConstants.CLSID_String_FilePlaybackTerminal,
TapiConstants.TAPIMEDIATYPE_AUDIO,
capture);
--> catch : specific xast is not valid
please help me
ariel