In this chapter
- Understand what a telephone call needs
- Check handset support before buying an IMS stack
- Make a private identity worksheet
- Choose a coherent public implementation
- Name the IMS service correctly
- Create the IMS data connection and discover the P-CSCF
- Give the three Kamailio roles separate jobs
- Prove registration before trying a call
- Connect the sound path and the call policy
- Treat SMS as its own service
- Use a test matrix and know where to stop
Understand what a telephone call needs
The mobile core authenticates a SIM and gives the phone a data connection. IMS authenticates a telephone identity and controls calls. SIP, the Session Initiation Protocol, carries instructions such as register, ring, answer and hang up. RTP carries the sound. A phone can have excellent LTE data while its telephone application cannot make a call.
Prepare two handsets, two separately provisioned test subscriptions, a working radio and core, private DNS, reliable time synchronisation and a separate management connection. Keep another working telephone available. A successful call between your two test phones demonstrates a local service; it does not establish public telephone connectivity or emergency calling capability.
Use a written test sheet. Record each handset model, regional variant, operating system, modem firmware, SIM type and carrier configuration. These details make a repeatable result more useful than a photograph of a VoLTE icon.
Check handset support before buying an IMS stack
A handset needs Band 40 support for the chosen radio, plus an IMS implementation that will operate with your authorised network identity and SIM profile. An unlocked handset is not a guarantee of either. Manufacturer and carrier settings can determine whether the phone creates an IMS connection, attempts registration or offers particular codecs. Android provides carrier configuration mechanisms specifically including VoLTE and IMS settings. See the Android carrier configuration documentation.
Ask the handset or test SIM supplier for a documented, supported combination. Begin with two matching handsets whose IMS behaviour is known. Do not turn firmware replacement, root access or an unexplained modem patch into a beginner prerequisite. If a phone never sends an IMS registration request, investigate its support and provisioning before changing your call server.
Make a private identity worksheet
| Item | Meaning | What must agree |
|---|---|---|
| IMSI | The subscription identity stored in the SIM profile | SIM and LTE subscriber database |
| Authentication material | The secret values used to prove subscription ownership | SIM supplier records and the appropriate authentication backend |
| IMPI | The IMS private user identity | ISIM or supported handset derivation, IMS authentication records and realm |
| IMPU | An IMS public identity, usually a SIP URI | Handset profile, IMS subscriber records and service profile |
| Telephone identity | A number represented by a telephone URI where the service uses one | Dial plan, subscriber association and any authorised external routing |
An ISIM is an application on a UICC or eUICC profile, not a different shape of plastic card. Its files can hold the private identity, public identities and home domain. A physical test SIM and an eSIM profile both need consistent provisioning. Some handset arrangements derive IMS identities from a USIM; support depends on the implementation. The Osmocom pySim filesystem reference describes the ISIM identity files.
Keep the worksheet encrypted and restrict access. Never place authentication keys, SIM administration codes, eSIM activation codes or subscriber exports in website examples. Allocate distinct subscriptions to the two test phones. Reusing one identity in both phones makes registration and delivery faults much harder to understand.
Choose a coherent public implementation
The public Open5GS VoLTE tutorial is a useful architecture reference. It combines an LTE core with Kamailio IMS and an IMS capable HSS. Its original examples use older operating systems, software and handset workarounds, so select and document current compatible releases before installation. Do not copy its historical password, root login or sequence counter shortcuts into a new network. Read the Open5GS VoLTE tutorial alongside the documentation for the versions you actually install.
The LTE HSS interface and the IMS HSS interface serve different purposes. A core that can authenticate LTE attachment over S6a does not automatically supply the IMS Cx functions that your call servers require. Confirm that the selected IMS subscriber backend supplies authentication vectors, registration information and service profiles through the interfaces expected by your Kamailio version. Record which component owns each subscription and how updates remain consistent.
Keep a version manifest and a backup of your own configuration before adding IMS. A collection of configuration files from unrelated tutorials is not a compatible release.
VectorCore is also publicly available. Its HSS repository documents Cx subscriber and authentication exchanges and Gx and Rx policy integration. If you choose VectorCore, use its documented version and provisioning model instead of assuming that another tutorial's HSS database or commands apply unchanged. Public source availability establishes what you can inspect and build; it does not establish compatibility with every IMS configuration or handset.
Name the IMS service correctly
IMS uses a home domain and DNS records. For an illustrative private network identity with MCC 999 and the two digit MNC 99, the conventional domain is ims.mnc099.mcc999.3gppnetwork.org. The MNC 99 is padded to 099 in this domain. That padding does not turn the SIM's two digit MNC into a different three digit MNC. Keep the IMSI prefix 99999, the SIM's two digit MNC length and the core's 999/99 identity consistent; only the domain label uses the padded form. Use the identity authorised for your deployment; this example does not allocate one.
Put the IMS domain, P-CSCF name, I-CSCF name, S-CSCF name and required address and service records in the private DNS design. Check them from the networks that will use them, not only from the DNS server itself. The naming and identity rules are defined in 3GPP TS 23.003 published by ETSI.
For the illustrative domain, dig +short pcscf.ims.mnc099.mcc999.3gppnetwork.org should return your lab's intended P-CSCF address through its configured resolver. Then validate any NAPTR and SRV records required by your chosen discovery method. A correct address record alone does not prove the complete discovery chain.
Create the IMS data connection and discover the P-CSCF
Give the subscription an IMS APN in addition to its normal data service, following the selected core's configuration model. Define its address pool, route, DNS behaviour and policy. An APN is a named service a phone requests from the core, not a Wi-Fi network name. Use a separate, non-overlapping address pool and allow it to reach the IMS services it needs.
Configure P-CSCF discovery in the gateway, commonly through Protocol Configuration Options returned when the IMS connection is created. Confirm that the handset requests and receives an address it can actually route to. Setting the P-CSCF address in a server file does not guarantee the phone receives it. Keep the IP family consistent across the handset connection, discovery information, DNS and IMS listeners. The Deutsche Telekom voice service guidelines explain IMS APN, PCO discovery and bearer expectations.
Your checkpoint is an established IMS connection with a reachable P-CSCF. If ordinary data works but this connection fails, check APN authorisation, address allocation and routes before investigating SIP authentication.
Give the three Kamailio roles separate jobs
- P-CSCF: the phone's first IMS contact. Configure its advertised identity, trusted core routes, registration handling and supported access security. Kamailio provides separate registrar and IPsec modules for this role.
- I-CSCF: the entry and selection function that consults the IMS subscriber system to locate or select the serving call server.
- S-CSCF: the serving function that authenticates and registers IMS identities, applies service profiles and routes calls to their destination or application server.
These can be separate processes on one lab machine. Give each process its own configuration, listener, runtime directory and service unit. Distinct roles do not require three physical computers. Start with local subscriber calls and explicit trust relationships.
Use the official P-CSCF registrar, I-CSCF, S-CSCF registrar and IMS IPsec documentation for the selected release. Use that release's configuration validation mode on every role before starting it. A file that parses successfully still needs registration and call tests.
Your main radio-to-core connection stays on the private LAN and does not require an IPsec security gateway. IMS access security between a handset and P-CSCF is a different mechanism from radio backhaul IPsec. Configure the security supported and required by the chosen IMS and handset profile; removing an optional remote backhaul tunnel is not a reason to disable IMS authentication or integrity protection.
Prove registration before trying a call
Check DNS, peer identities, realms, routes and time first. Then check that the IMS Diameter peers establish the expected connection and exchange the required applications. Cx carries IMS subscriber and authentication interactions. Rx links IMS policy requests to the policy system. A connected Diameter transport does not prove that the required application is accepted or that a subscriber exists.
Observe one controlled registration attempt. An initial SIP authentication challenge, often a 401 response, can be normal. It should be followed by the handset's authenticated request and a successful registration response. Repeating challenges, authentication failures and timeouts indicate different problems. Inspect the relevant configuration and a private, narrowly scoped trace to distinguish them.
Check subscriber identity, realm, authentication algorithm and synchronisation through the supported tools. Preserve sequence number protection and resolve synchronisation failures properly. Do not solve an authentication error by disabling checks or letting untrusted callers assert another user's identity. Redact identities, addresses and authentication material before sharing a trace.
Connect the sound path and the call policy
RTPengine is a media relay. Kamailio can ask it to manage the media information in session descriptions so the endpoints use an appropriate reachable relay path. Its control interface belongs on a trusted local or management network. Its media port range needs explicit routing and firewall rules in both directions. SIP registration and ringing can succeed while audio fails because media follows a different path. Use the Kamailio RTPengine module documentation and Sipwise RTPengine project for matching control and daemon versions.
Start with a codec supported by both test phones and the complete media path. Transcoding is a separate capability that needs deliberate codec and resource planning. FreeSWITCH can provide applications such as announcements, voicemail or an echo service where you configure them. It is optional for this architecture and does not replace IMS SIM authentication. See the FreeSWITCH manual.
For a standards based VoLTE service, coordinate policy and bearer creation across IMS, the core and the radio. IMS signalling normally uses QCI 5, while conversational voice uses a dedicated bearer with QCI 1. Confirm actual bearer creation during a call. A priority setting in a single web interface cannot establish this behaviour. The GSMA IR.92 profile describes these bearer expectations, and Kamailio's IMS QoS module documents its Rx integration.
Treat SMS as its own service
SMS can travel through IMS, or through supported LTE signalling and an associated messaging gateway. These are separate integration paths. Successful voice registration does not automatically provide either one. SMS over IMS needs the appropriate SMS gateway behaviour and routing for the encoded short message. An ordinary chat message sent by SIP is not sufficient evidence of working telephone SMS. The standards scope is described by 3GPP TS 24.341, Support of SMS over IP networks.
Choose the path your handset and software support. Build a local test between your own subscriptions before connecting any external carrier. Validate sender authorisation, message encoding, delivery reports, retries and duplicate suppression. Test a short plain message, a long message split into parts, non-ASCII text and delivery to a phone that is temporarily offline. A gateway accepting a request is not proof that a handset received it.
Use a test matrix and know where to stop
| Test | Evidence to keep privately | First area to inspect on failure |
|---|---|---|
| Both phones register | Successful registration for each distinct subscription | Handset profile, discovery, identities and IMS authentication |
| A calls B and B calls A | Ringing, answer and clean release in each direction | Dial plan, subscriber location and service routes |
| Two way audio for several minutes | Audible speech both ways and stable call | RTP routing, firewall, codecs and bearer policy |
| Call after idle and after airplane mode | Incoming calls reach the phone after re-registration | Registration expiry, paging and stale state |
| SMS in both directions | Actual handset receipt including long and non-ASCII text | SMS transport, encoding and identity mapping |
| Unsupported and unauthorised requests | Requests rejected without routing or sender impersonation | Trust boundaries and authentication rules |
Keep external telephone routing disabled until local calls and access controls pass. External numbers require a suitable provider, authorised number use, fraud controls and a reviewed public service design. Use test destinations you control. Do not call emergency numbers to test the lab.
The exit condition for this chapter is reproducible local voice and messaging on the documented devices, with failures and unsupported features recorded. If your handset combination cannot support IMS, preserve the working LTE data network and choose a documented compatible device before expanding the project.
