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

Julmar ATAPI: no more TAPI-Events after MakeCall

493 views
Skip to first unread message

Gottfried Pauler

unread,
May 27, 2009, 3:38:31 AM5/27/09
to
Hello,

I am using Julmar's ATAPI Class in my program.
At the start of the program I create one instance of TapiManager to
monitor a single line to show who is calling.

When a telefon-nubmer shall be called from the software, I create a
second instance of TapiManger, get the line for making the call, make
the call, close the line and shutdown this instance of TapiManager.
The first instance shows the changing status of the Line till it gets
idle again and from then no further event is raised. Why? Is there
anything that I am doing wrong?


The Instance for monitoring the line:

myTAPI = New JulMar.Atapi.TapiManager("ProjectX")
If Not myTAPI.Initialize Then
MsgBox("Fehler beim Initialisieren der TAPI-Schnittstelle",
MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "TAPI-Fehler")
Exit Sub
End If
myTapiLine1 = myTAPI.GetLineByName(My.Settings.TAPI_Line1, True)
AddHandler myTAPI.CallStateChanged, AddressOf TAPI_OnCallStateChanged
AddHandler myTAPI.NewCall, AddressOf TAPI_OnNewCall
AddHandler myTAPI.CallInfoChanged, AddressOf TAPI_OnCallInfoChange
myTapiLine1.Monitor()


The Instance for making a call:

Dim cTapiMgr As New JulMar.Atapi.TapiManager("ProjectX_Anwahl")
cTapiMgr.Initialize()
Try
Dim cLine As
JulMar.Atapi.TapiLine=TapiMgr.GetLineByName(My.Settings.TAPI_Line1, True)
cLine.Open(cLine.Capabilities.MediaModes)
Dim cAddress As JulMar.Atapi.TapiAddress = cLine.Addresses(0)
Dim cCall As JulMar.Atapi.TapiCall =
cAddress.MakeCall(My.Settings.TAPI_Amtskennziffer &
CTelefonData.nummer_normalized)
cLine.Close()
Finally
cTapiMgr.Shutdown()
End Try


Andreas Marschall [MVP TAPI]

unread,
May 27, 2009, 10:38:01 AM5/27/09
to
"Gottfried Pauler" <NOSPAMgottf...@aon.atNOSPAM> schrieb im
Newsbeitrag news:f067c$4a1cedf7$557c9759$25...@news.inode.at...

> I am using Julmar's ATAPI Class in my program.
> At the start of the program I create one instance of TapiManager to
> monitor a single line to show who is calling.
>
> When a telefon-nubmer shall be called from the software, I create a
> second instance of TapiManger, get the line for making the call, make
> the call, close the line and shutdown this instance of TapiManager.
> The first instance shows the changing status of the Line till it gets
> idle again and from then no further event is raised. Why? Is there
> anything that I am doing wrong?

Gottfried,
why are you using two instances?
I guess you are monitoring and makeCall on the same line device?

I suggest not to initialite, open, close shutdown for each and every makeCall,
but to use a single instance for all your operations from the start of you app
till exit.

BTW what device / TSP are you using?

--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++
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.

Diego Martinoia

unread,
May 27, 2009, 3:44:19 PM5/27/09
to
As Andreas said, it's not wise to use more than one tapi object, as they
might mess with each other.
If you really has some reason to shut things down, then play with opening
and closing the address/line object, not the tapi object

In data 27 maggio 2009 alle ore 16:38:01, Andreas Marschall [MVP TAPI]
<Andreas....@i-b-a-m.de> ha scritto:

> "Gottfried Pauler" <NOSPAMgottf...@aon.atNOSPAM> schrieb im
> Newsbeitrag news:f067c$4a1cedf7$557c9759$25...@news.inode.at...
>> I am using Julmar's ATAPI Class in my program.
>> At the start of the program I create one instance of TapiManager to
>> monitor a single line to show who is calling.
>>
>> When a telefon-nubmer shall be called from the software, I create a
>> second instance of TapiManger, get the line for making the call, make
>> the call, close the line and shutdown this instance of TapiManager.
>> The first instance shows the changing status of the Line till it gets
>> idle again and from then no further event is raised. Why? Is there
>> anything that I am doing wrong?
>
> Gottfried,
> why are you using two instances?
> I guess you are monitoring and makeCall on the same line device?
>
> I suggest not to initialite, open, close shutdown for each and every
> makeCall,
> but to use a single instance for all your operations from the start of
> you app
> till exit.
>
> BTW what device / TSP are you using?
>

