Skip to main content

CAMEL / CAP

This document describes the CAMEL (Customized Applications for Mobile Enhanced Logic) implementation in OmniMSC, including service key configuration, CAP dialogue handling, BCSM detection points, supported CAP operations, and TCAP transport.

For the full CAMEL-triggered call sequence diagram (InitialDP, Connect, EventReportBCSM), see Call Flow Diagrams. For how CAMEL triggers fit into the routing pipeline (number analysis flow), see Routing Configuration. For CAMEL-related CDR fields (FurnishChargingInformation, cause_for_term), see Call Detail Records. For configuration of CAMEL service keys, see Configuration Reference.


Overview​

CAMEL provides a framework for mobile operators to deploy Intelligent Network (IN) services on top of the GSM/UMTS core network. OmniMSC acts as the gsmSSF (GSM Service Switching Function), interacting with an external gsmSCF (GSM Service Control Function, also known as the SCP) to provide real-time call control services such as prepaid charging, number translation, call screening, and virtual private networks.

The gsmSCF controls call processing by sending instructions to OmniMSC at defined detection points within the Basic Call State Model (BCSM). OmniMSC reports call events back to the gsmSCF and executes the received instructions (continue, connect to a different number, release the call, apply charging).


Service Key Configuration​

Each subscriber may have one or more CAMEL subscriptions provisioned via MAP INSERT SUBSCRIBER DATA from the HLR. A CAMEL subscription includes a service key, which identifies the IN service to invoke, and the gsmSCF address (Global Title) to contact.

When a call triggers a CAMEL detection point (such as collected_info for MO calls or terminating_attempt_authorized for MT calls), OmniMSC checks the subscriber's CAMEL subscription data. If the O-CSI (MO) or VT-CSI (MT) is present, OmniMSC opens a CAP dialogue with the gsmSCF and sends an InitialDP operation.

The gsmSCF is always the gsmSCF-Address from the HLR's CSI. The MSC has no static gsmSCF routing for calls: the InitialDP is sent to that Global Title (SSN 146) through the STP, so which CAMEL gateway handles a subscriber is decided by the HLR data. A CSI without a gsmSCF-Address does not trigger CAMEL and is logged as an error.

For an MO call with an O-CSI, OmniMSC holds the call setup until the gsmSCF answers with Continue or Connect. ReleaseCall rejects the call. If the gsmSCF does not answer (Tcp / Tssf expiry) or closes the dialogue without an instruction, the CSI default call handling applies. MT calls (VT-CSI) are not held: the InitialDP is sent and paging continues.

Subscription ParameterDescription
Service keyInteger identifying the IN service (e.g., 1 for prepaid, 2 for VPN)
gsmSCF addressGlobal Title of the SCP to contact
Default call handlingAction if the SCP is unreachable: :continue_call or :release_call
TDP listList of trigger detection points armed for this subscription
CAMEL phaseSupported CAMEL phase (Phase 1, 2, 3, or 4)

If the gsmSCF is unreachable or the TCAP dialogue fails, OmniMSC applies the default call handling action from the subscriber's CAMEL subscription data.


Prepaid Charging (ApplyCharging)​

OmniMSC applies the gsmSCF's time-based charging (CAMEL-AChBillingChargingCharacteristics, timeDurationCharging):

StepOmniMSC action
RequestReportBCSMEventArms the listed DPs. A notifyAndContinue DP is reported without suspending the call; an interrupted DP waits for an instruction under Tssf
ApplyChargingStores maxCallPeriodDuration (100 ms units) and releaseIfDurationExceeded. The period starts at answer, or at once when the call is already answered
AnswerReports oAnswer / tAnswer when armed and starts the period
Period expirySends ApplyChargingReport. With releaseIfDurationExceeded the report has callActive = FALSE and the call is cleared (Disconnect to the MS, cause 31). Otherwise the report has callActive = TRUE and OmniMSC waits under Tssf for the next ApplyCharging
ReleaseSends a final ApplyChargingReport (callActive = FALSE) with the used time of the current period, then oDisconnect / tDisconnect when armed. An unanswered call reports oAbandon / tAbandon

CAP Dialogue States​

Each CAMEL interaction runs as an independent CAP dialogue within a TCAP transaction. The dialogue tracks the state of the SSF-SCF interaction from InitialDP through to termination.

