Skip to main content
This page covers the five most common problems reported when integrating with the Humain SIP gateway. Work through each symptom systematically — most issues resolve at the codec or credential step.
One-way audio almost always means the RTP media stream is blocked or arriving at the wrong address. The SIP signalling completed (you got a 200 OK) but the media path is broken.Checklist:
  1. NAT traversal — Is your PBX behind NAT? The Contact and Via headers in your SIP INVITE must contain your public IP, not a private 192.168.x.x address. Configure externip (Asterisk) or ext-rtp-ip / ext-sip-ip (FreeSWITCH) to your public IP.
  2. Firewall — RTP ports — The Humain gateway sends RTP from the range 10000–20000 UDP. Your firewall must allow inbound UDP on the ports listed in the SDP m=audio line, and outbound UDP to sip.humain.ai on the same range.
  3. Codec mismatch — If both sides claim to support a codec but disagree on the payload type number, media is silently discarded. Capture the SDP exchange with sngrep and verify the a=rtpmap lines match.
  4. SRTP key mismatch — If you negotiated SRTP, verify the a=crypto attribute in the SDP answer is being applied. A key mismatch results in silent media on one or both sides.
Capture RTP to diagnose:
The call connected and audio is flowing but the AI never speaks. This typically means the session was not opened before the SIP INVITE, or the session was already closed.Checklist:
  1. Session opened before INVITE — The Humain SIP gateway maps an incoming INVITE to an open session using the SIP user part (the session_id). If you dial sip:hk_sess_XYZ@sip.humain.ai but the session hk_sess_XYZ was never opened, the gateway rejects or drops the call. Ensure POST /v1/sessions succeeds and returns the session_id before you trigger the Dial or transfer.
  2. Credential error — Check your server logs for a 401 Unauthorized or UNAUTHENTICATED error from the Humain API. The session will not open with an invalid or revoked credential.
  3. Session already ended — If the session was accidentally closed (e.g., a timeout or a prior error path that called /end), the gateway will reject audio. Open a fresh session.
  4. Wrong session mode — Sessions opened with mode: "text" or mode: "voice" (WebRTC) will not accept SIP audio. Always open sessions with mode: "voip" for SIP integrations.
Test session opening independently:
Transcription quality is a function of audio bandwidth, background noise, and codec choice.Quick wins (in order of impact):
  1. Switch to G.722 — If you are using G.711 (8 kHz), upgrade to G.722 (16 kHz). The wider audio bandwidth significantly improves Gemini Live’s transcription accuracy, especially for accented speech and proper nouns. See the codec guide for configuration examples.
  2. Check for echo — Echo from a badly configured analogue gateway or ATA degrades transcription accuracy. Enable Acoustic Echo Cancellation (AEC) on your ATA or softphone.
  3. Check packet loss — High packet loss fragments speech. Run a quick MOS test:
    If packet loss exceeds 1%, investigate your network path.
  4. Avoid transcoding chains — G.729 → G.711 → Opus involves two lossy conversions. Use a single codec end-to-end where possible.
  5. Kiosk language setting — Verify the kiosk is configured for the correct language in the admin panel (Kiosk → Voice settings → Language). A kiosk set to English will produce high error rates on Spanish input regardless of audio quality.
The SIP trunk cannot register with sip.humain.ai. This is almost always a network or credential issue.Checklist:
  1. DNS resolution — Verify sip.humain.ai resolves from your server:
    If DNS fails, check your server’s resolver configuration.
  2. Firewall — SIP port — Port 5061 TCP (TLS) must be open outbound to sip.humain.ai. Test with:
  3. TLS certificate — The Humain gateway uses a publicly trusted TLS certificate. If your PBX has a misconfigured CA bundle it may reject the handshake. On Asterisk:
  4. Credential format — The SIP username and password must both be set to your full hk_live_… token. Using only the prefix or a truncated token will cause 403 Forbidden.
  5. Clock skew — Some SIP implementations include a Date header. If your server clock is more than 60 seconds off UTC, authentication may fail. Run timedatectl to verify.
If every call drops at a predictable time boundary, the session is being abandoned by the server before the call ends.Causes:
  • Session inactivity timeout — Humain sessions in voip mode time out after 30 minutes of inactivity (no audio received). If your PBX holds a call on mute for longer than this, the session closes and the gateway drops the RTP stream. Solution: implement a periodic comfort noise or re-INVITE to keep the media path active.
  • PBX session timer (RFC 4028) — Some PBXes enable SIP Session Timers by default and will send a re-INVITE every 30 or 90 seconds to refresh the session. Ensure the Humain gateway’s 200 OK to the re-INVITE is not being blocked by a firewall or ALG.
  • NAT mapping expiry — Consumer-grade NAT devices expire UDP mappings after 30–60 seconds of silence. Enable SIP keep-alives (OPTIONS ping) on your PBX, or switch to TCP/TLS transport which maintains a persistent connection.
Asterisk keep-alive:
Disable problematic SIP ALG on your router/firewall if it is rewriting SIP packets. SIP ALGs on consumer routers are a frequent source of intermittent call drops and one-way audio.

Capturing a SIP trace

For issues not covered above, capture a full SIP trace and share it with support@humain.ai:
Include the following in your support request:
  • The SIP trace (.pcap or sngrep export)
  • Your PBX type and version
  • The codec configured on the trunk
  • The session_id of a failed call (from your server logs)