Termination (Final)

Introduction

An SCP LUA script may request that the call be terminated to a B-Party by sending INAP Continue or INAP Connect on the SSP transaction, without using RequestReportBCSMEvent, nor ApplyCharging, nor CallInformationRequest.

The service logic does not wait to see the results of this termination attempt.

The use of FurnishChargingInformation is optional.

If an SRP is currently open then a prior DisconnectForwardConnection will be sent on the SSP transaction, and any external SRP transaction will be ended according to the applicable SRP configuration.

No further telephony methods are permitted after performing the final termination via termination_final, or either of the helper methods continue_final or connect_final.

The LhoScpLuaService Termination (Final) API

.termination_final

This method provides full access to the Termination (Final) mechanism and is provided for use by custom service developers. In the majority of scenarios, one of the subsequently-described convenience methods should be sufficient and preferable. However, this full-featured alternative is provided for use by complex or non-standard services.

This method sends INAP Connect if the .address_digits is present, or INAP Continue if the address digits are not specified.

This method takes a single details parameter which is a LUA table with the following structure:

Field Type Description
details Object [Required] The detailed SCP control parameters for the message.
.fci String Specify the content of the FCIBillingChargingCharacteristics in the FurnishChargingInformation to send.
(Default = do not send FurnishChargingInformation).
.address_digits Digit String Specify the normalised destinationRoutingAddress digits (only 0-9A-F).
The applicable configured 'called_party' denormalisation on the LhoScpApp will be applied.
If this field is present, then INAP Connect will be used, else INAP Continue is sent.
.orig_called_digits Digit String This field is only relevant when address_digits is specified.
Specify the normalised destinationRoutingAddress digits (only 0-9A-F).
The applicable configured 'calling_party' denormalisation on the LhoScpApp will be applied.
(Default = not present).
.redirecting_digits Digit String This field is only relevant when address_digits is specified.
Specify the normalised redirectingPartyID digits (only 0-9A-F).
The applicable configured 'calling_party' denormalisation on the LhoScpApp will be applied.
(Default = not present).
.redirection_info Object This field is only relevant when address_digits is specified.
(Default = not present).
.orig_reason 0 - 15 Specify an explicit redirection information original reason.
(Default = 0).
.indicator 0 - 7 Specify an explicit redirection information indicator.
(Default = 0).
.reason 0 - 15 Specify an explicit redirection information reason.
(Default = 0).
.national_use 0 / 1 Specify an explicit redirection information national use value.
(Default = 0).
.counter 0 - 7 Specify an explicit redirection information counter.
(Default = 1).

The continue_final method returns true immediately.

Example (connect to called party with a prefix, no FCI, redirection):

    local n2svcd = require "n2.n2svcd"
    local scp_api = require "n2.n2svcd.scp"

    local handler = function (scp_call)

        scp_api.termination_final ({
            address_digits = '1703' .. scp_call.normalised_called_party,
            redirecting_digits = '00889001234',
            redirection_info = { reason = 4, counter = 1 }
        })

        return 
    end

    return n2svcd.handler (handler)

.continue_final

This method sends INAP Continue.

The continue_final method takes the following arguments:

Attribute Type Description
fci String Specify the content of the FCIBillingChargingCharacteristics in the FurnishChargingInformation to send.
(Default = do not send FurnishChargingInformation).

The continue_final method returns true immediately.

Example (continue with FCI):

    local n2svcd = require "n2.n2svcd"
    local scp_api = require "n2.n2svcd.scp"

    local handler = function (scp_call)

        -- Binary in LUA is decimal-specified.
        local fci_bin = '\01\02\03\04\255\238\221'

        scp_api.continue_final (fci_bin)

        return 
    end

    return n2svcd.handler (handler)

.connect_final

This method sends INAP Connect.

The connect_final method takes the following arguments:

Attribute Type Description
address_digits Digit String Specify the normalised destinationRoutingAddress digits (only 0-9A-F).
The applicable configured 'called_party' denormalisation on the LhoScpApp will be applied.
If this field is present, then INAP Connect will be used, else INAP Continue is sent.
fci String Specify the content of the FCIBillingChargingCharacteristics in the FurnishChargingInformation to send.
(Default = do not send FurnishChargingInformation).

The connect_final method returns true immediately.

Example (connect to called party with a prefix, no FCI):

    local n2svcd = require "n2.n2svcd"
    local scp_api = require "n2.n2svcd.scp"

    local handler = function (scp_call)

        local called_party = '1703' .. scp_call.normalised_called_party

        scp_api.connect_final (called_party)

        return 
    end

    return n2svcd.handler (handler)