On the SIP trunk, turn on keepalives. You may need to consult with your SIP provider to determine if INFO or OPTIONS is preferred. On the SIP trunk configuration, add:
You can also specify a value in seconds like:
sip-keep-alive info 300
which will send a keep-alive message every five minutes.
I configured keep alive on the SIP trunk using Info and the call was terminated after 5 minutes.