[SR-Dev] register_timer versus register_timer_process

Jan Janak jan at iptel.org
Fri Mar 6 14:53:29 CET 2009


On 06-03 15:44, Daniel-Constantin Mierla wrote:
> Hello,
>
> On 03/06/2009 03:16 PM, Jan Janak wrote:
>> Hello,
>>
>> There are two functions in the implementation of timers in kamailio,
>> register_timer and register_timer_process. What is the different between those
>> two functions and which should be used when?
> the first one is to register a function to be executed by the main timer  
> process. Second is to create a new time process dedicated to run a  
> specific function.
>
>>  I noticed that, for example, the
>> htable module seems to be using them interchangeably, there is a modparam
>> which controls which function is gonna be used.
>>
>> Can we replace register_timer_process with register_timer function from the
>> sip-router core?
>>   
> Doesn't ser support to create a new timer process? How is it in the  
> timer module? Is the route executed by the main timer process?
>
> Idea behind dedicated timer process is to be able to execute timely  
> operations there without affecting the main timer which deals with  
> retransmissions, etc.

I see, we have the concept of slow and fast timers, so in that case the stuff
that needs its own timer process should probably be executed from within the
slow timer handler.

  Jan.



More information about the sr-dev mailing list