[Serusers] Concurrent Calls

Greg Fausak greg at addabrand.com
Wed Oct 27 00:50:26 CEST 2004


This is a fairly hard problem.

For example, it is very difficult
to write a query that finds all UA devices that
have more than one call at a time.  Or a query that
determines the maximum number of calls that were
concurrently active during any given month for all accounts.

This leaves table scanning.  I can write a query
that finds :

1) The start time for all calls for a specific account
2) The end time for all calls for a specific account.

Union both result sets together, order by the time field.
Then increment a counter each time you see a start, decrement the
same counter when you see an end.  Whenever you get a new
'start' time check the concurrency counter against a max concurrency
counter.

This is a fairly expensive operation.  I don't think it can be done
by query alone.  It would take a query and some scripting.

Another way would be to keep track of 'max concurrent calls' via
a database trigger.  That is, I can create a trigger that accomplishes
the logic above every time an
acc record is inserted (and a new start time is recorded) and every
time it is updated (end time is recorded).

You could also do the same from a script inside the ser.cfg processing.

-g


On Oct 26, 2004, at 4:48 PM, Jan Janak wrote:

> No, scanning the acc table is the only (but not reliable) way. Note 
> that
> scanning acc table would probably introduce performance bottleneck if
> the table is big.
>
>   Jan.
>
> On 26-10 10:24, Darren Nay wrote:
>> Hey All,
>>
>> Simple question.  Is there currently a way to keep track of 
>> concurrent calls
>> with SER.  Ie.  To check current calls in progress.
>>
>> I believe that I can write an app that will scan the mysql "acc" 
>> table and
>> calculate this, but wanted to check and see if it had already been 
>> done
>> before I went to the trouble.
>>
>> Thanks!
>>
>> Darren Nay - dnay at ionosphere.net
>> VoIP Network Development
>> Ionosphere, Inc  (Champion Communications)
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers at lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>
Greg Fausak
www.AddaBrand.com
(US) 469-546-1265




More information about the sr-users mailing list