I´m using a Siemens HiPath 3000 PBX and have written a small "TAPI Sniffer".
It works good, except showing the wrong numbers! :-(
Ther CallerID I get from TAPI is not the phone number of the caller, it is
the number of the trunk the call comes in. Can anyone help me, please?
best regards
Gero
Gero,
I presume you are using 1st party TSP CallBridge TA/TU/IP? Or is it a 3rd
party TSP (e.g. HT170)?
I the (external) caller has CLIR (Calling Line Information presentation
Restriction) activated then you get the trunc code presented instead.
What does the display of the optiPoint / optiset E say in such a scenario?
I guess it says "Call: Trunk" instead of "Call: 555-5555"
--
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.
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> schrieb im
Newsbeitrag news:ushGjNGe...@TK2MSFTNGP12.phx.gbl...
Gero,
o.k., please provide a TB20.log with LINECALLINFO indication the issue.
Tapi Browser says: "select a call", but there is no call. I should look in a
tb20.exe tutorial first... ;-)
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> schrieb im
Newsbeitrag news:umvIqXGe...@tk2msftngp13.phx.gbl...
Gero,
reading the manual is always a good option...
Did you lineOpen() with dwPrivileges set to at least _MONITOR ?
Do you get LINE_APPNEWCALL / LINE_CALLSTATE messages on an incoming call ?
12:2.14.794 : Calling lineInitialize
12:2.14.794 : lineInitialize returned SUCCESS
num line devs = 12
12:2.28.274 : Calling lineNegotiateAPIVersion
12:2.28.274 : lineNegotiateAPIVersion returned SUCCESS
APIVersion=x10004
extID.ID0=x0, .ID1=x0, .ID2=x0, .ID3=x0,
12:2.48.573 : Calling lineOpen
12:2.48.573 : lineOpen returned SUCCESS
12:2.52.909 : Calling lineOpen
12:2.52.909 : lineOpen returned SUCCESS
12:2.58.507 : Calling lineOpen
12:2.58.517 : lineOpen returned SUCCESS
12:3.4.526 : Calling lineOpen
12:3.4.526 : lineOpen returned SUCCESS
12:3.10.955 : Calling lineOpen
12:3.10.955 : lineOpen returned SUCCESS
12:3.16.673 : Calling lineOpen
12:3.16.673 : lineOpen returned SUCCESS
12:3.21.270 : Calling lineOpen
12:3.21.270 : lineOpen returned SUCCESS
12:3.25.486 : Calling lineOpen
12:3.25.486 : lineOpen returned SUCCESS
12:3.30.744 : Calling lineOpen
12:3.30.754 : lineOpen returned SUCCESS
12:3.34.669 : Calling lineOpen
12:3.34.669 : lineOpen returned SUCCESS
12:3.38.645 : Calling lineOpen
12:3.38.645 : lineOpen returned SUCCESS
12:3.42.901 : Calling lineOpen
12:3.42.901 : lineOpen returned LINEERR_NODEVICE
12:4.15.939 : received LINE_CALLSTATE
device=x10304
cbInst=x0
param1=x2, OFFERING
param2=x1, ACTIVE
param3=x2, MONITOR
lineGetCallInfo returned x0, hLine=x102ae
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x100, ORIGIN
param2=x0,
param3=x0,
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x8000, CALLERID
param2=x0,
param3=x0,
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x10000, CALLEDID
param2=x0,
param3=x0,
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x80000, REDIRECTINGID
param2=x0,
param3=x0,
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x40000, REDIRECTIONID
param2=x0,
param3=x0,
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x40, CALLID
param2=x0,
param3=x0,
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x80, RELATEDCALLID
param2=x0,
param3=x0,
12:4.15.939 : received LINE_CALLINFO
device=x10304
cbInst=x0
param1=x200, REASON
param2=x0,
param3=x0,
12:4.18.122 : Calling lineGetCallInfo
12:4.18.122 : lineGetCallInfo returned SUCCESS
LINECALLINFO
dwTotalSize=x1000
dwNeededSize=x185
dwUsedSize=x185
hLine=x102ae
dwLineDeviceID=x9
dwBearerMode=x1, VOICE
dwMediaMode=x4, INTERACTIVEVOICE
dwCallID=xbef
dwRelatedCallID=xbef
dwCallParamFlags=x8e, IDLE BLOCKID ORIGOFFHOOK ONESTEPTRANSFER
dwCallStates=xfffb, IDLE OFFERING DIALTONE DIALING
RINGBACK BUSY SPECIALINFO CONNECTED PROCEEDING
ONHOLD CONFERENCED ONHOLDPENDCONF ONHOLDPENDTRANSFER
DISCONNECTED UNKNOWN
dwOrigin=x2, INTERNAL
dwReason=x8, FWDUNCOND
dwNumMonitors=x1
dwTrunk=xffffffff
dwCallerIDFlags=x8, ADDRESS
dwCallerIDSize=x6
dwCallerIDOffset=x156
xxxx3738 xxxxxxxx xxxxxxxx xxxxxxxx 87
00313038 xxxxxxxx xxxxxxxx xxxxxxxx 801.
dwCalledIDFlags=x8, ADDRESS
dwCalledIDSize=x3
dwCalledIDOffset=x150
xx003637 xxxxxxxx xxxxxxxx xxxxxxxx 76.
dwConnectedIDFlags=x20, UNKNOWN
dwConnectedIDSize=x1
dwConnectedIDOffset=x162
xxxxxx00 xxxxxxxx xxxxxxxx xxxxxxxx .
dwRedirectionIDFlags=x8, ADDRESS
dwRedirectionIDSize=x3
dwRedirectionIDOffset=x164
xx003637 xxxxxxxx xxxxxxxx xxxxxxxx 76.
dwRedirectingIDFlags=x8, ADDRESS
dwRedirectingIDSize=xd
dwRedirectingIDOffset=x16a
xxxx3130 xxxxxxxx xxxxxxxx xxxxxxxx 01
32393036 30363738 xx003730 xxxxxxxx 6092876007.
dwDisplayableAddressSize=x6
dwDisplayableAddressOffset=x144
30383738 xxxx0031 xxxxxxxx xxxxxxxx 87801.
dwChargingInfoSize=x1
dwChargingInfoOffset=x184
xxxxxx00 xxxxxxxx xxxxxxxx xxxxxxxx .
12:4.18.122 : Calling lineGetCallStatus
12:4.18.122 : lineGetCallStatus returned SUCCESS
LINECALLSTATUS
dwTotalSize=x1000
dwNeededSize=x38
dwUsedSize=x38
dwCallState=x2, OFFERING
dwCallStateMode=x1
dwCallPrivilege=x2, MONITOR
dwCallFeatures=xa0020084, ANSWER DROP REDIRECT SETTREATMENT
SETCALLDATA
tStateEntryTime[0]=x807d4
tStateEntryTime[1]=x20001
tStateEntryTime[2]=x4000a
tStateEntryTime[3]=x3ab000f
12:4.24.261 : Calling lineGetCallInfo
12:4.24.261 : lineGetCallInfo returned SUCCESS
LINECALLINFO
dwTotalSize=x1000
dwNeededSize=x185
dwUsedSize=x185
hLine=x102ae
dwLineDeviceID=x9
dwBearerMode=x1, VOICE
dwMediaMode=x4, INTERACTIVEVOICE
dwCallID=xbef
dwRelatedCallID=xbef
dwCallParamFlags=x8e, IDLE BLOCKID ORIGOFFHOOK ONESTEPTRANSFER
dwCallStates=xfffb, IDLE OFFERING DIALTONE DIALING
RINGBACK BUSY SPECIALINFO CONNECTED PROCEEDING
ONHOLD CONFERENCED ONHOLDPENDCONF ONHOLDPENDTRANSFER
DISCONNECTED UNKNOWN
dwOrigin=x2, INTERNAL
dwReason=x8, FWDUNCOND
dwNumMonitors=x1
dwTrunk=xffffffff
dwCallerIDFlags=x8, ADDRESS
dwCallerIDSize=x6
dwCallerIDOffset=x156
xxxx3738 xxxxxxxx xxxxxxxx xxxxxxxx 87
00313038 xxxxxxxx xxxxxxxx xxxxxxxx 801.
dwCalledIDFlags=x8, ADDRESS
dwCalledIDSize=x3
dwCalledIDOffset=x150
xx003637 xxxxxxxx xxxxxxxx xxxxxxxx 76.
dwConnectedIDFlags=x20, UNKNOWN
dwConnectedIDSize=x1
dwConnectedIDOffset=x162
xxxxxx00 xxxxxxxx xxxxxxxx xxxxxxxx .
dwRedirectionIDFlags=x8, ADDRESS
dwRedirectionIDSize=x3
dwRedirectionIDOffset=x164
xx003637 xxxxxxxx xxxxxxxx xxxxxxxx 76.
dwRedirectingIDFlags=x8, ADDRESS
dwRedirectingIDSize=xd
dwRedirectingIDOffset=x16a
xxxx3130 xxxxxxxx xxxxxxxx xxxxxxxx 01
32393036 30363738 xx003730 xxxxxxxx 6092876007.
dwDisplayableAddressSize=x6
dwDisplayableAddressOffset=x144
30383738 xxxx0031 xxxxxxxx xxxxxxxx 87801.
dwChargingInfoSize=x1
dwChargingInfoOffset=x184
xxxxxx00 xxxxxxxx xxxxxxxx xxxxxxxx .
12:4.28.717 : Calling lineGetCallInfo
12:4.28.717 : lineGetCallInfo returned SUCCESS
LINECALLINFO
dwTotalSize=x1000
dwNeededSize=x185
dwUsedSize=x185
hLine=x102ae
dwLineDeviceID=x9
dwBearerMode=x1, VOICE
dwMediaMode=x4, INTERACTIVEVOICE
dwCallID=xbef
dwRelatedCallID=xbef
dwCallParamFlags=x8e, IDLE BLOCKID ORIGOFFHOOK ONESTEPTRANSFER
dwCallStates=xfffb, IDLE OFFERING DIALTONE DIALING
RINGBACK BUSY SPECIALINFO CONNECTED PROCEEDING
ONHOLD CONFERENCED ONHOLDPENDCONF ONHOLDPENDTRANSFER
DISCONNECTED UNKNOWN
dwOrigin=x2, INTERNAL
dwReason=x8, FWDUNCOND
dwNumMonitors=x1
dwTrunk=xffffffff
dwCallerIDFlags=x8, ADDRESS
dwCallerIDSize=x6
dwCallerIDOffset=x156
xxxx3738 xxxxxxxx xxxxxxxx xxxxxxxx 87
00313038 xxxxxxxx xxxxxxxx xxxxxxxx 801.
dwCalledIDFlags=x8, ADDRESS
dwCalledIDSize=x3
dwCalledIDOffset=x150
xx003637 xxxxxxxx xxxxxxxx xxxxxxxx 76.
dwConnectedIDFlags=x20, UNKNOWN
dwConnectedIDSize=x1
dwConnectedIDOffset=x162
xxxxxx00 xxxxxxxx xxxxxxxx xxxxxxxx .
dwRedirectionIDFlags=x8, ADDRESS
dwRedirectionIDSize=x3
dwRedirectionIDOffset=x164
xx003637 xxxxxxxx xxxxxxxx xxxxxxxx 76.
dwRedirectingIDFlags=x8, ADDRESS
dwRedirectingIDSize=xd
dwRedirectingIDOffset=x16a
xxxx3130 xxxxxxxx xxxxxxxx xxxxxxxx 01
32393036 30363738 xx003730 xxxxxxxx 6092876007.
dwDisplayableAddressSize=x6
dwDisplayableAddressOffset=x144
30383738 xxxx0031 xxxxxxxx xxxxxxxx 87801.
dwChargingInfoSize=x1
dwChargingInfoOffset=x184
xxxxxx00 xxxxxxxx xxxxxxxx xxxxxxxx .
12:4.32.162 : received LINE_CALLSTATE
device=x10304
cbInst=x0
param1=x1, IDLE
param2=x0,
param3=x0,
12:4.32.162 : lineGetCallStatus returned SUCCESS
Call x10304 deallocated on IDLE
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> schrieb im
Newsbeitrag news:uryOBZH...@tk2msftngp13.phx.gbl...
> 12:4.15.939 : received LINE_CALLSTATE
> device=x10304
> cbInst=x0
> param1=x2, OFFERING
> param2=x1, ACTIVE
> param3=x2, MONITOR
> 12:4.18.122 : Calling lineGetCallInfo
> 12:4.18.122 : lineGetCallInfo returned SUCCESS
> LINECALLINFO
> dwOrigin=x2, INTERNAL
> dwReason=x8, FWDUNCOND
Gero, some general recommendations on TB20 usage:
- use lineIntializeEx (instead of lineIntialize) to be able to negotiate to
TAPI 2.x (instead of 1.x)
- enable Options-LogParameters
- if you want to open all lines: there is a function "Open all lines" in the
left pane nearly at the bottom
From LINECALLINFO you can these IDs:
- 87801 (CallerID, DisplayableAddress) presumable the trunk code
- 76 (CalledID, RedirectionID) presumable the internal call no. of your phone
- 016092876007 (RedirectingID) presumable the call no. of your cell phone that
was used to call in.
in addition this is interesting:
> dwOrigin=x2, INTERNAL
> dwReason=x8, FWDUNCOND
> dwTrunk=xffffffff
This indicates that there was some kind of forwarding, routing, distribution
within HiPath 3000 PBX.
Did you call your extension -76 directly?
Is your extension -76 member of a UCD or MULAP or other group?
What file verion does the HcmO_3rd.TSP have (in \system32\) ?
thanks a lot! ;-)
Yes, 87801 is the trunk code. 76 is my internal number. And 016092876007 is
the number I wanted to see. :-)
I haven´t seen it in the log, because I didn´t expected the number to start
with 6092...
I have called my extension 76 directly! 76 is not in a UCD or MULAP group!
The file version of the HcmO_3rd.TSP is 3.2.0.639
kindly regards
Gero
Gero,
AFAIK the latest TSP version is 3.2.0.642 included in HT170 Build 44 at HiPath
Ready Download.
And HT170 Build 45 should be available in the near future (if not already out
by now).
The ID presentation in TB20 is more like a hex dump of the memory and not
primarly focussing readability of the ASCII/Unicode output, so any long
numbers may end up a little bit fragmented.
Please take a look at HT170 TSP configuration in
ControlPanel->PhoneAndModemOptiosn->Advanced:
- what General->System is configured?
- what Advanced->TrunkCodeStart/Stop is configured?
the configured system is "HiPath 3000" (NOT "HiPath 3000/5000 V4.0"). Trunks
start at 7801 and end at 7806 (we have three NTBA´s). Is this configuration
okay? B.t.w if the HT170 TSP is changed to a newer version, will I have to
add the lines in the new TSP manually (or can the configuration be
transfered)? I will now try to fix my "TAPI Sniffer", using the LINECALLINFO
structure and the lineGetCallInfo() function. :-)
Thanks a lot for providing so much information!
Greetings
Gero
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> schrieb im
Newsbeitrag news:u8HVHZI...@TK2MSFTNGP09.phx.gbl...
Gero,
try configuring the trunk properly according to your HiPath configuration,
i.e. the range including your trunk 8780l.
You can export / import the TSP configuration.
thanks a lot. The "real TSP" (I´m using another one with DEMOLICENCE) was
configured by an Siemens technician with the same (wrong) trunk numbers
(8701 - 8706)!?!
Greetings
Gero
Gero,
so the problem is solved by correcting the TSP configuration?
Gero
Gero,
yes dwCallerIDSize / dwCallerIDOffset shoud reference the your mobile phone
number in your scenario.
If it won't then we need to do some more analyses (e.g. CSTA trace on CTI link
to HiPath).
Btw. what features does your "TAPI Sniffer" provide?
You may want to take a look at JulMar's TAPI tools Phone and TCMon.
See my TAPI and TSPI FAQ:
Q: Are there any Tools for TAPI available ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_Are_there_5
yes, the problem is solved. With correct trunk start / end the
dwCallerIDSize / dwCallerIDOffset contains the mobile phone number. With
wrong trunk start / end this number can be found in dwRedirectingIDSize /
dwRedirectingIDOffset. My TAPI Sniffer is a very simple application and
provides no Features! It only sends the CallerID number via UDP to another
processes (e. g. my own CTI process, which uses files for detecting country
/ area names in the phone number. Some other information is looked up in our
SQL server database. To this server process are some clients connected,
which wait in the system tray of windows2000 to show some PopUp when a call
arrives for the user/group. The client allows some operations on the call
data.). I know the JulMar Tools, but afaik they all use MFC - and I hate MFC
;-) I prefer running the server code as win32 service. No need for GUI on
this side. The client uses Qt (a wonderful class library for GUI
programming).
Thanks a lot!
Best Regards
Gero
"Andreas Marschall [MVP TAPI]" <Andreas....@I-B-A-M.de> schrieb im
Newsbeitrag news:ucTHycPe...@TK2MSFTNGP09.phx.gbl...
If it helps you, check out this link and sample program. We have
components already that handle all of this on a Siemens PBX and and
Siemens USB phones.
http://www.exceletel.com/products/TeleTools/SamplePrograms/etSiemens/index.htm
Fred
ExceleTel
"TAPI tools for telephony programmers"