Module 如何向现有Kamailio服务器添加新模块?

Module 如何向现有Kamailio服务器添加新模块?,module,installation,kamailio,Module,Installation,Kamailio,我正在使用Kamailio 4.4服务器。我想在此服务器上安装http\u async\u client模块。我查看了模块目录(/usr/local/lib64/kamailio/modules),以检查此http\u async\u客户机模块是否已存在,但不存在 我搜索了一个解决方案,只搜索了在编译时包含新模块的方法 我可以在上找到模块源代码。但我不知道在现有的Kamailio上安装新模块的步骤 更新:我已尝试从目录/usr/local/src/kamailio-4.4/kamailio运行以

我正在使用Kamailio 4.4服务器。我想在此服务器上安装http\u async\u client模块。我查看了模块目录(/usr/local/lib64/kamailio/modules),以检查此http\u async\u客户机模块是否已存在,但不存在

我搜索了一个解决方案,只搜索了在编译时包含新模块的方法

我可以在上找到模块源代码。但我不知道在现有的Kamailio上安装新模块的步骤

更新:我已尝试从目录/usr/local/src/kamailio-4.4/kamailio运行以下两个命令。但是得到了以下错误

make modules-cfg include_modules="http_async_client"
make modules
错误包括:

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

步骤将新模块加载到Kamailio服务器。(这可能不是一种直接的方法,但它是有效的)

  • 直接检查默认模块中是否存在模块/usr/local/lib64/kamailio/modules
    如果找到,在kamailio.cfg文件的加载模块部分添加loadmodule“module\u name.so”
  • 如果在默认模块目录中找不到该模块,您可以在默认模块源代码目录中检查该模块的源代码/usr/local/src/kamailio-4.4/kamailio/modules
  • 如果找到源代码,请输入模块目录。然后通过以下命令创建模块的共享对象文件(.so)

    /配置
    制造
    进行测试
    安装

  • 然后您将获得一个共享对象文件(.so)。将该文件复制到默认模块目录中。并从步骤1中提到的kamailio.cfg文件加载此模块

  • 如果默认源代码目录中不存在模块源代码,则需要从web下载源代码。然后执行步骤3和4


  • 步骤将新模块加载到Kamailio服务器。(这可能不是一种直接的方法,但它是有效的)

  • 直接检查默认模块中是否存在模块/usr/local/lib64/kamailio/modules
    如果找到,在kamailio.cfg文件的加载模块部分添加loadmodule“module\u name.so”
  • 如果在默认模块目录中找不到该模块,您可以在默认模块源代码目录中检查该模块的源代码/usr/local/src/kamailio-4.4/kamailio/modules
  • 如果找到源代码,请输入模块目录。然后通过以下命令创建模块的共享对象文件(.so)

    /配置
    制造
    进行测试
    安装

  • 然后您将获得一个共享对象文件(.so)。将该文件复制到默认模块目录中。并从步骤1中提到的kamailio.cfg文件加载此模块

  • 如果默认源代码目录中不存在模块源代码,则需要从web下载源代码。然后执行步骤3和4