C++/VB - TSPI: Problem on incoming calls

Asked By Thomas Dupont on 10-Nov-10 10:59 AM
Hello,

As part of a draft inter operability, we are currently developing a
TSP for TAPI, for our communication system (VOIP).
The objective is to monitor a VOIP phone.
Unfortunately, TSP produced can not properly handle incoming calls.

We started the project SIPTAPI developed by Klaus Darilion (enum.at).
it is designed to work with SIP, but do not manage incoming calls.


With TSP, the following calls made:

TSPI_lineNegotiateTSPIVersion
TSPI_providerEnumDevices
TSPI_providerInit
TSPI_phoneNegotiateTSPIVersion
TSPI_lineGetExtensionID
TSPI_lineGetDevCaps
TSPI_lineGetAddressCaps
TSPI_lineOpen
TSPI_lineGetNumAddressIDs
TSPI_lineSetDefaultMediaDetection
TSPI_lineSetStatusMessages
message LINE_NEWCALL
message LINE_CALLSTATE - LINECALLSTATE_OFFERING
message LINE_CALLSTATE - LINECALLSTATE_ACCEPTED

TSPI_lineGetCallInfo
TSPI_lineGetCallInfo
TSPI_lineGetCallInfo
TSPI_lineGetCallInfo
TSPI_lineCloseCall
TSPI_lineClose
TSPI_providerShutdown




With the TAPI application when an incoming call, the application
receives an event "TE_CALLNOTIFICATION", and in the treatment of this
event :


case TE_CALLNOTIFICATION:
{
// CET_CALLNOTIFICATION means that the application is being notified
// of a new call.
//
// Note that we do not answer to call at this point.  The application
// should wait for a CS_OFFERING CallState message before answering
// the call.

ITCallNotificationEvent         * pNotify;


hr = pEvent->QueryInterface( IID_ITCallNotificationEvent, (void
**)&pNotify );


if (S_OK == hr)
{

CALL_PRIVILEGE          cp;
ITCallInfo *            pCall;

//
// get the call
//

hr = pNotify->get_Call( &pCall );

//
// release the event object
//

pNotify->Release();

//
// check to see if we own the call
//

hr = pCall->get_Privilege( &cp );

if ( CP_OWNER != cp ) // cp is always CP_MONITOR !!!
{
... return  with Fail status...



Has anyone already made a TSP that will handle incoming calls? Could
he help?

Sincerely,

Thomas D.


Andreas Marschall [exMVP TAPI] replied to Thomas Dupont on 10-Nov-10 03:33 PM
If the TSP already fires a LINE_NEWCALL message followed by a
corresonding LINE_CALLSTATE message then it seems to alraedy  support
incoming calls.




Do you have problem with the TSP suporting icoming calls or with a
TAPI app supporting them or both?



Yes, I did this already for multiple TSPs,
but I cannot provide them as sample code for copyright reasons.

The ATSP32 sample TSP from MS P-SDK unfortunately supports no incoming
calls.

The sample TSPs (DSSP =3D Digital Switch Service Provider Sample, ATSP =3D
TAPI Service Provider for AT style modems) from JulMar does support
incoming calls.
They are part of their TSP++ SDK (samples directory). Search the
source code for ::CreateCallAppearance() function.

Please see http://www.tapi.info/default.aspx/TAPI/TspDevSamples.html

If you have any specific questions regarding incoming call support,
feel free to ask, and I will try to help.

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008 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
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* 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.
Klaus Darilion replied to Andreas Marschall [exMVP TAPI] on 12-Nov-10 11:32 AM
Am 10.11.2010 21:33, schrieb Andreas Marschall [exMVP TAPI]:

Just for clarification: The free SIPTAPI available from sourceforge does
not support incoming call indication. If you want to add incoming call
indication you need to extend SIPTAPI to REGISTER to the SIP proxy and
on incoming INVITE you have to trigger the LINE_NEWCALL message.
(Probably there is pieces of code already implemented as the free
SIPTAPI is based on AstTAPI).

Another possibility would be to get our commercial SIPTAPI which already
supports incoming call indication and also has multiline support. See
http://www.ipcom.at/telefonie/siptapi/ for more details or send me an
e-mail.


regards
Klaus
Thomas Dupont replied to Klaus Darilion on 15-Nov-10 04:20 AM
Hi Andreas, Hi Klaus,


Andreas>
The TSP fires a LINE_NEWCALL message, followed by a message
LINE_CALLSTATE - LINECALLSTATE_OFFERING
and LINECALLSTATE_ACCEPTED. But is this correct ?

Yes, I have a problem with the TSP and not with the TAPI
application ... I tried several TAPI applications to make sure that
the problem was that the TSP.

I will still watch the TSP with a new look and especially the
function ::CreateCallAppearance().
Thank you very much for these indications. For over a month since I
work on this problem.

Klaus>
Thank you for your help. Effectively SIPTAPI does not support incoming
calls. But the SIP system developed by my company takes proper account
of incoming calls.
This is so for me to make a TSP that supports incoming calls.


Thank you to both for your help, I will do some tests and try to be more
accurate if it does not work.

Regards,

Thomas.
Andreas Marschall [exMVP TAPI] replied to Thomas Dupont on 22-Nov-10 04:04 AM
Thomas,
If a TSP want to inform TAPI about a new call (e.g. incoming) it is
required to send a LINE_NEWCALL message, immediately followed by an
initial LINE_CALLSTATE message (for an incoming call this would be
LINECALLSTATE_OFFERING).
LINECALLSTATE_ACCEPTED is usually fired after TSPI_lineAccept() has
been called.




You are welcome.

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008 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
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* 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.