o Juha Heinanen on 09/16/2011 03:57 PM:
i'm thinking what would be best (or recommended) way to use sems to
limit the number of simultaneous calls placed by a user.
I'd recommend sbc and prepaid (see below)
i know that i can always do it by writing an ivr application.
similarly, perhaps dsm could be used.
then i went and read sbc docs and noticed that prepaid together with
cc_acc might do it, that feels like a big overkill for this kind of
simple task.
why big overkill?
if you want to properly count parallel calls, you need to be dialog
stateful, hence a b2bua. SBC module itself doesn't add much overhead
if you don't enable SST, rtprelay, filters etc.
in 1.4, sbc with prepaid enabled and a little bit customized cc_acc is
the right choice imo.
i didn't find any docs on how to extend sbc with new features, such as
enable_call_control=yes
call_control_uuid=$H(P-Caller-Uuid)
call_control_calls=$H(P-Caller-Number-of-Simultaneous-Calls)
perhaps a more general purpose thing would make sense that just makes di
call on each invite and bye with some params and accepts invite if di
call returns positive result.
that's basically prepaid, note that you can do:
prepaid_uuid=$H(P-Caller-Uuid)
prepaid_acc_dest=H(P-Caller-Number-of-Simultaneous-Calls)
and modify cc_acc a little to count the calls for uuid.
the only missing piece is that it will set timers (disbale that by
commenting the setTimer call).
I'm thinking about extending that interface to:
call_control_uuid=...
call_control_*=...
and return values:
action
0 - drop
1 - refuse with code/reason
2 - set timer (prepaid)
i think that would fit your usecase as well.
any other wishes?
Stefan
any comments?
-- juha
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev
--
Stefan Sayer
CEO (Geschäftsführer)
FRAFOS GmbH
email: [email protected]
mobile:+49 162 1366449
www.frafos.com
Prinzessinnenstr. 19/20 betahaus
10969 Berlin
Germany
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev