How to add a new module to existing Kamailio Server? - module

I am using a Kamailio 4.4 server. And I would like to install http_async_client module to this server. I have looked on the module directory(/usr/local/lib64/kamailio/modules) to check wheather this http_async _client module already exist there, but it was not there.
And I searched for a solution and only found the method to include new module at the compile time.
I could find the modules source code on GitHub. But I don't know the steps to install a new module to the existing Kamailio.
Update: I have tried with running the two commands below from directory /usr/local/src/kamailio-4.4/kamailio. but got the following error
make modules-cfg include_modules="http_async_client"
make modules
Errors are:
CC (gcc) [M http_async_client.so] async_http.o
async_http.c:42:26: fatal error: event2/event.h: No such file or directory
compilation terminated.
../../Makefile.rules:97: recipe for target 'async_http.o' failed
make[1]: *** [async_http.o] Error 1
Makefile:511: recipe for target 'modules' failed
make: *** [modules] Error 1

Steps to load new module to Kamailio server. ( It may not be a direct way to do, but it works)
Check the modules is exist in the default module directly /usr/local/lib64/kamailio/modules.
If found, add loadmodule "module_name.so" in load module section in kamailio.cfg file.
If the module is not found in default module directory, you can check for the source code of that module in the default module source code directory /usr/local/src/kamailio-4.4/kamailio/modules.
If source code found, enter to the module directory. Then create modules' shared object file(.so) by following commands.
./configure
make
make test
make install
Then you will get a shared object file(.so). Copy that file into the default module directory. and load this module from the kamailio.cfg file as mentioned in step 1.
If module source code does not exist in the default source code directory, You need to download the source code from the web. And follow step 3 and 4.

Related

Python wheel installed successfully but unable to import modules

I have a myFunction.pyd file which I have tested to make sure that modules defined internally are accessible.
I then created a wheel file myFunction-1.0-py3-none-any.whl
Finally using cmd prompt I installed the wheel file. I can then also see the following location:
C:\Program Files\Python38\Lib\site-packages\myFunction-1.0.dist-info
However, when I do the following import myFunction as mf it gives error ModuleNotFoundError: No module named 'myFunction'
Only thing I can think of is I didn't do anything with the pyd file that I had generated. Do I need to also move that file to some location?

odoo.sh warning when creating new module : invalid module names, ignored: shelter

I am new to Odoo.sh.
When I use the editor to create a new module using the scaffold command
odoo-bin scaffold shelter
The module is named shelter, however, when I try to update current module,
it shows warning:
odoo.modules.loading: invalid module names, ignored: shelter
When i connect to the build, I was not able to see the new module I build under apps.
Anyone know where the problem is?
Question updated:
In odoo sh, under odoo folder, tried the update all module command
In terminal, the warning shown above went away.
However, still no module found named "shelter" after I activate the dev mode and update the apps list.
no module found
Value of conf file listed:
conf file list
well The user is answered in comments. so I am adding the answer for documentation purpose.
when scaffolding a new module make sure that it is added in addon path or listed in odoo configuration file.

How to install Ejabberd Custom Module

I have written a ejabbed custom module but i am not able to install it
According to ejabbed module doc we have to put module files in $HOME/.ejabberd-modules then use ejabberdctl module_check to check the module but i am getting error
Error : not available
I guess your are following the instructions from https://docs.ejabberd.im/developer/extending-ejabberd/modules/#managing-your-own-modules
Did you create the spec file, as mentioned in this paragraph?
and creating a specification file in YAML format as
mod_mysupermodule.spec (see examples from ejabberd-contrib). From that
point you should see it as available module.

Which module loads the requested library?

I'm using a remote machine from the terminal (ssh protocol). I don't have sudo powers on that.
I need to run a software that complains about a missing library:
error while loading shared libraries: libmpi_usempif08.so.40: cannot open shared object file: No such file or directory
I know that this library is loaded by some module, like:
module load ABC
but I don't know what's the right module.
How do I discover which module I should load in order to have a specific library?
Thank you!

autoload zf3 module without terminal command

I am using ZendFramwork3, i'm new in this so don't know how to autoload the module after creation without terminal command.
I am creating module with programme just by taking module name from the user the following things will be done :
- Module structure for new module with namespace and controller & view files will be placed under module folder
- ModuleName is initialised in modules.config.php in config folder
- Also entry in composer.json in autoload --> psr-4 initialisation done
After that i have to manually run the command "composer dump-autoload" to perfectly work my module but i don't want to do that manually rather i want solution for that to run it programmatically.
Thank you for the solution in advance.