but I’m going to set this setting where?
Because I have an extension and this extension logs in with an agent. What expires is the connection between the extension and the agent and the agent logs out.
My sip.conf uses session-expires 3600
Session expires isn’t an absolute limit. It can be, and normally is refreshed.
A symptomatic attack on the problem never solves the real problem, and, in any case, it is very likely that the other side will force the time down to something more sensible, if you set a huge value.
I think it likely that the system encountered a period of network overload long enough that all the retransmissions of the refresh failed. It could be a dynamic rule on a router that timed out, but normally the session timer refreshes would reset this.
The OP, or the agent, could also have a broken ISP that changes IP addresses on the fly.