[sr-dev] fork process in kamailio

Miklos Tirpak miklos at iptel.org
Mon Oct 4 10:26:48 CEST 2010


You should also update the local configuration of the forked processes, 
please read the section "5. Refreshing the configuration" in doc/cfg.txt.
Without this, the new child processes may have an older version of the 
config than the core or the other children.

(I will add a note about this into modules_init.txt)

Miklos

On 09/09/2010 10:25 PM, Andrei Pelinescu-Onciul wrote:
> On Sep 04, 2010 at 19:49, Stefano Poli<stefano.poli87 at gmail.com>  wrote:
>> Hi,
>> I have to modify kamailio to add QoS to presence module. I have to fork a
>> new process that is allowed to access presentity table into database but
>> with the classik fork() function i cannot access to it. Have I to do
>> something in particular?
>> Thanks!
>
>
> The proper way to fork a process that can access internal structures or
> send packets, in kamailio>= 3.0, ser>= 2.0 or any sip_router version
> is using fork_process() from mod_child, when rank == PROC_MAIN.
> You should also register the number of processes you intend to fork,
> from mod_init using register_procs(no).
>
> For more info and an example see doc/modules_init.txt
> (http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob_plain;f=doc/modules_init.txt;hb=HEAD),
> in particular the "Forking new SIP-router processes from a module"
> example.
>
>
> Andrei
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev



More information about the sr-dev mailing list