1. Brekeke Product Name and version:
JTAPI1.0 and PBX 2.0.2.2
2. Java version:
1.6
3. OS type and the version:
Windows XP SP 2
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
Pattern 8
6. Your problem:
I've modified the CalloutPlay demo to be a runnable thread. When I run one thread, it works fine but when I try to run two threads (to call out to two destinations simultaneously), the second thread get's the following error when I call mycall.connect:
[main] ERROR (BrCall.java:269) -
javax.telephony.InvalidStateException
at com.brekeke.jtapi.BrCall.connect(BrCall.java:165)
at GetPINThread.run(GetPIN.java:102)
at GetPIN.main(GetPIN.java:20)
Right before I call mycall.connect, I've inserted the following code:
System.out.println("Placing Call To " + DialNo +
" From Term " + origterm.getName() +
" From Addr " + origaddr.getName() +
" From Call " + mycall.toString());
The first thread prints:
Placing Call To 917044880282 From Term 101 From Addr 101 From Call com.brekeke.jtapi.callcontrol.BrCallControlCall@19113f8
and the second thread prints:
Placing Call To 919170410549 From Term 102 From Addr 102 From Call com.brekeke.jtapi.callcontrol.BrCallControlCall@1c208b0
I'm reasonably sure I'm not sharing variables between the class instances - I've changed the static's to private's.
The first call still works...
Is there a problem using the API multi-threaded, or am I doing something wrong ?
Thanks,
Bob A.
Multi-Threading Problem using JTAPI
Moderator: Brekeke Support Team
-
- Posts: 5
- Joined: Sat Apr 07, 2007 10:19 am
- Location: Charlotte NC
-
- Posts: 5
- Joined: Sat Apr 07, 2007 10:19 am
- Location: Charlotte NC