StateDescription
idleDetection point triggered, preparing InitialDP
wait_for_instructionsInitialDP sent, awaiting gsmSCF response
processingExecuting gsmSCF instructions (Continue, Connect, ApplyCharging)
terminatedDialogue complete, TCAP transaction closed

CAP Operations​

OmniMSC supports the following CAP operations for CAMEL Phase 2 and Phase 3 service interaction.

SSF to SCF (OmniMSC to gsmSCF)​

OperationDescription
InitialDPReports a triggered detection point with call parameters (service key, called/calling number, event type, location information)
EventReportBCSMReports a call event at an armed detection point (answer, disconnect, abandon, route select failure)
ApplyChargingReportReports the result of a charging operation (call duration, charge units consumed)
CallInformationReportReports call information requested by the gsmSCF (call duration, release cause)

SCF to SSF (gsmSCF to OmniMSC)​

OperationDescription
ContinueResume call processing at the current BCSM state
ConnectRoute the call to a different destination number (number translation, VPN routing)
ReleaseCallRelease the call with a specified cause code
RequestReportBCSMEventArm detection points for future event reporting (answer, disconnect, abandon)
ApplyChargingApply charging parameters (maximum call duration, charge advice)
FurnishChargingInformationProvide free-format charging data to be included in the CDR
ResetTimerReset the SSF inactivity timer to prevent timeout during long SCP processing
SendChargingInformationSend advice-of-charge information to the mobile station
CallInformationRequestRequest call information to be reported at call release

O-BCSM Detection Points​

The Originating Basic Call State Model defines the detection points available for MO calls per 3GPP TS 23.078.

Detection PointBCSM StateTrigger
collected_info (DP 2)collect_infoDialed digits available, before number analysis
analysed_info (DP 3)analyse_infoNumber analysis complete, before routing
route_select_failure (DP 4)routingRouting fails (no route, trunk busy, peer down)
o_called_party_busy (DP 5)o_alertingCalled party busy
o_no_answer (DP 6)o_alertingCalled party does not answer within timer
o_answer (DP 7)o_activeCalled party answers
o_disconnect (DP 9)o_disconnectEither party initiates disconnect

T-BCSM Detection Points​

The Terminating Basic Call State Model defines the detection points available for MT calls.

Detection PointBCSM StateTrigger
terminating_attempt_authorized (DP 12)terminating_attempt_authorizedMT call received, before paging
t_busy (DP 13)t_alertingCalled subscriber busy
t_no_answer (DP 14)t_alertingCalled subscriber does not answer within timer
t_answer (DP 15)t_activeCalled subscriber answers
t_disconnect (DP 17)t_disconnectEither party initiates disconnect

TCAP/CAP Transport​

CAP operations are carried over TCAP (Transaction Capabilities Application Part) dialogues, which in turn use the SCCP/M3UA/SCTP transport stack. OmniMSC uses a generic BER decoder via the TcapDecoder module to parse incoming TCAP and CAP PDUs.

Transport ParameterValue
SSN (remote, gsmSCF)146
SSN (local, MSC/VLR/SSF)8
TCAP dialogue typeStructured (TC-BEGIN, TC-CONTINUE, TC-END)
EncodingASN.1 BER (Basic Encoding Rules)
Application contextCall control InitialDP: CAP v2 id-ac-CAP-gsmSSF-scfGenericAC 0.4.0.0.1.0.50.1

The gsmSCF address is a Global Title, routed via SCCP Global Title Translation to the SCP node. OmniMSC maintains a TCAP transaction for the lifetime of each CAP dialogue, using TC-CONTINUE to exchange operations within the dialogue and TC-END to close it. The gsmSCF answers to the MSC SSN (8), so incoming TCAP Continue / End / Abort messages are matched to their call dialogue by the destination transaction ID before the MAP / CAP split by SSN.


References​

ReferenceTitleRelevance
3GPP TS 23.078CAMEL Phase 3 -- Stage 2CAMEL architecture, BCSM model, detection points
3GPP TS 29.078CAMEL Application Part (CAP) -- Stage 3CAP protocol encoding, ASN.1 definitions
ITU-T Q.771-Q.775Transaction CapabilitiesTCAP dialogue and transaction handling
ITU-T Q.711-Q.716SCCPSignaling connection for TCAP transport
3GPP TS 22.078CAMEL -- Service DescriptionCAMEL service requirements