[SR-Users] event_route when all modules have been loaded?

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 1 12:33:15 CET 2021


Indeed, the code reveals the event route is executed in the loop
creating udp workers.

For now, an workaround I could think about would be to create a single
udp worker on loopback, like:

socket_workers=1
listen=udp:127.0.0.1:5060

There is a bit of overhead with an additional worker process, but if you
need in stable branch, that's one way to do it. For master branch, you
can try to change the src/main.c and executed run_child_one_init_route()
for first tcp child, if udp sockets are not set.

Cheers,
Daniel

On 01.03.21 12:11, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> I think it does not matter the type of transport for the worker, likely
>> the docs had udp because that's usually the first worker. Also, IIRC,
>> sip specs mandate UDP support, but kamailio can start without.
> Yes, SIP specs mandate UDP support, but if a sip proxy does now have any
> clients using UDP, it does not make sense to enable UDP transport to
> consume resources for nothing.
>
>> Have you tried with no udp socket and the event route was not
>> executed?
> Yes, I tried I like this:
>
> event_route[core:worker-one-init] {
>     xinfo("********** at core:worker-one-init\n");
> }
>
> and didn't get the message to syslog when I started Kamailio.  So it
> works as specified in core cookbook.
>
> -- Juha
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla




More information about the sr-users mailing list