Tips For System Resource Management
Beginning with Voice Elements Server V2.1.6, the TelephonyServer object has a method to provide system resource information to the client.
What are my system resources?
The counts represent the maximum number of resources that you have shared access to on the server. In other words, if you have multiple clients accessing the same server, all clients must share the resources on that given server.
How do I reserve lines for incoming calls?
To reserve lines for incoming calls, keep a counter of the number of outbound calls you have in progress. For example, if you have 75 ports, when you get to your outbound limit of say, 60 calls, stop the logic for more outbound calls. When one of the outbound calls is finished, decrement your counter and signal your thread that starts new outbound calls.
How do I reserve lines for outbound calls?
To reserve lines for outbound calls, keep a counter of the current number of inbound calls in your application. When calls terminate, decrement the counter. When the new call event is fired signaling a new inbound call, check the counter. If the counter exceeds the number of inbound calls you wish to maintain, immediately disconnect the call. Or for a better user experience, you can play a busy signal for 5 to 10 seconds and then disconnect the call.