Hi, One of the biggest problem with VOIP service is how to defend against unlimited usage. openning the SIP to an end user is pretty scary thing as the following 3 things could happen:
1. people uses the same username/password for multiple phone. This is addressed by one discussion thread in this mailing list, basically, forwarding the traffic to the last registered AOR using
modparam("usrloc", "desc_time_order", 1) modparam("registrar", "append_branches", 0)
2. people can use a single username/password , but uses it as a trunk, so they run multiple channels of voice call . With this they can run up thousands of dollars of bills on the kamailio owner. There are suggestion that we use dialog module to limit it. However no sample code is given. this is a sample code I googled: if ( avp_check("$DLG_count", "gt/i:10") ) { sl_send_reply("403","no more calls accepted"); exit; } but looks DLG_count is a global variable. Does any body have a better example ?
3. even if with single channel of communication, if somebody still run the channel in a shared environment, in theory, they can call 60*24*30 minutes=43200 minutes a month. take a cheap wholesale cost of 1 cent per minute, this will run to $432 per month for the kamailio owner. there is no way a voip operator can charge $432 for a user in current market. so most of the carrier will limit monthly usage to 2500 minutes per month. I searched kamailio modules, I can't find any easy way to do it. does anybody have a good solution ?
Jimmy.