Author |
Message |
![[Post New]](/images/forum/icon_minipost_new.gif) 17/02/2015 15:30:57
![[Up]](/images/forum/icon_up.gif)
#1
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
I was trying to divert a call to a conference bridge after I collected digits in the MediaListener and I got this exception:
java.lang.IllegalStateException: divertTo called in illegalServiceState
I have attached screenshots for both Log file and Code.
Could anyone help me with this ? Thanks !
|
Filename |
2.jpg |
Download
|
Description |
Screenshot of the Code |
Filesize |
65 Kbytes
|
Downloaded: |
295 time(s) |
|
Filename |
1.jpg |
Download
|
Description |
Screenshot of the Log File |
Filesize |
89 Kbytes
|
Downloaded: |
322 time(s) |
This message was edited 2 times. Last update was at 17/02/2015 15:33:44
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 17/02/2015 21:25:14
![[Up]](/images/forum/icon_up.gif)
#2
|
JoelEzell
Joined: 15/11/2013 10:26:35
Messages: 780
Offline
|
Hello, can you please show us your code in callIntercepted as well? If you're not already doing so, you may want to try invoking call.suspend() from this callback method. The call should automatically be suspended if a media operation is invoked in callIntercepted, but it would be interesting to know if this solves your problem.
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 10:50:10
![[Up]](/images/forum/icon_up.gif)
#3
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
Hi,
Here is a screenshot of my callListener.
Should I put call.suspend() in the callAnswered() before I play the announcement ?
And what should I do after I collect the digits ?
Thanks !
|
Filename |
3.jpg |
Download
|
Description |
Screenshot of callListener Class |
Filesize |
38 Kbytes
|
Downloaded: |
309 time(s) |
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 11:16:06
![[Up]](/images/forum/icon_up.gif)
#4
|
JoelEzell
Joined: 15/11/2013 10:26:35
Messages: 780
Offline
|
I think we need to back up a little bit. Can you please say a little more about your expected call flow? divertTo is used when a call is intercepted between A and B. A calls B's number, but your snap-in is invoked before the call gets to B. At this point, your snap-in would be invoked via the callIntercepted callback.
It looks like this is perhaps not the flow you're going after. Can you please clarify?
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 11:46:48
![[Up]](/images/forum/icon_up.gif)
#5
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
Yes of cause. My flow is like this (which is same as the other post):
1. Create a call from A to B ->
2. When A answers, intercept the call and play an announcement ->
3. After announcement completed, use the media listener to collect digits ->
4. If user input 1 then end the interception and call B then merge A with B, otherwise drop the call.
This is basically to merge a Sip number to a conferencing bridge with a PIN code.
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 11:51:39
![[Up]](/images/forum/icon_up.gif)
#6
|
JoelEzell
Joined: 15/11/2013 10:26:35
Messages: 780
Offline
|
OK, in that case, please try the flow I suggested in the other post. This sort of 2-party make call is modeled perhaps a bit differently than you might have thought. callAlerting and callAnswered callbacks are not invoked on the call to the A leg. Instead, when A answers, callOriginated is invoked. In this callback, invoke call.suspend() (this may not be needed) and then invoke your play and collect operation. Once you get the digitsCollected callback, invoke allow() or drop().
Let us know how that goes!
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 12:04:31
![[Up]](/images/forum/icon_up.gif)
#7
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
I saw in the digitsCollected() function it says call.allow() is not supported.
How should I ends the interception so that it continues the B leg ?
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 12:21:06
![[Up]](/images/forum/icon_up.gif)
#8
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
I tried to put myCall.allow() under digitsCollected() in MediaListener() after I have the digits. But when I test it, it doesn't continue the call after I press "1".
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 13:01:21
![[Up]](/images/forum/icon_up.gif)
#9
|
JoelEzell
Joined: 15/11/2013 10:26:35
Messages: 780
Offline
|
Hmm, I'm not sure what to tell you. I just tried this out in my lab and it worked fine. I did find that I had to invoke call.suspend() within call.originated(), in addition to my play and collect operation.
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 13:02:08
![[Up]](/images/forum/icon_up.gif)
#10
|
JoelEzell
Joined: 15/11/2013 10:26:35
Messages: 780
Offline
|
Do you see any error logs? Also, what version of Engagement Development Platform (Colloboration Environment) are you using?
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 13:39:20
![[Up]](/images/forum/icon_up.gif)
#11
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
There is no error in the log. After I pressed "1", it went to the digitsCollected() where I invoked myCall.allow() and unable to continue the call. The call is not dropped either. I'm using CE 3.0.3.0.303003.
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 13:42:46
![[Up]](/images/forum/icon_up.gif)
#12
|
JoelEzell
Joined: 15/11/2013 10:26:35
Messages: 780
Offline
|
OK. I'm sorry, but I think we've done about as much as possible through the forums. I'd encourage you to open a DevConnect ticket for further support if you're not able to get things working on your own.
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 13:47:49
![[Up]](/images/forum/icon_up.gif)
#13
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
OK. Thank you very much. I will do more test on my own first.
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 13:54:25
![[Up]](/images/forum/icon_up.gif)
#14
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
I found out that after I pressed "1", it actually went into callOriginated() again and played the announcement again.
|
|
 |
![[Post New]](/images/forum/icon_minipost_new.gif) 18/02/2015 14:10:44
![[Up]](/images/forum/icon_up.gif)
#15
|
liu159
Joined: 19/01/2015 10:11:20
Messages: 96
Offline
|
Then after I pressed "1" second time it will connect me to the conference room but without playing the conference announcement.
|
|
 |
|