(also added sr-dev)
Hello,
It probably not exactly what you are looking for, but a common way for modules to provide "hooks" towards the configuration for later extensions is about the event_route facility. You can find many of this event routes used from modules (on simple example is dispatcher module).
Inter-module communication or usage is usually facilitated by an API export from the providing module, and an API import/binding on the consuming module. Examples here are the usrloc and registrar modules. The sl module API is also used from many other modules to send messages.
Cheers,
Henning
-----Original Message----- From: Valentin Christoph Christoph.Valentin@kontron.com Sent: Montag, 24. April 2023 15:44 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] hooking mechanism for routing blocks
Dear all,
I am looking for some hooking mechanism for user defined routing blocks.
Is something like this already available?
1) a common part of the routing configuration shall not (or only slightly) be changed, after some hooks have been implemented Something like a function "engage_hooks()" of some "hook_module"?
: Routing config that should not be changed by application developers engage_hooks(HOOK_TYPE); Routing config that should not be changed by application developers :
2) one application developer may "hook" new parts of the routing configuration into this, by modparam("hook_module", "hook", "name=MY_RB;type=HOOK_TYPE;prio=50); : : Route [MY_RB] { Do something at hook HOOK_TYPE; } : :
3) another application developer might want to "hook" into the same HOOK_TYPE with a higher priority modparam("hook_module", "hook", "name=ANOTHER_RB;type=HOOK_TYPE;prio=20); : : Route [ANOTHER_RB] { Do another thing with higher priority at hook HOOK_TYPE } : :
Kr, Christoph __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: