We were recently investigating some errors on a Lync server where we were getting “Gateway responded with 503 Service Unavailable” errors. With further inspection we found that the issue was with unassigned numbers where the gateway was forwarding the call to Lync. Lync would recognize that the number was unassigned and forward the call back to the gateway and the gateway would send the call to the Telco provider. The Telco provide, in turn, would send the call back to the gateway. This would continue until the channels were saturated or the call would timeout.
To avoid this issue we implemented the Unassigned number feature within Lync 2013. This worked beautifully on the inside of the network but when trying from external the call would fail.
As is usually the case, we were “bitten” by a new feature within Lync 2013 allowing trunk-to-trunk transfers. Trunk-to-trunk transfer is engaging prior to the call reaching the Unassigned number configuration.
The solution is to create a new Pool Trunk in which you remove all the PSTN Usage records. This effectively prevents the Trunk-to-trunk transfer from engaging. If you need Trunk-to-trunk routing, a separate route should be built for the purpose you intend.
Incidentally, this will also affect Call Park retrieval functionality.