The local-request event route is not documented. When using our friend google I find an old blog post by @miconda but not much else. I can come up with some good text, but need to know what can be done in the route, like
- modify request uri - add/remove headers - drop request - add/modify destination uri ($du)
The first event routes were listed in the wiki (this particular one being in the past the local_route):
* https://www.kamailio.org/wiki/cookbooks/4.4.x/core#event_route
Not sure about the drop (needs to be tested or checked in the c code), but the others listed above should be possible.
- Request URI can be changed.
- Drop does not seem to work - Modification of dest URI does not seem to work (possible bug? )
Anyone that knows the dirty inner workings of tm:local-request ? Are my findings correct or do they indicate bugs?
I looked a bit at the code and $du is not considered anymore, because the next hop address is computed by the c function executed by various modules that send local requests. The event route is executed later, when the transaction structure is already created.
So drop and considering new $du may be made features requests, but they may not be feasible without major changes.
You can document the current behaviour as it is. In the future, when one needs changes in this behaviour, then c code has to be contributed.
OK, will do.
Closed #980.
@henningw pushed more docs about `event_route[tm:local-request]` - 17145075e77c7f962703ce401e879887a5717265 .
If something else is needed, just commit to the docs.
I Have a query,
What is the core:drop_requests in kamailio.