What are you trying to accomplish? It sounds like maybe mod_limit could be used, depending on exactly what you are trying to do.
-MC
HiIs there any way to use sofia apis to find out if currently there is a call from or to a user? reading sofia code shows that its using sip_dialogs table to track user presence and call data but there is no api call such as (sofia ...) which shows that data.thanx