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

Using lineDevState ringing to count ringbacks as well as inbound rings?

3 views
Skip to first unread message

fdecker

unread,
Dec 30, 2009, 12:49:31 PM12/30/09
to
Hi,

One of the limitations of TAPI has always been the lack of foresight
to have a ringback counter like there is for a ring counter. On
inbound calls, you can get a lineDevState ringing message and have a
count parameter to check the rings. On outbound calls, you have a
lineCallState message instead and do not have parameters for holding a
call count. Some TSPs generate multiple ringback callstates, which I
always liked, but it has been suggested to use param2 of the
lineCallState message to put in a counter. In other words, if the
callstate message is ringback, check param2 and the TSP can put the
ring count in there. Is this a TSP controlled field? How would you
feel about using it this way instead of creating a device specific
function? Also, what about using the lineDevState message to hold the
ringback count on outbound calls in addition to using it to track
inbound rings?

I keep thinking that their could be some unintended consequence to
stretching the rules here but want to get a consensus, especially from
you guys with experience creating TSPs.

Fred

fdecker

unread,
Dec 30, 2009, 12:54:11 PM12/30/09
to
I'm guessing that one danger of using lineDevState is that you could
have an incoming call which would want to send a ring and you are also
using it to count ringbacks on an outbound call. I'm not sure that
could work and in any case might create extra coding for apps that
would only expect a ring event on inbound calls.

Fred

Andreas Marschall [exMVP TAPI]

unread,
Jan 5, 2010, 9:18:14 AM1/5/10
to
"fdecker" <fdecker...@aol.com> schrieb im Newsbeitrag
news:89eadda1-814e-427f...@j14g2000yqm.googlegroups.com...

> One of the limitations of TAPI has always been the lack of foresight
> to have a ringback counter like there is for a ring counter. On
> inbound calls, you can get a lineDevState ringing message and have a
> count parameter to check the rings.

Fred,
I guess you refer to LINE_LINEDEVSTATE message with LINEDEVSTATE_RINGING
(dwParam1),
ring mode (dwParam2), and ring count (dwParam3).

> On outbound calls, you have a
> lineCallState message instead and do not have parameters for holding a
> call count.

I guess you refer to LINE_CALLSTATE messages with LINECALLSTATE_RINGBACK
(dwParam1).
For incoming calls there is a corresponding LINE_CALLSTATE messages with
LINECALLSTATE_OFFERING (dwParam1).
(Surely you knew all this but I want to clarify things for others following
the discussion.)


> Some TSPs generate multiple ringback callstates, which I
> always liked,

IMO sending multiple LINE_CALLSTATE messages with the same LINECALLSTATE_ is
not TAPI conform because the are only to be sent "whenever the status of the
specified call has changed".
But the call state doesn't change when this "ringback counter" increases.
I'd regard this a TSP bug.

> but it has been suggested to use param2 of the
> lineCallState message to put in a counter.

If I may ask, suggested by whom?

> In other words, if the
> callstate message is ringback, check param2 and the TSP can put the
> ring count in there. Is this a TSP controlled field? How would you
> feel about using it this way instead of creating a device specific
> function?

I don't think this is a valid approach because neither the repetition of the
the same call state nor the not specified usage a of LINE_CALLSTATE
message's dwParam2 (in case of dwaram1 = LINECALLSTATE_RINGBACK) can be
found in MSDN.

For symmetrical reasons a "rinback counter" should be implemented the same
like the ring counter, .i.e. a LINE_LINEDEVSTATE message with a newly
defined "LINEDEVSTATE_RINGBACK" (dwParam1),
"ringback mode" (dwParam2), and "ringback count" (dwParam3),
BUT unfortunately MSDN says about LINEDEVSTATE_ Constants: No extensibility.
All 32 bits are reserved.
So this is not a valid way either (until you find someone at MS who is
willing and able to change/extend the specification).


> Also, what about using the lineDevState message to hold the
> ringback count on outbound calls in addition to using it to track
> inbound rings?

LINE_CALLDEVSPECIFIC or LINE_CALLDEVSPECIFICFEATURE messages seems to be the
only option left.

Please note that only the DEVSPECIFIC but not the DEVSPECIFICFEATURE stuff
has a TAPI3 correspondance.
but there is no "CS_RINGBACK" in TAPI3 anyway...


> I keep thinking that their could be some unintended consequence to
> stretching the rules here but want to get a consensus, especially from
> you guys with experience creating TSPs.

Apart from the things already mentioned above I see a problem for a TSP
getting the required info from the device / PBX.
Are there actually devices / PBXs that provide such ringback count infos via
their CTI-link?
E.g. the PBXs with CSTA-link I'm working with, do not provide such info.
What type of TAPI2 apps would use such a "ringback counter" for what
purpose?

--
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.

Andreas Marschall [exMVP TAPI]

unread,
Jan 5, 2010, 9:23:36 AM1/5/10
to
"fdecker" <fdecker...@aol.com> schrieb im Newsbeitrag
news:df832f7a-7c68-4314...@26g2000yqo.googlegroups.com...

Fred,
from your previous posting I was under the impression that you wanted to use
" multiple ringback callstates" messages but not "lineDevState" messages.
Please clarify.

0 new messages