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 a matching service key is found, OmniMSC opens a CAP dialogue with the gsmSCF and sends an InitialDP operation.

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.


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 contextCAP v3 only: 0.4.0.0.1.0.50.1, 0.4.0.0.1.0.50.2, 0.4.0.0.1.0.50.3

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.


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