Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: tapi 3 answer a call

198 views
Skip to first unread message

Tibor Csizmadia

unread,
Aug 27, 2004, 12:28:25 PM8/27/04
to
Hi Lucas,

I have the same problem for a few weeks...
First you must registrate at the TAPI and add a event handler like this:

private TAPI3Lib.TAPIClass myTapi=new TAPIClass();
public bool TapiStart()
{
myTapi.Initialize();
myTapi.Event +=new
ITTAPIDispatchEventNotification_EventEventHandler(myTapi_Event);
myTapi.EventFilter =
(int)TAPI_EVENT.TE_CALLNOTIFICATION+(int)TAPI_EVENT.TE_CALLSTATE;
return( true );
}


And then you become each TAPI-Event and can answer a call:


private void myTapi_Event(TAPI_EVENT TapiEvent, object pEvent)
{
if( TapiEvent == TAPI_EVENT.TE_CALLNOTIFICATION )
{
try
{
ITCallNotificationEvent myEvent =
(ITCallNotificationEvent)pEvent;
ITCallInfo myInfo = (ITCallInfo)myEvent.Call;
ITBasicCallControl myBasicCall =
(ITBasicCallControl)myEvent.Call;
WriteLog( "Ring "+myInfo.Address.AddressName );

// Answer call
myBasicCall.Answer();
}
catch( Exception e )
{
WriteLog( "Error<Event>: "+e.Message );
}
}
}

Good Luck!


Tibor Csizmadia
DevWare

"lucas" <lu...@discussions.microsoft.com> schrieb im Newsbeitrag
news:1FAEE4A4-62DF-4558...@microsoft.com...
> I've problem with answerig a call - I'm writing application in c#. Does
can
> some one show (send) some source code (C#) to answer a incomming call?
> regards!


Andreas Marschall [MVP TAPI]

unread,
Aug 28, 2004, 3:53:28 AM8/28/04
to
"lucas" <lu...@discussions.microsoft.com> wrote in message

news:1FAEE4A4-62DF-4558...@microsoft.com...
> I've problem with answerig a call - I'm writing application in c#. Does
can
> some one show (send) some source code (C#) to answer a incomming call?

Lucas,
what is your specific problem?
Take a look a the TAPI3 samples (especially incoming, outgoing) from P-SDK
and
play around with TAPI Browser TB3x before starting to code anything
yourself.
See my TAPI and TSPI FAQ:

Q: Where do I find documentation / specifications on TAPI / TSPI ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Where_can_1

Q: Is there any sample code available ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there

Q: Where can I download TAPI Browser ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Where_can

Q: Is there a user guide available for TAPI Browser TB3x ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Is_there_2

Q: How do I receive a call with TAPI3 ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_How_do_9

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK
TAPI / TSP Developer and Tester
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
* Please post all messages and replies to the newsgroup 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.


0 new messages