In a scenario with Lync 2013 Standard Edition and Enterprise voice, I recently experienced problems with voice calls to PSTN users. All calls would connect normally and last for about 5 mins and 20 sec, and then it looked like the Lync client terminated the call normally(at least thats what the Monitoring reports told me).
The PSTN connection is IPT over internet(which is quite new to me), and it looked like everything was working fine both with internal firewalls and outbound to the IPT provider.
After i bit of troubleshooting and searching for the solution to this, I checked with the IPT provider to see if there was something going on at their side. They told me that the sessions seemed to time out in the firewall, but this only affected outbound calls(as far as I know, as we didn’t test this with incomming calls) made after a long pause in voice traffic(over night).
The solution to the problem was to enable outbound SIP OPTIONS on the IPT provider towards the Lync Mediation server. This allows for the TCP session to be kept alive, and the reuse of this session when the next call comes in. The problem was the TCP session timeout and termination in the firewall.