Asterisk developers have built check that prevents the module is loaded from another binary assembly, as this may cause a malfunction PBX Asterisk. check algorithm checks the value of a constant AST_BUILDOPT_SUM where hash sum at module’s compile time was recorded. Using this hash it’s possible to uniquely identify each binary assembly. It looks like 32 hexadecimal digits consecutive: c03a66cc29fb79f47c469d2b0a362e5e. There are two ways to bypass validation.
Method one:
You need to find a line like this in any of the modules in your IP-PBX Asterisk installation . It is usually near to the end of file. Very handy for things like this is to use a hex editor. For example, for Hex Workshop: Tools —> Find Strings… , specify the minimum length of 32 characters and get a set of rows. The hash sum we are interested in is located next to the information about the version of the compiler:
In the Linux environment we can extract the hash sum with the following command:
1 |
grep -Eao "[0-9abcdef]{32}" /usr/lib64/asterisk/modules/res_config_mysql.so |
Copy and paste this line into the module you want to download, in place of hash sum. Save the file and copy it to Asterisk modules folder (usually /usr/{lib,lib64}/asterisk/modules). In Asterisk console run:
1 2 3 4 |
asterisk*CLI> module load res_config_mysql.so Loaded res_config_mysql.so == Parsing '/etc/asterisk/res_config_mysql.conf': == Found Loaded res_config_mysql.so |
The module has been loaded.
Method two:
In file «include/asterisk/buildopts.h» edit the value of AST_BUILDOPT_SUM constant. Rebuild modules:
1 |
make |
Copy it to IP-PBX Asterisk modules folder and load:
1 2 3 4 |
asterisk*CLI> module load res_config_mysql.so Loaded res_config_mysql.so == Parsing '/etc/asterisk/res_config_mysql.conf': == Found Loaded res_config_mysql.so |
Note that, it’s needed to edit file «include/asterisk/buildopts.h» every time after you run “make menuselect“.