Voice Calls
Service Options
| SO | Name | Codec | Status |
|---|---|---|---|
| SO3 | Enhanced Variable Rate | EVRC (IS-127) | Done |
| SO17 | EVRC Network Waitstate | EVRC (IS-127) | Done |
| SO68 | EVRC-B | EVRC-B | Done |
| SO73 | EVRC-WB | EVRC-WB | Done |
Call Flow
Mobile-Originated (MO)
| Step | Message | Channel |
|---|---|---|
| 1 | Origination Message | Access |
| 2 | BTS forwards access message to BSC | Abis signaling |
| 3 | BSC sends Complete Layer 3 Information to MSC | A1 |
| 4 | MSC returns Assignment Request with A2p bearer parameters | A1 |
| 5 | Extended Channel Assignment | Paging |
| 6 | Service Connect / Service Connect Complete | Traffic |
| 7 | EVRC voice frames flow over air, Abis bearer, and A2p RTP | Traffic / A2p |
Mobile-Terminated (MT)
If the mobile is idle, the network pages it and assigns a traffic channel:
| Step | Message | Channel |
|---|---|---|
| 1 | MSC sends Paging Request to BSC | A1 |
| 2 | General Page Message | Paging |
| 3 | Page Response, forwarded to MSC | Access / Abis / A1 |
| 4 | MSC sends Assignment Request with A2p bearer parameters | A1 |
| 5 | Extended Channel Assignment | Paging |
| 6 | Service negotiation and EVRC bearer setup | Traffic / A2p |
If the mobile already has an active traffic channel, the BSC starts MT service negotiation on that channel instead of paging again. For a packet-data traffic channel, SO33 can be replaced by the negotiated voice service on connection reference 0; once voice connects, the old packet session is closed through the PCF boundary. If the mobile rejects the voice negotiation, only the proposed voice leg is released and the existing channel can remain active.
Initiate MT calls via the MSC management InitiateCall RPC or the web dashboard. Compatibility routes may still call through the management facade while the management split completes.
Call Routing
When a mobile originates a call, the MSC owns call policy and media orchestration while the BSC executes the radio leg. The BSC sends the mobile’s Layer 3 request over A1; the MSC decides whether to route the call to another mobile, local WAV playback, or the external SIP gateway.
| Dialed Number | Route | Description |
|---|---|---|
| Registered subscriber MDN | MS-to-MS bridge | MSC bridges A2p bearer frames between two radio legs |
| Any other number | SIP gateway | MSC opens an outbound gateway leg and drives SIP INVITE setup |
| (no gateway configured) | WAV playback | MSC-sourced test audio played to the caller |
MS-to-MS Bridging
When two mobiles are both registered, the MSC bridges their A2p bearer frames between the two BSC radio legs — mobile-to-mobile calls without external infrastructure. If the callee already has a traffic channel, the callee leg reuses that channel and starts voice service negotiation in place instead of forcing a new page cycle.
A2p Voice Bearer
The MSC/BSC voice bearer is now a per-circuit A2p RTP/UDP session. Assignment Request and Assignment Complete carry bearer session parameters so each circuit gets its own RTP socket pair. Media on this bearer is raw EVRC codec payload, with RTP using the EVRC payload format from RFC 3558; the BSC adds or removes the CDMA MuxPDU header on the Abis/air-interface side.
This keeps call control and bearer media separate:
| Plane | Owner | Transport |
|---|---|---|
| Call control | MSC/BSC | A1 signaling |
| Voice bearer | MSC/BSC | A2p RTP/UDP per circuit |
| Radio bearer | BTS/BSC/mobile | Abis bearer and traffic channel frames |
SIP Voice Gateway
The voice gateway enables mobile-originated calls to reach the PSTN or SIP peers. It runs as a separate process (cdma-voice-gw) and provides SIP/RTP interop plus EVRC↔G.711 transcoding. The MSC owns the gateway client, control stream, and media routing; the BSC only handles the radio leg.
Architecture
CDMA Handset → BTS → BSC ⇄ A1/A2p ⇄ MSC media/control → Voice Gateway → SIP INVITE → PSTN/SIP Peer
↕
EVRC ↔ G.711 transcoding
RTP send/receive
MO-to-PSTN Flow
| Step | What Happens |
|---|---|
| 1 | Mobile dials external number, BSC sets up traffic channel |
| 2 | MSC policy routes the external leg to the configured gateway |
| 3 | Gateway sends SIP INVITE to configured trunk |
| 4 | SIP peer sends 180/183 → gateway reports ringing to MSC |
| 5 | SIP peer answers (200 OK) → MSC starts gateway media bridge |
| 6 | EVRC frames from air → BSC A2p bearer → MSC → gateway decode → G.711 encode → RTP |
| 7 | RTP from peer → gateway G.711 decode → EVRC encode → MSC → BSC A2p bearer → air |
| 8 | Either side hangs up → MSC coordinates SIP BYE and A1 Clear Command |
Capabilities
| Feature | Status |
|---|---|
| MO → SIP/PSTN outbound | Done |
| EVRC ↔ G.711 (PCMU/PCMA) transcoding | Done |
| RFC 4733 telephone-event DTMF (MS → SIP) | Done |
| SIP digest authentication | Done |
| SIP registration (REGISTER) | Done |
| STUN NAT traversal | Done |
| Caller ID override | Done |
| Adaptive jitter buffer | Done |
MSC Configuration
{
"voice": {
"gateway": {
"enabled": true,
"endpoint": "http://127.0.0.1:17015",
"fallback_to_wav": true
}
}
}
When fallback_to_wav is true and the gateway is unreachable, calls fall back to WAV playback.
See Voice Gateway Setup for full gateway configuration.
Caller ID (AWIM)
The BSC delivers caller ID to the mobile in an Alert With Information Message (AWIM) Calling Party Number record per C.S0005-E 3.7.5.10 / ANSI T1.607. Two fields on the record describe how the mobile should interpret the digits, and both are configurable per subscriber from the subscriber edit page.
Number Type (3 bits)
| Value | Meaning |
|---|---|
| Unknown | Network has no information about the format of the digits. |
| International | E.164 international number (country code prefix). |
| National | National-significant number (no country code). |
| Network specific | Network-internal numbering — the default. The mobile shows the digits as-is without imposing a format. |
| Subscriber | Local subscriber number within the serving network. |
| Abbreviated | Short code / speed-dial form. |
Numbering Plan (4 bits)
| Value | Meaning |
|---|---|
| Unknown | Plan not specified. |
| ISDN / E.164 | Public telephony numbering — the default. Digits are limited to 0-9. |
| Data | X.121 data numbering. |
| Telex | F.69 telex numbering. |
| Private | Private numbering plan (PBX-style extensions). |
The on-air digits field is always ASCII 0-9; the BSC sanitizes stored phone numbers (stripping any non-digits and truncating to E.164’s 15-digit maximum) before they’re encoded. Defaults Network specific + ISDN / E.164 preserve the previous hardcoded behavior.
EVRC Codec
| Rate | Bitrate | Usage |
|---|---|---|
| Full | 8.55 kbps | Active speech |
| Half | 4.0 kbps | Background noise |
| Quarter | 2.0 kbps | Transition |
| Eighth | 0.8 kbps | Silence |
Custom Ringtones
Each subscriber can have a custom ringtone that plays in place of the standard ringback tone when they are called. Upload a WAV file from the subscriber edit page in the web dashboard.
| Setting | Value |
|---|---|
| Accepted format | WAV (PCM, mono or stereo, any common sample rate) |
| Max upload size | 4 MB |
The audio loops until the call connects. If no ringtone is uploaded, or anything goes wrong fetching it, the standard ringback tone is used.
Converting MP3 (or other formats) to WAV
Only WAV is accepted by the upload form. Convert with ffmpeg, downmixing to mono, resampling to 8 kHz, and truncating to 60 seconds. Voice playback is 8 kHz mono anyway, so this matches what the HLR produces internally and keeps the upload comfortably under the 4 MB cap.
ffmpeg -i ringtone.mp3 -t 60 -ac 1 -ar 8000 -sample_fmt s16 \
-af "silenceremove=start_periods=1:start_silence=0:start_threshold=-50dB" \
ringtone.wav
-t 60 caps the output at 60 seconds. At 8 kHz mono 16-bit, that’s about 1 MB. A default ffmpeg -i in.mp3 out.wav keeps the source’s sample rate and channels and can easily produce a 50+ MB file.
The silenceremove filter trims leading silence (anything below -50 dB) so playback starts right at the first audible audio. MP3 files almost always have 50–300 ms of encoder padding at the start, which would otherwise show up as a noticeable pause before the ringtone is heard.
WAV Playback
For testing (or when no gateway is configured), MO calls play a WAV file:
{ "voice": { "wav_file": "path/to/audio.wav" } }