@miconda commented on this pull request.
@@ -2147,6 +2401,9 @@ static int child_init(int rank)
/* probe rtpengines only in first worker */ if(build_rtpp_socks(0, 1)) return -1; + + if (rtpengine_dtmf_event_sock.len > 0) + rtpengine_dtmf_events_loop(rank);
It seems to block the child process with rank 1 (PROC_SIPINIT), which should not be done, because it can create problems for other modules such as usrloc.
A new process has to be started -- in mod init, it has to be registered with:
``` register_procs(1); cfg_register_child(1); ```
And in child init created with fork_process(), something like:
``` if(rank == PROC_MAIN) { /* fork worker process */ newpid = fork_process(PROC_RPC, "RTPENGINE DTMF WORKER", 1); if(newpid < 0) { LM_ERR("failed to fork worker process %d\n", i); return -1; } else if(newpid == 0) { if(cfg_child_init()) return -1; /* child - this will loop forever */ rtpengine_dtmf_events_loop(); } else { /* parent process*/ } return 0; } ```