Skip to content

Commit

Permalink
Cherry pick from 139797b with modifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghjansen committed Nov 26, 2017
1 parent 9159997 commit 9ba8ce2
Showing 1 changed file with 10 additions and 10 deletions.
Expand Up @@ -781,10 +781,6 @@ private void onMediaGroupResponse(Object message) throws TransitionFailedExcepti
fsm.transition(message, ready);
} else if (is(creatingRecording)) {
fsm.transition(message, finishRecording);
} else if (is(forking)){
// Moving to next verb since received confirmation from Stop, requested at checkDialBranch
final GetNextVerb next = new GetNextVerb();
parser.tell(next, self());
}
// This is either MMS collected digits or SIP INFO DTMF. If the DTMF is from SIP INFO, then more DTMF might
// come later
Expand Down Expand Up @@ -820,6 +816,11 @@ else if (is(gathering) || (is(finishGathering) && !super.dtmfReceived)) {
// Finally proceed with call bridging
final JoinCalls bridgeCalls = new JoinCalls(call, outboundCall);
bridge.tell(bridgeCalls, self());
} else if (is(forking)){
if(dialBranches == null || dialBranches.size() == 0){
final GetNextVerb next = new GetNextVerb();
parser.tell(next, self());
}
}
} else {
fsm.transition(message, hangingUp);
Expand Down Expand Up @@ -1167,6 +1168,10 @@ private void onCallStateChanged(Object message, ActorRef sender) throws Transiti
removeDialBranch(message, sender);
}
checkDialBranch(message, sender, attribute);
if (dialBranches == null || dialBranches.size() == 0){
final StopMediaGroup stop = new StopMediaGroup();
call.tell(stop, sender);
}
return;
}
} else {
Expand Down Expand Up @@ -1335,12 +1340,7 @@ private void checkDialBranch(Object message, ActorRef sender, Attribute attribut
if (sender != null && !sender.equals(call)) {
callManager.tell(new DestroyCall(sender), self());
}
if(is(forking)){
// Stop ringing from inbound call when all branches are BUSY
// Explicit Stop must be send before continue with VI
final StopMediaGroup stop = new StopMediaGroup();
call.tell(stop, self());
} else if (parser != null) {
if (parser != null && !is(forking)) {
final GetNextVerb next = new GetNextVerb();
parser.tell(next, self());
}
Expand Down

0 comments on commit 9ba8ce2

Please sign in to comment.