[SR-Users] [tm-local-request] usage

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 27 09:24:37 CEST 2019


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 List
> sr-users at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190827/c5a80f5f/attachment.html>


More information about the sr-users mailing list