1xBTS 1xBTS

Voice Calls

Service Options

SONameCodecStatus
SO3Enhanced Variable RateEVRC (IS-127)Done
SO17EVRC Network WaitstateEVRC (IS-127)Done
SO68EVRC-BEVRC-BDone
SO73EVRC-WBEVRC-WBDone

Call Flow

Voice call flow diagram

Mobile-Originated (MO)

StepMessageChannel
1Origination MessageAccess
2BTS forwards access message to BSCAbis signaling
3BSC sends Complete Layer 3 Information to MSCA1
4MSC returns Assignment Request with A2p bearer parametersA1
5Extended Channel AssignmentPaging
6Service Connect / Service Connect CompleteTraffic
7EVRC voice frames flow over air, Abis bearer, and A2p RTPTraffic / A2p

Mobile-Terminated (MT)

If the mobile is idle, the network pages it and assigns a traffic channel:

StepMessageChannel
1MSC sends Paging Request to BSCA1
2General Page MessagePaging
3Page Response, forwarded to MSCAccess / Abis / A1
4MSC sends Assignment Request with A2p bearer parametersA1
5Extended Channel AssignmentPaging
6Service negotiation and EVRC bearer setupTraffic / 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 NumberRouteDescription
Registered subscriber MDNMS-to-MS bridgeMSC bridges A2p bearer frames between two radio legs
Any other numberSIP gatewayMSC opens an outbound gateway leg and drives SIP INVITE setup
(no gateway configured)WAV playbackMSC-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:

PlaneOwnerTransport
Call controlMSC/BSCA1 signaling
Voice bearerMSC/BSCA2p RTP/UDP per circuit
Radio bearerBTS/BSC/mobileAbis 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

StepWhat Happens
1Mobile dials external number, BSC sets up traffic channel
2MSC policy routes the external leg to the configured gateway
3Gateway sends SIP INVITE to configured trunk
4SIP peer sends 180/183 → gateway reports ringing to MSC
5SIP peer answers (200 OK) → MSC starts gateway media bridge
6EVRC frames from air → BSC A2p bearer → MSC → gateway decode → G.711 encode → RTP
7RTP from peer → gateway G.711 decode → EVRC encode → MSC → BSC A2p bearer → air
8Either side hangs up → MSC coordinates SIP BYE and A1 Clear Command

Capabilities

FeatureStatus
MO → SIP/PSTN outboundDone
EVRC ↔ G.711 (PCMU/PCMA) transcodingDone
RFC 4733 telephone-event DTMF (MS → SIP)Done
SIP digest authenticationDone
SIP registration (REGISTER)Done
STUN NAT traversalDone
Caller ID overrideDone
Adaptive jitter bufferDone

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)

ValueMeaning
UnknownNetwork has no information about the format of the digits.
InternationalE.164 international number (country code prefix).
NationalNational-significant number (no country code).
Network specificNetwork-internal numbering — the default. The mobile shows the digits as-is without imposing a format.
SubscriberLocal subscriber number within the serving network.
AbbreviatedShort code / speed-dial form.

Numbering Plan (4 bits)

ValueMeaning
UnknownPlan not specified.
ISDN / E.164Public telephony numbering — the default. Digits are limited to 0-9.
DataX.121 data numbering.
TelexF.69 telex numbering.
PrivatePrivate 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

RateBitrateUsage
Full8.55 kbpsActive speech
Half4.0 kbpsBackground noise
Quarter2.0 kbpsTransition
Eighth0.8 kbpsSilence

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.

SettingValue
Accepted formatWAV (PCM, mono or stereo, any common sample rate)
Max upload size4 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" } }