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

2021-03-01 Thread Juha Heinanen
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


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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

2021-03-01 Thread Olle E. Johansson


> On 1 Mar 2021, at 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,
In implementations yes. But you can freely choose what you have in your
service. Which is what NAPTR is there for - to indicate to users what
kind of protocols your service supports and you preference.

To clarify: There’s no mandate that a service has to support UDP.

> 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.
I have services that are TLS only. That’s RFC compliant too :-)

/O

> 
>> 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
> 
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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

2021-03-01 Thread Daniel-Constantin Mierla
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


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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

2021-03-01 Thread Daniel-Constantin Mierla
Hello,

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.

Have you tried with no udp socket and the event route was not executed?

Cheers,
Daniel

On 26.02.21 16:51, Juha Heinanen wrote:
> Is there a way to execute event_route when all modules have been loaded
> and Kamalio is ready to process requests?
>
> I found this in core cookbook, but what if there is no udp sip worker
> processes?
>
>   event_route[core:worker-one-init] - executed by core after the first
>   udp sip worker process executed the child_init() for all modules,
>   before starting to process sip traffic
>
> -- Juha
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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

2021-02-26 Thread Juha Heinanen
Is there a way to execute event_route when all modules have been loaded
and Kamalio is ready to process requests?

I found this in core cookbook, but what if there is no udp sip worker
processes?

  event_route[core:worker-one-init] - executed by core after the first
  udp sip worker process executed the child_init() for all modules,
  before starting to process sip traffic

-- Juha

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users