Greetings,
I did some testing and onsend route is not executed on local generated
requests.
I asked if they work the same way because for relayed requests, the on send
is the last route before sending the packet.
I'm asking this because I'm trying to debug an issue with my probings via
dispatcher, where some OPTIONS requests are not being sent to its
destination. I got a log on local-request and all OPTIONS are logging there
correctly. However, if i do a pcap capture on the kamailio machine, not all
options are there. That being said, i want to make sure that the problem
is not in my Kamailio configuration and it is sending the correct number of
packets.
Best regards
A terça, 27/08/2019, 08:24, Daniel-Constantin Mierla <miconda(a)gmail.com>
escreveu:
Hello,
On 26.08.19 18:26, Duarte Rocha wrote:
Greetings,
Does "event_route[tm:local-request]" works like onsend route ?
no, event_route[tm:local-request] is for requests initiated by Kamailio
via tm module (but other modules can be the source of the requests, as they
use internally tm module, like msilo, uac, ...).
I'm having some problems and i'm using local-request to debug and i found
this on the documentation : "Executed after the tm module has sent a local
generated, transaction stateful request."
That was misleading indeed and wrong, because it is executed before
sending out the request. The content of the request can still be changed
there.
I'm logging all the requests that go through this route. Is this really
the last place before kamailio send the request?
I am not sure if the onsend_route is executed for local generated requests
-- it was desinged initially to be executed for requests that are received
and forwarded by kamailio. So you may need both
event_route[tm:local-request] and onsend_route to catch all outgoing
requests. In other words, the onsend_route is the last one executed before
sending out, where the content of what is going to be sent cannot be
changed, but you can still drop the request. If you don't see there the
local generated requests, then you have to use also
event_route[tm:local-request].
If the request is logged here, is there anything more in kamailio that can
stop the request (pipelimit, etc) ?
Stopping the request in event_route[tm:local-request] and onsend_route can
be done by using 'drop'. When you do it, being it based on pipelimit,
userblacklist, etc ..., it is up to you.
If a packet gets logged on this route does that mean that it was already
sent?
No. Afaik, there is no event_route executed after the request was already
sent. Although it might be useful for doing some ops that should not add
delay to routing the request...
Cheers,
Daniel
Best Regards,
Duarte Rocha
_______________________________________________
Kamailio (SER) - Users Mailing
Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
www.asipto.comwww.twitter.com/miconda --
www.linkedin.com/in/miconda