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 Parameter | Description |
|---|---|
| Service key | Integer identifying the IN service (e.g., 1 for prepaid, 2 for VPN) |
| gsmSCF address | Global Title of the SCP to contact |
| Default call handling | Action if the SCP is unreachable: :continue_call or :release_call |
| TDP list | List of trigger detection points armed for this subscription |
| CAMEL phase | Supported 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.
| State | Description |
|---|---|
| idle | Detection point triggered, preparing InitialDP |
| wait_for_instructions | InitialDP sent, awaiting gsmSCF response |
| processing | Executing gsmSCF instructions (Continue, Connect, ApplyCharging) |
| terminated | Dialogue 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)
| Operation | Description |
|---|---|
| InitialDP | Reports a triggered detection point with call parameters (service key, called/calling number, event type, location information) |
| EventReportBCSM | Reports a call event at an armed detection point (answer, disconnect, abandon, route select failure) |
| ApplyChargingReport | Reports the result of a charging operation (call duration, charge units consumed) |
| CallInformationReport | Reports call information requested by the gsmSCF (call duration, release cause) |
SCF to SSF (gsmSCF to OmniMSC)
| Operation | Description |
|---|---|
| Continue | Resume call processing at the current BCSM state |
| Connect | Route the call to a different destination number (number translation, VPN routing) |
| ReleaseCall | Release the call with a specified cause code |
| RequestReportBCSMEvent | Arm detection points for future event reporting (answer, disconnect, abandon) |
| ApplyCharging | Apply charging parameters (maximum call duration, charge advice) |
| FurnishChargingInformation | Provide free-format charging data to be included in the CDR |
| ResetTimer | Reset the SSF inactivity timer to prevent timeout during long SCP processing |
| SendChargingInformation | Send advice-of-charge information to the mobile station |
| CallInformationRequest | Request 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 Point | BCSM State | Trigger |
|---|---|---|
| collected_info (DP 2) | collect_info | Dialed digits available, before number analysis |
| analysed_info (DP 3) | analyse_info | Number analysis complete, before routing |
| route_select_failure (DP 4) | routing | Routing fails (no route, trunk busy, peer down) |
| o_called_party_busy (DP 5) | o_alerting | Called party busy |
| o_no_answer (DP 6) | o_alerting | Called party does not answer within timer |
| o_answer (DP 7) | o_active | Called party answers |
| o_disconnect (DP 9) | o_disconnect | Either party initiates disconnect |
T-BCSM Detection Points
The Terminating Basic Call State Model defines the detection points available for MT calls.
| Detection Point | BCSM State | Trigger |
|---|---|---|
| terminating_attempt_authorized (DP 12) | terminating_attempt_authorized | MT call received, before paging |
| t_busy (DP 13) | t_alerting | Called subscriber busy |
| t_no_answer (DP 14) | t_alerting | Called subscriber does not answer within timer |
| t_answer (DP 15) | t_active | Called subscriber answers |
| t_disconnect (DP 17) | t_disconnect | Either 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 Parameter | Value |
|---|---|
| SSN (remote, gsmSCF) | 146 |
| SSN (local, MSC/VLR/SSF) | 8 |
| TCAP dialogue type | Structured (TC-BEGIN, TC-CONTINUE, TC-END) |
| Encoding | ASN.1 BER (Basic Encoding Rules) |
| Application context | CAP 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
| Reference | Title | Relevance |
|---|---|---|
| 3GPP TS 23.078 | CAMEL Phase 3 -- Stage 2 | CAMEL architecture, BCSM model, detection points |
| 3GPP TS 29.078 | CAMEL Application Part (CAP) -- Stage 3 | CAP protocol encoding, ASN.1 definitions |
| ITU-T Q.771-Q.775 | Transaction Capabilities | TCAP dialogue and transaction handling |
| ITU-T Q.711-Q.716 | SCCP | Signaling connection for TCAP transport |
| 3GPP TS 22.078 | CAMEL -- Service Description | CAMEL service requirements |