[Freeswitch-users] .NET managed code - call count
Malay Thakershi
mthakershi at gmail.com
Wed Mar 6 22:53:13 MSK 2013
Hello,
I have a .NET managed module handling calls transferred to it via dial plan.
Now, I would like to maintain concurrent call count and decline the call if
it has reached certain limit.
What I do is, have a static variable to track this.
*private static int mIntCurCalls = 0;*
Then, when Run() is executed, I *mIntCurCalls++* after answering the call.
I perform check *if mIntCurCalls > "max allowed calls"* then I play a
message and hangup.
I *mIntCurCalls--* this when call is hung up.
Since last few days users have been complaining they get "busy" or "number
not available" when dialing toll-free number.
However, I don't see them getting the message that I have in the code.
Is the method of keeping call count correct?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130306/0fec1fda/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list