--
"No One Ever Told Computers Were Going To Be Polite"

Gottfried Pauler

unread,
May 28, 2009, 1:20:32 AM5/28/09
to
Hallo and thank you for your replay,

> why are you using two instances?

The main reason is that I am using an own threat for monitoring the line
and an own threat for making calls so that the GUI-thread is not blocked.

> I guess you are monitoring and makeCall on the same line device?

Yes, it is the same line.

>
> I suggest not to initialite, open, close shutdown for each and every makeCall,
> but to use a single instance for all your operations from the start of you app
> till exit.

I will redesign my programm to only use one instance.

>
> BTW what device / TSP are you using?
>

Auerswald ETS4308 is connected by RS232 to a Win2000 Server with
TAPI-Server running.

The TAPI-Events are comming rather slow/late over the net and MakeCall
takes two to three seconds so I decided to put the TAPI-handling into
own threads.

Regards,
Gottfried

Matthias Moetje [MVP]

unread,
May 31, 2009, 5:49:24 PM5/31/09
to
Gottfried,

you can still use several threads when you use a single instance.

Why does lineMakeCall take so long "over the net" when you
are using RS232 to connect?

Best regards,

Matthias Moetje
-------------------------------------
TAPI WIKI: http://www.tapi.info
-------------------------------------
TERASENS GmbH
Augustenstra�e 24
80333 Munich, GERMANY
-------------------------------------
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------

"Gottfried Pauler" <NOSPAMgottf...@aon.at> wrote in message
news:4a1e1f20$0$11923$91ce...@newsreader04.highway.telekom.at...

Gottfried Pauler

unread,
Jun 1, 2009, 10:10:35 AM6/1/09
to
Hello,


>
> Why does lineMakeCall take so long "over the net" when you
> are using RS232 to connect?
>

I really do not know where the delay comes from - maybe it is the
switchboard itself. The network is 100Mbit and there is very low
traffic; so the communication between the TAPI-Server and client can not
be the problem.
Every software shows that delay - not only my program.
When you lift the handset it takes about one second till the
StatusChange is reported. What is the typical delay for such an event
with a professinal / new switchboard?


Regards,
Gottfried

Matthias Moetje [MVP]

unread,
Jun 2, 2009, 8:29:03 PM6/2/09
to
Gottfried,

usually this should be much faster.

To eliminate network issues (consider not only the physical bandwidth but
also such things as wrong DNS or authentication configuration) you should
first test with a TAPI application directly on the server that is connected
to the PBX.

Best regards,

Matthias Moetje
-------------------------------------
TAPI WIKI: http://www.tapi.info
-------------------------------------
TERASENS GmbH
Augustenstra�e 24
80333 Munich, GERMANY
-------------------------------------
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------

"Gottfried Pauler" <NOSPAMgottf...@aon.at> wrote in message

news:4a23e166$0$2298$91ce...@newsreader01.highway.telekom.at...

Andreas Marschall [MVP TAPI]

unread,
Jun 4, 2009, 9:19:59 AM6/4/09
to
"Gottfried Pauler" <NOSPAMgottf...@aon.at> schrieb im Newsbeitrag
news:4a23e166$0$2298$91ce...@newsreader01.highway.telekom.at...

> I really do not know where the delay comes from - maybe it is the
> switchboard itself. The network is 100Mbit and there is very low
> traffic; so the communication between the TAPI-Server and client can not
> be the problem.
> Every software shows that delay - not only my program.
> When you lift the handset it takes about one second till the
> StatusChange is reported. What is the typical delay for such an event
> with a professinal / new switchboard?

Gottfried,
are you using the MS TAPI client/server architecture (i.e. Remnote TSP) ?
See my TAPI and TSPI FAQ:
Q: What is the Microsoft� TAPI client / server architecture ?
http://www.i-b-a-m.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm#_Q:_What_is_10

If so, then this may be the cause of the issue:
http://groups.google.com/group/microsoft.public.win32.programmer.tapi/browse_thread/thread/0af738caeb40dbdc/fc0893ac5ac1e8ee?hl=en#fc0893ac5ac1e8ee

0 new messages