External calls, going through our VOIP gateway, experience inconsistent audio. Internal calls work perfectly.
This only happens with chan_sip devices. This does NOT happen with PJSIP devices using the same route/trunk/VOIP gateway.
The call connects fine in either direction (dialing, or being dialed).
Audio to our chan_sip devices works perfectly.
But Outgoing audio from the chan_sip devices only half works; the sound goes through, but its choppy and cuts in and out.
Then, after 30 seconds, the call drops and this error shows in the Asterisk logs:
[2017-05-05 13:14:12] NOTICE[2716] chan_sip.c: Disconnecting call ‘SIP/8064-000000a0’ for lack of RTP activity in 31 seconds
[2017-05-05 13:14:12] NOTICE[2716] chan_sip.c: Disconnecting call ‘SIP/AsteriskGW1-000000a1’ for lack of RTP activity in 31 seconds
So it looks like it’s hitting the RTP timeout and disconnecting my call.
RTP Timeout: 30
RTP Keep Alive: 1
NAT: never
RTP Port Ranges: 10000 - 20000
Obviously I have a misconfiguration somewhere. Can anyone help me figure out where to go next?