Termination (Attempt)
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 using RequestReportBCSMEvent
to arm for the
Answer, NoAnswer, Busy, RouteSelectFailure, and Abandon event detection points.
The Disconnect EDPs are not armed. There will be no ApplyCharging
, nor CallInformationRequest
.
The use of FurnishChargingInformation
and/or SendChargingInformation
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.
The processing will suspend until one of the armed EDPs is returned, or a guard timer expires. If the call is Answered or Abandoned or timed-out then no further telephony methods are permitted.
If the call result is Busy, NoAnswer, or RouteSelectFailure, then the service logic may carry on and attempt other telephony actions.
The LhoScpLuaService Termination (Attempt) API
.termination_attempt
This method provides full access to the Termination (Attempt) 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. |
.no_answer_timeout
|
Integer |
Specify the value to send in the dPSpecificCriteria.applicationTimer .For CAMEL1 MSCs this value is used for an internal SCP NoAnswer timer. This value must not exceed the configured possible maximum value for the SSP model. (Default = use the default configured for the SSP model, if any). |
.fci
|
String |
Specify the content of the FCIBillingChargingCharacteristics in the FurnishChargingInformation to send.(Default = do not send FurnishChargingInformation ).
|
.sci
|
String |
Specify the content of the sCIBillingChargingCharacteristics in the SendChargingInformation to send.(Default = do not send SendChargingInformation ).
|
.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 termination_attempt
method returns a structure indicating the result of the termination attempt.
Attribute | Type | Description |
---|---|---|
.controlled
|
Boolean |
Is this call still controlled, i.e. can subsequent telephony actions be performed? This will be `true` when the `.edp_name` is `oCalledPartyBusy_leg2`, `tBusy_leg2`, `oNoAnswer_leg2`, `tNoAnswer_leg2`, `routeSelectFailure_leg2`. This will be `false` when the `.edp_name` is `oAnswer_leg2`, `tAnswer_leg2`, `oAbandon_leg1`, or `tAbandon_leg1`. |
.answered
|
Boolean |
Was this call answered? This will be `true` when the `.edp_name` is `oAnswer_leg2`, `tAnswer_leg2`. This will be `false` for all other EDPs. |
.edp_name
|
String | This will be one of `oCalledPartyBusy_leg2`, `tBusy_leg2`, `oNoAnswer_leg2`, `tNoAnswer_leg2`, `routeSelectFailure_leg2`, `oAnswer_leg2`, `tAnswer_leg2`, `oAbandon_leg1`, or `tAbandon_leg1`. |
Example (connect to called party with a prefix, no FCI, no SCI, redirection):
local n2svcd = require "n2.n2svcd"
local scp_api = require "n2.n2svcd.scp"
local handler = function (scp_call)
local result = scp_api.termination_attempt ({
address_digits = '1703' .. scp_call.normalised_called_party,
redirecting_digits = '00889001234',
redirection_info = { reason = 4, counter = 1 }
})
if (result.answered) then
n2svcd.notice ("CALL ANSWERED = YES")
else
if (result.controlled) then
n2svcd.notice ('Controlled after EDP Name = %s', result.edp_name)
scp_api.release_call (5)
else
n2svcd.notice ('Control Lost after EDP Name = %s', result.edp_name)
end
end
return
end
return n2svcd.handler (handler)
.continue_attempt
The continue_attempt
method takes the following arguments:
Attribute | Type | Description |
---|---|---|
noanswer
|
Integer |
Specify the NoAnswer timeout to pass to the switch. (Default = use the default configured in LhoScpApp, if any). |
fci
|
String |
Specify the content of the FCIBillingChargingCharacteristics in the FurnishChargingInformation to send.(Default = do not send FurnishChargingInformation ).
|
sci
|
String |
Specify the content of the sCIBillingChargingCharacteristics in the SendChargingInformation to send.(Default = do not send SendChargingInformation ).
|
The continue_attempt
method returns the same result structure as termination_attempt
.
Example (continue with 30 second NoAnswer timer):
local n2svcd = require "n2.n2svcd"
local scp_api = require "n2.n2svcd.scp"
local handler = function (scp_call)
local result = scp_api.continue_attempt (30)
-- If result.controlled = true then we are still in control of the call.
if (result.controlled) then
n2svcd.notice ('Controlled after EDP Name = %s', result.edp_name)
scp_api.release_call (5)
else
n2svcd.notice ('Control Lost after EDP Name = %s', result.edp_name)
end
return
end
return n2svcd.handler (handler)
.connect_attempt
An SCP LUA script may request that the call be terminated to a B-Party by sending INAP Connect
on the SSP transaction using RequestReportBCSMEvent
to arm for the Answer, NoAnswer, Busy,
RouteSelectFailure, and Abandon event detection points.
The Disconnect EDPs are not armed. There will be no ApplyCharging
, nor CallInformationRequest
.
The use of FurnishChargingInformation
and/or SendChargingInformation
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.
The processing will suspend until one of the armed EDPs is returned. If the call is Answered or Abandoned
then no further telephony methods are permitted after performing continue_attempt
. If the call result
is Busy, NoAnswer, or RouteSelectFailure, then the service logic may carry on and attempt other telephony
actions.
The connect_attempt
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.
|
noanswer
|
Integer |
Specify the NoAnswer timeout to pass to the switch. (Default = use the default configured in LhoScpApp, if any). |
fci
|
String |
Specify the content of the FCIBillingChargingCharacteristics in the FurnishChargingInformation to send.(Default = do not send FurnishChargingInformation ).
|
sci
|
String |
Specify the content of the sCIBillingChargingCharacteristics in the SendChargingInformation to send.(Default = do not send SendChargingInformation ).
|
bparty_beep
|
Boolean or Table |
Specify a simple Boolean value true to request that a post-answer B-Party beep be played (if supported).A table structure (Default = do not send SendChargingInformation ).
|
.play
|
Boolean |
When bparty_beep is a table, this optional attribute specifies that the beep should be played.(Default = true ).
|
.id
|
Integer |
When bparty_beep is a table, this optional attribute overrides the default announcement ID.(Default = use the default configured for the SSP model). |
The connect_attempt
method returns the same result structure as termination_attempt
.
Example (connect to called party with a prefix, default NoAnswer, with 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
-- Binary in LUA is decimal-specified.
local fci_bin = '\01\02\03\04\255\238\221'
local result = scp_api.connect_attempt (called_party, nil, fci_bin)
if (result.answered) then
n2svcd.notice ("CALL ANSWERED = YES")
end
-- This will automatically release the call (if needed) with default release cause.
return
end
return n2svcd.handler (handler)
Example (connect to called party with a prefix, default NoAnswer, no FCI/SCI, B-Party beep with explicit ID):
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
local result = scp_api.connect_attempt (called_party, nil, nil, nil, { id = 1300 })
if (result.answered) then
n2svcd.notice ("CALL ANSWERED = YES")
end
-- This will automatically release the call (if needed) with default release cause.
return
end
return n2svcd.handler (handler)