Juha,

o Juha Heinanen on 09/17/2011 07:15 AM:
Stefan Sayer writes:

in 1.4, sbc with prepaid enabled and a little bit customized cc_acc is
the right choice imo.

stefan,

i took a short look at the code and found that limiting number of
simultaneous calls does not need any kind of acc module.  the feature
can be directly integrated to SBC.cpp.  although i'm a poor c++
programmer, i'll try to get in done during the next couple of days.

the idea is to use the following new profile params:

call_control_enabled=yes|no
call_control_uuid=$H(P-Caller-Uuid)
call_control_max_calls=$H(P-Caller-Max-Calls)

on invite check if uuid is in call_control map and if it is check if its
value in the map is>= max_calls.  if yes, disconnect the call.  if in
map, increase its map value by 1.  if not in map, add it there with
value 1.

on bye, decrement uuid map value by 1 (if in map).

if i have not missed anything, that is about all.  trying to use prepaid
for this task really is a big overkill.
if you don't set the timer, prepaid functionality does not do anything else, so no 'big overkill' here.

most probably someone else will also need other call control policies, so please keep the actual call control logic out of the sbc module. performance-wise it's very little overhead calling a DI function.

what in the API i proposed does not fit your needs?

Stefan


-- juha

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to