Build a simple Android VPN service app that captures network packets and filters for SIP traffic to/from Google Voice servers, to discover the actual SIP server IP addresses and credential format used by the official Google Voice app.
Android's VpnService API allows creating a local VPN that intercepts all device traffic without root. We'll build a minimal capture app that:
- Creates VpnService to intercept packets
- Filters for SIP traffic (UDP/TCP ports 5060, 5061, 5062 + hostnames containing sip.google.com, voice.sip, pbx.voice)
- Logs SIP packets in human-readable format to logcat and/or file
- User runs capture, opens Google Voice app, makes test call, stops capture, we analyze logs
- New module
:netcapturein Modern-Apps repo - Minimal UI: Start/Stop buttons + log display
- VpnService implementation using Android's built-in VPN API (no root, no custom CA needed for SIP since it's plaintext protocol not HTTPS)
netcapture/src/main/java/com/vayunmathur/netcapture/MainActivity.kt— UInetcapture/src/main/java/com/vayunmathur/netcapture/PacketCaptureVpnService.kt— VpnService implementationnetcapture/src/main/java/com/vayunmathur/netcapture/PacketParser.kt— Parse IP/UDP/TCP headers, extract SIP payloadnetcapture/src/main/AndroidManifest.xml— VpnService declaration + BIND_VPN_SERVICE permissionnetcapture/build.gradle.kts— module config
- SIP REGISTER requests/responses (will show username, realm, nonce, server IP)
- SIP INVITE requests (for outgoing calls)
- DNS queries for voice.sip.google.com (to see what IPs it resolves to, if any)
- Any HTTPS API calls to GetSIPRegisterInfo endpoint (to confirm our reverse-engineered structure matches)
[SIP] 192.168.0.135:45678 -> 142.250.x.x:5061 REGISTER sip:voice.sip.google.com SIP/2.0
[SIP] Via: SIP/2.0/TLS ...
[SIP] From: <sip:+1213... @voice.sip.google.com>;tag=...
[SIP] To: <sip:+1213... @voice.sip.google.com>
[SIP] Authorization: Digest username="...", realm="...", nonce="...", uri="...", response="..."
This will definitively reveal:
- Actual SIP server IP address (bypassing the DNS NXDOMAIN issue — official app must resolve it somehow)
- SIP username format
- SIP realm value
- Auth scheme (Digest vs Bearer)
- Whether it's SIP over UDP, TCP, or TLS