Modules are the primary means to extend PJSIP!Modules are the primary means to extend PJSIP. Without modules, PJSIP would not know how to handle messages, and will simply discard all incoming messages.
Modules are registered by creating and initializing pjsip_module structure, and register the structure to PJSIP with pjsip_endpt_register_module().
The PJSIP Developer's Guide has a thorough discussion on this subject, and readers are encouraged to read the document for more information.
Module priority guidelines.
This is the priority used by transport layer.
This is the priority used by transaction layer.
This is the priority used by the user agent and proxy layer.
This is the priority used by the dialog usages.
This is the recommended priority to be used by applications.