Your log seems to show a networking problem, not related to the ring group. Answer(“SIP/cheapconnect-00000019”, “”) is executed, so that the announcement can be played to the caller. But the expected ACK response to the 200 OK never arrives; chan_sip does several retries and gives up 31 seconds later. The BYE request would be sent over the same path, so it’s also not received and the phones ring for the full 20 seconds. (When you don’t have an announcement, there is no Answer until an extension is picked up. When the caller hangs up, cheapconnect sends a Cancel over the same path as the original INVITE, so the problem does not occur.)
Unfortunately, this theory has a major flaw – I’d expect that if the caller does not hang up and and the call is answered at one of the extensions, it would be dropped after ~31 seconds. If that issue were present, it would have been your major complaint, so I assume that normally answered calls are ok. However, I’m curious if the BYE still doesn’t get through. Make a test call to the external number, answer it at one of the ringing extensions, then hang up the calling phone and report whether the extension immediately shows the call as disconnected.
If this a networking issue, please report:
Is PBX on-site or in the cloud? If the latter, with which provider?
Is it on a public IP or behind a NAT?
In General SIP Settings, are External Address and Local Networks properly set?
Did you try the cheapconnect trunk with pjsip and have trouble?
Which hardware firewall, if any?
If using firewalld, iptable or another software firewall, what special settings have you implemented?