[Serusers] Concurrent Calls

Adrian Georgescu ag at ag-projects.com
Wed Oct 27 12:15:36 CEST 2004


Another possibility but for those using mediaproxy, you can see all the 
ongoing sessions UA type, codec etc in console or in the web.

Adrian

 >>>>>
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1494 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20041027/13e9afd5/attachment.bin>


More information about the sr-users mailing list