Author Message
VisuM
Joined: Nov 10, 2013
Messages: 12
Offline

JTAPI thread goes into to stuck state and never returned
I am trying to set callforwarding on an address. The first request works fine and callforward gets set and any further requests on the same address does not processed

I tried setting first the callforward and then cancelling callforward. Cancellation never worked. tried multiple times by restarting my whole application.

When taken a thread dump , it shows the first callforward request holds lock on a vector object and second callforward request waiting for lock release.
***************************************************
code used

ITsapiAddress addr = (ITsapiAddress) getProvider().getAddress(userAddr);
CallControlForwarding[] ccf = new CallControlForwarding[1];
ccf[0] = new CallControlForwarding(destination,CallControlForwarding.FORWARD_UNCONDITIONALLY);
addr.setForwarding(ccf);

cancellation
addr.cancelForwarding();
****************************************************
JTAPI log

2013-09-12 14:01:47,545 TRACE [pool-11-thread-4] [TsapiCallControlForwarding] --> getType[]: com.avaya.jtapi.tsapi.impl.TsapiCallControlForwarding@1233bdc
2013-09-12 14:01:47,545 TRACE [pool-11-thread-4] [TsapiCallControlForwarding] <-- getType[]: com.avaya.jtapi.tsapi.impl.TsapiCallControlForwarding@1233bdc
2013-09-12 14:01:47,545 INFO [pool-11-thread-4] [TsapiSession] Sent InvokeID 26 for TSProvider[#1]@94b318
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] CSTASetFwd ::=
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] {
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] device "6356262"
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] forward
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] {
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] forwardingType 0 < FWD_IMMEDIATE >
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] forwardingOn FALSE
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] forwardDN "5679004"
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] }
2013-09-12 14:01:47,545 DEBUG [pool-11-thread-4] [TsapiSession] }
2013-09-12 14:01:47,694 INFO [GetEventThread] [TsapiSession] Received invokeID 26 for TSProvider[#1]@94b318
2013-09-12 14:01:47,694 DEBUG [GetEventThread] [TsapiSession] CSTASetFwdConfEvent ::=
2013-09-12 14:01:47,694 DEBUG [GetEventThread] [TsapiSession] {
2013-09-12 14:01:47,694 DEBUG [GetEventThread] [TsapiSession] NULL
2013-09-12 14:01:47,694 DEBUG [GetEventThread] [TsapiSession] }
2013-09-12 14:01:47,694 INFO [GetEventThread] [TsapiEventQueue] Putting event CSTAEvent[CSTASetFwdConfEvent]@1c1c9dc. EVENT Q SIZE = 1 MAX Q SIZE = 1 for
TSProvider[#1]@94b318
2013-09-12 14:01:47,694 INFO [DistributeCSTAEvent] [TsapiEventQueue] Getting event CSTAEvent[CSTASetFwdConfEvent]@1c1c9dc for TSProvider[#1]@94b318
2013-09-12 14:01:47,694 INFO [DistributeCSTAEvent] [TSInvokeID] Handling INVOKE ID 26 for TSProvider[#1]@94b318
2013-09-12 14:01:47,694 TRACE [DistributeCSTAEvent] [TsapiCallControlForwarding] com.avaya.jtapi.tsapi.impl.TsapiCallControlForwarding@1abbba1 constructed.

***************************************************
Thread dump
"pool-11-thread-4" prio=10 tid=0x9e927000 nid=0x4454 in Object.wait() [0x9f86c000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x893decd0> (a com.avaya.jtapi.tsapi.tsapiInterface.TSInvokeID)
at com.avaya.jtapi.tsapi.tsapiInterface.TSInvokeID.waitForConf(TSInvokeID.java:77)
- locked <0x893decd0> (a com.avaya.jtapi.tsapi.tsapiInterface.TSInvokeID)
at com.avaya.jtapi.tsapi.tsapiInterface.TsapiSession.send(TsapiSession.java:529)
at com.avaya.jtapi.tsapi.tsapiInterface.TsapiSession.send(TsapiSession.java:448)
at com.avaya.jtapi.tsapi.tsapiInterface.Tsapi.setFwd(Tsapi.java:1264)
at com.avaya.jtapi.tsapi.impl.core.TSDevice.cancelForwarding(TSDevice.java:1285)
- locked <0x8c3828a8> (a java.util.Vector)
at com.avaya.jtapi.tsapi.impl.TsapiAddress.cancelForwarding(TsapiAddress.java:610)
MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
It looks like you are using a JTAPI event thread to make the setForwarding() request.

You should not use a JTAPI thread to make a request to the API. You must always release the JTAPI event thread immediately and continue event processing (and making API calls) in a different thread.

Martin
VisuM
Joined: Nov 10, 2013
Messages: 12
Offline
Hi Martin,

it not a JTAPI thread.
The thread is initiated by my application for sure. and the callforwarding command is not set on an event alert

VisuM
Joined: Nov 10, 2013
Messages: 12
Offline
Hi Martin,

it not a JTAPI thread.
The thread is initiated by my application for sure. and the callforwarding command is not set on an event alert

MartinFlynn
Joined: Nov 30, 2009
Messages: 1922
Offline
I was not able to reproduce your problem in my lab. I suggest you try using the latest version of the JTAPI client. If that does not fix your problem, you can open a ticket using the "Technical Support" menu item on the left side of this webpage. Make sure to include all the JTAPI traces and a sample of code that causes the problem.

Martin
Go to:   
Mobile view