Before these example features are executed, two legs are in the Leg Manager instance — callingParty linked to calledParty:

legMgr CallingLinkCalledLegs

Call Diversion on Busy

The feature diverts the call to a divertedCalledParty if the calledParty leg is busy.

Feature Execution Trigger Feature Action Required

1

calledParty.486

Send 181 to callingParty to notify the call has been diverted, unlink and release calledParty, and send INVITE to new diverted leg.

callingParty.sendMessage(response_181);
calledParty.unlinkLeg();
getLegManager().releaseLeg(calledParty);
Leg divertedLeg = getLegManager().createLeg(outgoingInvite, "callDiversion-divertedCalledParty");
callingParty.linkLeg(divertedLeg);

After these feature instructions have been executed, the Leg Manager instance will contain two legs — callingParty linked to callDiversion-divertedCalledParty:

legMgr CallingLinkDivertedCalledLegs

Early Media Announcements

The feature plays an announcement to the callingParty leg, and sends the invite to the calledParty leg once the announcement has been played.

Feature Execution Trigger Feature Action Required

1

Need to play announcement to callingParty before call is established

Send Invite to mrf, unlink callingParty from calledParty to stop Sentinel core from acting as a B2BUA between callingParty and calledParty, and suspend calledParty.

legManager.createLeg(invite, "playAnnouncement-mrf");
calledPartyLeg.suspend();
calledPartyLeg.unlinkLeg();
  • callingParty and mrf cannot be linked because the mrf will transition into midSession whilst the callingParty will remain in callSetup. Therefore the feature must manage the legs separately, sending the appropriate messages on each leg depending on the received messages.

  • Suspending calledParty prevents messages in the message queue being sent. The queued outgoing INVITE will not be sent until the leg is resumed.

After these feature instructions have been executed, the Leg Manager instance will contain three unlinked legs — callingParty, calledParty and mrf:

legMgr CallingCalledMrfLegs

2

mrf.inviteSuccess

Send reliable provisional 183 response to callingParty with the mrf offer

 callingParty.sendMessage(183);

3

callingParty.PRACK

Send ACK to mrf leg

mrf.sendMessage(ack);
  • callingParty and mrf media streams connected and the announcement will be played.

4

mrf.bye (announcement has been played)

Resume and link calledParty to callingParty to continue the call and send bye success to 'mrf'.

calledPartyLeg.resume();
callingParty.linkLeg(calledParty);
mrf.sendMessage(200)

After these feature instructions have been executed, the Leg Manager instance will contain two legs — callingParty linked to calledParty:

legMgr CallingLinkCalledLegs

Mid Call Announcement

The feature plays an announcement to the callingParty leg, and then reconnects it back to the calledParty leg once the announcement has been played.

Feature Execution Trigger Feature Action Required

1

Need to play announcement to callingParty

Put calledParty on hold and unlink callingParty from calledParty to stop Sentinel core from acting as a B2BUA between callingParty and calledParty

calledParty.sendMessage(reinviteToPutOnHold);
callingParty.unlink(calledParty);

After these feature instructions have been executed, the Leg Manager instance will contain two unlinked legs — callingParty and calledParty:

legMgr CallingCalledLegs

2

calledParty.​reinviteSuccess

Send reinvite to callingParty to get a new offer

callingParty.sendMessage(reinvite);

3

callingParty.​reinviteSuccess

Create mrf leg and send Invite with `callingParty’s offer

legManager.createLeg(invite, "midCallPlayAnnouncement-mrf");
  • callingParty and mrf cannot be linked because callingParty is in midSession and mrf is in callSetup. Therefore the feature must manage the legs separately, sending the appropriate messages on each leg depending on the received messages.

After this feature instruction have been executed, the Leg Manager instance will contain three unlinked legs — callingParty, calledParty, and mrf:

legMgr CallingCalledMrfLegs

4

mrf.inviteSuccess

Send ACK to callingParty containing mrf’s answer, send ACK to `mrf

callingParty.sendMessage(ack);
mrf.sendMessage(ack);
  • callingParty and mrf media streams connected and the announcement will be played

5

mrf.bye (announcement has been played)

Send bye success to mrf, send reinvite to calledParty to get a new offer in order to reconnect the parties

mrf.sendMessage(200);
calledParty.sendMessage(reinvite);

After these feature instructions have been executed, the Leg Manager instance will contain two unlinked legs — callingParty and calledParty. The bye success is the last message that can be sent on a dialog; Sentinel core will remove the mrf leg from the leg manager after this message has been sent:

legMgr CallingCalledLegs

6

calledParty.​reinviteSuccess

Send reinvite to callingParty

callingParty.sendMessage(reinvite);

7

callingParty.​reinviteSuccess

Send ack to both parties and relink them once both in same state

callingParty.sendMessage(ack);
calledParty.sendMessage(ack);
callingParty.linkLeg(calledParty);
  • callingParty.reinviteSuccess will not be forwarded to the calledParty leg after linking callingParty and calledParty legs, only subsequent messages will be forwarded.

After these feature instructions have been executed, the Leg Manager instance will contain two legs — callingParty linked to calledParty:

legMgr CallingLinkCalledLegs

Downstream Forking

The feature handles a SIP call forked downstream by the S-CSCF, an application, or other UAS.

Feature Execution Trigger Feature Action Required

1

calledParty.183 is forked

Using the calledParty leg, create a new downstream forked leg; then using the callingParty leg, create new upstream forked leg and link the new legs together.

SipSession forkedSipSession = downstreamResponse.getSession();
Leg downstreamLeg = incomingResponseLeg.downstreamFork(forkedSipSession, "calledParty-downstreamfork-1");
OutgoingSipResponse forkedResponse = ((IncomingSipRequest) inviteRequest).createForkedResponse(downstreamResponse);
Leg initialUpstreamLeg = incomingResponseLeg.getLinkedLeg();
Leg upstreamLeg = initialUpstreamLeg.upstreamFork(forkedResponse, "callingParty-upstreamfork-1");
downstreamLeg.linkLeg(upstreamLeg);

After these feature instructions have been executed, the Leg Manager instance will contain four legs — callingParty linked to calledParty, and calledParty-downstreamfork-1 linked to callingParty-upstreamfork-1:

legMgr ForkedCallingCalledLegs

2

calledParty-​downstreamfork-​1.inviteSuccess

Detach all other downstream forked sessions and their upstream linked legs

Collection<Leg> downstreamForkedLegs = downstreamLeg.getDownstreamForkedLegs();
downstreamForkedLegs.remove(downstreamLeg);
for (Leg forkedleg : downstreamForkedLegs) {
     Leg upstreamForkedLeg = forkedleg.getLinkedLeg();
     legManager.detachFromLeg(upstreamForkedLeg);
     legManager.detachFromLeg(forkedleg);
}

After these feature instructions have been executed, the Leg Manager instance will contain two legs — calledParty-downstreamfork-1 linked to callingParty-upstreamfork-1:

legMgr ForkedLegs
Previous page Next page