Latest Incoming, Pending and Latest Outgoing Messages

There are three DialogTcapMessage messages that may be associated with a TCAP leg.

  1. LatestIncoming message — set on the leg by the IPSMGW when a message is received on the TCAP leg. This message corresponds to the most recent message received on the TCAP leg

  2. PendingTCAPMessage — set and updated by features during an execution cycle of the TCAP leg manager. The pending message is processed after all feature execution scripts have finished

  3. LatestOutgoing message — set on the leg by the IPSMGW when a message is sent on the TCAP leg during instruction processing. This message corresponds to the last message that was sent on the TCAP leg. This field will initially be empty

The following operations operate on the LatestIncoming, Pending and LatestOutgoing messages.

Operation …​ Explanation

boolean hasPendingTCAPMessage()

Return true if there is a pending TCAP message associated with this leg

DialogTcapMessage getPendingTCAPMessage()

Return the pending TCAP message associated with this leg

clearPendingTCAPMessage()

Clear the pending TCAP message if a feature wishes to abort sending the pending message, without a replacement.

DialogTcapMessage getLatestIncomingTCAPMessage()

Return The latest Incoming TCAP message received on this leg’s dialog.

DialogTcapMessage getLatestOutgoingTCAPMessage()

Return The latest Outgoing TCAP message sent on this leg’s dialog.

Sending Messages

Sending messages on a TCAP leg updates the PendingTCAPMessage on the TCAPLeg.

Operation …​ Explanation

issueOpenRequest(DialogOpenRequestTcapMessage open)

Request that a new dialog, associated with this leg, should be initiated. The pending TCAP message is set to the open request. Any existing pending TCAP message will be replaced by the open request.

sendInvoke(TCOperationInvokeTcapComponent toSend)

Issue an operation invoke on the dialog associated with this leg. The invoke is scheduled to be sent by updating the pending TCAP message. If no pending TCAP message exists, a new pending TCAP message is created.

sendResult(TCOperationResultTcapComponent result)

Issue a result to an operation on the dialog associated with this leg. The result is scheduled to be sent by updating the pending TCAP message. If no pending TCAP message exists, a new pending TCAP message is created.

sendError(TCOperationUserErrorTcapComponent<?> error)

Issue a user error response for an invoked operation on the dialog associated with this leg. The error is scheduled to be sent by updating the pending TCAP message. If no pending TCAP message exists, a new pending TCAP message is created.

sendClose(boolean prearrangedEnd)

Close the dialog associated with this leg. Closing a dialog with prearrangedEnd == false causes the pending TCAP message to be sent as a TC-End. If prearrangedEnd == true, no network message is sent and the dialog is torn down by the local Provider, discarding any operation requests and/or responses. If there is no pending TCAP message, a new TC-End pending TCAP message is created.

sendUserAbort(DialogUserAbortTcapMessage abort)

Abort the dialog associated with this leg. Any pending TCAP message is discard and replaced with the abort.

acceptDialog(DialogMessageTcapMessage accept)

Accept the dialog associated with this leg. The pending TCAP message is set to the open accept. Any existing pending TCAP message will be replaced by the open accept.

acceptDialog()

Accept the dialog associated with the leg. The pending TCAP message is set with a new open accept. Any existing pending TCAP message will be replaced by the new open accept.

refuseDialog(DialogOpenRefuseTcapMessage refuse)

Refuse an open dialog request for the dialog associated with this leg. The response is sent to the remote Provider and the dialog is torn down. The pending TCAP message is set to the open refuse. Any existing pending TCAP message will be replaced by the open refuse.

refuseDialog()

Refuse an open dialog request. The response is sent to the remote Provider and the dialog is torn down. The pending TCAP message is set to a new open refuse. Any existing pending TCAP message will be replaced by the open refuse.

sendDialogTcapMessage(DialogMessageTcapMessage toSend)

Send a TCAP message on the dialog associated with this leg. Typically such a message is a TC-Continue or a TC-End. Any existing pending TCAP message will be replaced by the TCAP message.

Linking and Unlinking TCAP Legs

TCAP Legs can be associated with each by linking them.

Operation …​ Explanation

linkLeg(TcapLeg leg)

Immediately link this leg to the leg provided as an argument. If the legs are already linked to each other, then the legs will remain linked. If either of the legs is linked to another leg then LegsAlreadyLinkedException will be thrown. A TCAP Leg may not be linked to itself.

unlinkLeg()

Immediately unlink this leg from the leg linked to it, if any. If the leg is not actually linked, there is no effect.

TcapLeg getLinkedLeg()

Return the leg linked to this leg

boolean isLinked()

Return true if this leg is linked to another leg.

Other Useful Operations

Operation …​ Explanation

ActivityContextInterface getAci()

Return the ActivityContextInterface for Dialog associated with this leg.

Dialog getTcapDialog()

Return the Dialog associated with this leg

boolean dialogCanBeAccepted()

Check if the dialog can be accepted. Return true if the dialog exists, and is in the INIT_RECEIVED state (an Open Request has been received, but it has not been accepted or rejected yet)

Previous page Next page