pjproject icon indicating copy to clipboard operation
pjproject copied to clipboard

Feature Request: ability to prevent loading of or cleanly unregister unused modules

Open mscdex opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. Currently pjsua's sub modules do not utilize module load/unload callbacks, so it is not possible to safely unregister them.

On a related note, while pjsua exposes a public function for retrieving pjsua's pjsip_endpoint, there is no way to access members of that endpoint because the struct's definition is inside sip_endpoint.c instead of sip_endpoint.h. This means one needs to copy the struct definition (and any other non-public, associated structs used by pjsip_endpoint) in order to search for loaded modules for the purposes of unregistering them (by name).

Describe the solution you'd like Either prevent the loading of non-essential modules (possibly via pjsua config) and/or be able to cleanly unregister them after pjsua has been initialized.

Describe alternatives you've considered Having to maintain patches on top of pjsip? That's not something I'm really excited about...

Additional context Specifically the modules I'd like to prevent from being registered or be able to cleanly unregister afterwards are:

  • mod-pjsua-im
  • mod-pjsua-pres
  • mod-refer
  • mod-mwi
  • mod-presence
  • mod-evsub

mscdex avatar Jun 17 '22 19:06 mscdex