[asterisk-users] Asterisk 16.14.0 pjsip transport-tls cert parsing error

Ruisheng Peng rpeng at ifa.hawaii.edu
Wed Jan 27 15:57:40 CST 2021


Thanks Michael for the suggestion!  I've installed strace and assigned one
of the endpoints (SOFTPHONE_B) to use transport-tls. Then run strace (as
user asterisk):

[asterisk at voip1 ~]$ strace asterisk -rx "module reload res_pjsip.so"

execve("/usr/sbin/asterisk", ["asterisk", "-rx", "module reload
res_pjsip.so"], 0x7fff2ec172a0 /* 18 vars */) = 0

brk(NULL)                               = 0x1a7e000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f4802805000

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=59200, ...}) = 0

mmap(NULL, 59200, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f48027f6000

close(3)                                = 0

open("/lib/libasteriskssl.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\n\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=799664, ...}) = 0

mmap(NULL, 2105504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f48023e2000

mprotect(0x7f48023e4000, 2093056, PROT_NONE) = 0

mmap(0x7f48025e3000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f48025e3000

close(3)                                = 0

open("/lib/libasteriskpj.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300Y\3\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=8623248, ...}) = 0

mmap(NULL, 4169144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4801fe8000

mprotect(0x7f4802149000, 2093056, PROT_NONE) = 0

mmap(0x7f4802348000, 61440, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x160000) = 0x7f4802348000

mmap(0x7f4802357000, 568760, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4802357000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027f5000

open("/lib64/libxml2.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\351\2\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=1509600, ...}) = 0

mmap(NULL, 3575896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4801c7e000

mprotect(0x7f4801ddd000, 2093056, PROT_NONE) = 0

mmap(0x7f4801fdc000, 40960, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15e000) = 0x7f4801fdc000

mmap(0x7f4801fe6000, 4184, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4801fe6000

close(3)                                = 0

open("/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20!\0\0\0\0\0\0"..., 832) =
832

fstat(3, {st_mode=S_IFREG|0755, st_size=90248, ...}) = 0

mmap(NULL, 2183272, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4801a68000

mprotect(0x7f4801a7d000, 2093056, PROT_NONE) = 0

mmap(0x7f4801c7c000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f4801c7c000

close(3)                                = 0

open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\16\0\0\0\0\0\0"..., 832) =
832

fstat(3, {st_mode=S_IFREG|0755, st_size=19248, ...}) = 0

mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4801864000

mprotect(0x7f4801866000, 2097152, PROT_NONE) = 0

mmap(0x7f4801a66000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f4801a66000

close(3)                                = 0

open("/lib64/libxslt.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\254\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=258344, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027f4000

mmap(NULL, 2351336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4801625000

mprotect(0x7f4801661000, 2097152, PROT_NONE) = 0

mmap(0x7f4801861000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3c000) = 0x7f4801861000

mmap(0x7f4801863000, 232, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4801863000

close(3)                                = 0

open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0PS\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=1136944, ...}) = 0

mmap(NULL, 3150136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4801323000

mprotect(0x7f4801424000, 2093056, PROT_NONE) = 0

mmap(0x7f4801623000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100000) = 0x7f4801623000

close(3)                                = 0

open("/lib64/libsqlite3.so.0", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\251\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=753280, ...}) = 0

mmap(NULL, 2836216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f480106e000

mprotect(0x7f480111f000, 2093056, PROT_NONE) = 0

mmap(0x7f480131e000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb0000) = 0x7f480131e000

close(3)                                = 0

open("/lib64/libssl.so.10", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\253\1\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=470376, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027f3000

mmap(NULL, 2560784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4800dfc000

mprotect(0x7f4800e63000, 2097152, PROT_NONE) = 0

mmap(0x7f4801063000, 45056, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x67000) = 0x7f4801063000

close(3)                                = 0

open("/lib64/libcrypto.so.10", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\321\6\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=2521144, ...}) = 0

mmap(NULL, 4596552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4800999000

mprotect(0x7f4800bcf000, 2097152, PROT_NONE) = 0

mmap(0x7f4800dcf000, 167936, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x236000) = 0x7f4800dcf000

mmap(0x7f4800df8000, 13128, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4800df8000

close(3)                                = 0

open("/lib64/liburiparser.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p'\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=106640, ...}) = 0

mmap(NULL, 2200104, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f480077f000

mprotect(0x7f4800798000, 2093056, PROT_NONE) = 0

mmap(0x7f4800997000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f4800997000

close(3)                                = 0

open("/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\24\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=20064, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027f2000

mmap(NULL, 2113920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f480057a000

mprotect(0x7f480057e000, 2093056, PROT_NONE) = 0

mmap(0x7f480077d000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f480077d000

close(3)                                = 0

open("/lib64/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\16\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=40600, ...}) = 0

mmap(NULL, 2318912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f4800343000

mprotect(0x7f480034b000, 2093056, PROT_NONE) = 0

mmap(0x7f480054a000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f480054a000

mmap(0x7f480054c000, 184896, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f480054c000

close(3)                                = 0

open("/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\"\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=43712, ...}) = 0

mmap(NULL, 2128952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f480013b000

mprotect(0x7f4800142000, 2093056, PROT_NONE) = 0

mmap(0x7f4800341000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f4800341000

close(3)                                = 0

open("/lib64/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\26\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=20048, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027f1000

mmap(NULL, 2114112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fff36000

mprotect(0x7f47fff3a000, 2093056, PROT_NONE) = 0

mmap(0x7f4800139000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f4800139000

close(3)                                = 0

open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200m\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=142144, ...}) = 0

mmap(NULL, 2208904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47ffd1a000

mprotect(0x7f47ffd31000, 2093056, PROT_NONE) = 0

mmap(0x7f47fff30000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f47fff30000

mmap(0x7f47fff32000, 13448, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f47fff32000

close(3)                                = 0

open("/lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2009\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=109976, ...}) = 0

mmap(NULL, 2202112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47ffb00000

mprotect(0x7f47ffb16000, 2097152, PROT_NONE) = 0

mmap(0x7f47ffd16000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f47ffd16000

mmap(0x7f47ffd18000, 6656, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f47ffd18000

close(3)                                = 0

open("/lib64/libedit.so.0", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\326\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=235064, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027f0000

mmap(NULL, 2344512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47ff8c3000

mprotect(0x7f47ff8f8000, 2093056, PROT_NONE) = 0

mmap(0x7f47ffaf7000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x34000) = 0x7f47ffaf7000

mmap(0x7f47ffafb000, 17984, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f47ffafb000

close(3)                                = 0

open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\316\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=174576, ...}) = 0

mmap(NULL, 2268928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47ff699000

mprotect(0x7f47ff6be000, 2097152, PROT_NONE) = 0

mmap(0x7f47ff8be000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f47ff8be000

close(3)                                = 0

open("/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
\262\5\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=991616, ...}) = 0

mmap(NULL, 3171168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47ff392000

mprotect(0x7f47ff47b000, 2093056, PROT_NONE) = 0

mmap(0x7f47ff67a000, 40960, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe8000) = 0x7f47ff67a000

mmap(0x7f47ff684000, 82784, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f47ff684000

close(3)                                = 0

open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`&\2\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=2156240, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027ef000

mmap(NULL, 3985920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fefc4000

mprotect(0x7f47ff187000, 2097152, PROT_NONE) = 0

mmap(0x7f47ff387000, 24576, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c3000) = 0x7f47ff387000

mmap(0x7f47ff38d000, 16896, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f47ff38d000

close(3)                                = 0

open("/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220*\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=88776, ...}) = 0

mmap(NULL, 2184192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fedae000

mprotect(0x7f47fedc3000, 2093056, PROT_NONE) = 0

mmap(0x7f47fefc2000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f47fefc2000

close(3)                                = 0

open("/lib64/liblzma.so.5", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2000\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=157424, ...}) = 0

mmap(NULL, 2249352, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47feb88000

mprotect(0x7f47febad000, 2093056, PROT_NONE) = 0

mmap(0x7f47fedac000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7f47fedac000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027ee000

open("/lib64/libgssapi_krb5.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0
\307\0\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=320720, ...}) = 0

mmap(NULL, 2410688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fe93b000

mprotect(0x7f47fe985000, 2097152, PROT_NONE) = 0

mmap(0x7f47feb85000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4a000) = 0x7f47feb85000

close(3)                                = 0

open("/lib64/libkrb5.so.3", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \\\2\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=967760, ...}) = 0

mmap(NULL, 3050080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fe652000

mprotect(0x7f47fe72b000, 2093056, PROT_NONE) = 0

mmap(0x7f47fe92a000, 69632, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd8000) = 0x7f47fe92a000

close(3)                                = 0

open("/lib64/libcom_err.so.2", O_RDONLY|O_CLOEXEC) = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\25\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=15856, ...}) = 0

mmap(NULL, 2109928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fe44e000

mprotect(0x7f47fe451000, 2093056, PROT_NONE) = 0

mmap(0x7f47fe650000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f47fe650000

close(3)                                = 0

open("/lib64/libk5crypto.so.3", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320H\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=210784, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027ed000

mmap(NULL, 2302680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fe21b000

mprotect(0x7f47fe24c000, 2093056, PROT_NONE) = 0

mmap(0x7f47fe44b000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x30000) = 0x7f47fe44b000

close(3)                                = 0

open("/lib64/libfreebl3.so", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\v\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=11392, ...}) = 0

mmap(NULL, 2105536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fe018000

mprotect(0x7f47fe01a000, 2093056, PROT_NONE) = 0

mmap(0x7f47fe219000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f47fe219000

close(3)                                = 0

open("/lib64/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\23\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=19896, ...}) = 0

mmap(NULL, 2113904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fde13000

mprotect(0x7f47fde17000, 2093056, PROT_NONE) = 0

mmap(0x7f47fe016000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f47fe016000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027ec000

open("/lib64/libkrb5support.so.0", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360;\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=67104, ...}) = 0

mmap(NULL, 2160296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fdc03000

mprotect(0x7f47fdc11000, 2097152, PROT_NONE) = 0

mmap(0x7f47fde11000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7f47fde11000

close(3)                                = 0

open("/lib64/libkeyutils.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\25\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=15688, ...}) = 0

mmap(NULL, 2109720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fd9ff000

mprotect(0x7f47fda02000, 2093056, PROT_NONE) = 0

mmap(0x7f47fdc01000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f47fdc01000

close(3)                                = 0

open("/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220j\0\0\0\0\0\0"..., 832)
= 832

fstat(3, {st_mode=S_IFREG|0755, st_size=155744, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027eb000

mmap(NULL, 2255216, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fd7d8000

mprotect(0x7f47fd7fc000, 2093056, PROT_NONE) = 0

mmap(0x7f47fd9fb000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0x7f47fd9fb000

mmap(0x7f47fd9fd000, 6512, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f47fd9fd000

close(3)                                = 0

open("/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3

read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\25\0\0\0\0\0\0"...,
832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=402384, ...}) = 0

mmap(NULL, 2494984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x7f47fd576000

mprotect(0x7f47fd5d6000, 2097152, PROT_NONE) = 0

mmap(0x7f47fd7d6000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x60000) = 0x7f47fd7d6000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027ea000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027e9000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027e8000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027e7000

mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027e5000

arch_prctl(ARCH_SET_FS, 0x7f48027e58c0) = 0

mprotect(0x7f47ff387000, 16384, PROT_READ) = 0

mprotect(0x7f47fff30000, 4096, PROT_READ) = 0

mprotect(0x7f47fd7d6000, 4096, PROT_READ) = 0

mprotect(0x7f4801a66000, 4096, PROT_READ) = 0

mprotect(0x7f47fd9fb000, 4096, PROT_READ) = 0

mprotect(0x7f47fdc01000, 4096, PROT_READ) = 0

mprotect(0x7f47ffd16000, 4096, PROT_READ) = 0

mprotect(0x7f47fde11000, 4096, PROT_READ) = 0

mprotect(0x7f47fe016000, 4096, PROT_READ) = 0

mprotect(0x7f47fe219000, 4096, PROT_READ) = 0

mprotect(0x7f47fe44b000, 8192, PROT_READ) = 0

mprotect(0x7f47fe650000, 4096, PROT_READ) = 0

mprotect(0x7f47fe92a000, 57344, PROT_READ) = 0

mprotect(0x7f47feb85000, 4096, PROT_READ) = 0

mprotect(0x7f47fedac000, 4096, PROT_READ) = 0

mprotect(0x7f47fefc2000, 4096, PROT_READ) = 0

mprotect(0x7f4801623000, 4096, PROT_READ) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f48027e4000

mprotect(0x7f47ff67a000, 32768, PROT_READ) = 0

mprotect(0x7f47ff8be000, 16384, PROT_READ) = 0

mprotect(0x7f47ffaf7000, 12288, PROT_READ) = 0

mprotect(0x7f4800139000, 4096, PROT_READ) = 0

mprotect(0x7f4800341000, 4096, PROT_READ) = 0

mprotect(0x7f480054a000, 4096, PROT_READ) = 0

mprotect(0x7f480077d000, 4096, PROT_READ) = 0

mprotect(0x7f4800997000, 4096, PROT_READ) = 0

mprotect(0x7f4801c7c000, 4096, PROT_READ) = 0

mprotect(0x7f4800dcf000, 114688, PROT_READ) = 0

mprotect(0x7f4801063000, 16384, PROT_READ) = 0

mprotect(0x7f480131e000, 8192, PROT_READ) = 0

mprotect(0x7f4801fdc000, 32768, PROT_READ) = 0

mprotect(0x7f4801861000, 4096, PROT_READ) = 0

mprotect(0x7f4802348000, 12288, PROT_READ) = 0

mprotect(0x7f48025e3000, 4096, PROT_READ) = 0

mprotect(0x8d0000, 4096, PROT_READ)     = 0

mprotect(0x7f4802806000, 4096, PROT_READ) = 0

munmap(0x7f48027f6000, 59200)           = 0

set_tid_address(0x7f48027e5b90)         = 7163

set_robust_list(0x7f48027e5ba0, 24)     = 0

rt_sigaction(SIGRTMIN, {sa_handler=0x7f47ffd20860, sa_mask=[],
sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f47ffd29630}, NULL, 8) = 0

rt_sigaction(SIGRT_1, {sa_handler=0x7f47ffd208f0, sa_mask=[],
sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f47ffd29630},
NULL, 8) = 0

rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0

getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0

statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0,
f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0, 0]},
f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0

statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0,
f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0, 0]},
f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0

stat("/sys/fs/selinux", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0

brk(NULL)                               = 0x1a7e000

brk(0x1a9f000)                          = 0x1a9f000

access("/etc/selinux/config", F_OK)     = 0

open("/etc/pki/tls/legacy-settings", O_RDONLY) = -1 ENOENT (No such file or
directory)

access("/etc/system-fips", F_OK)        = -1 ENOENT (No such file or
directory)

geteuid()                               = 1002

socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3

ioctl(3, SIOCGIFCONF, {ifc_len=2 * sizeof(struct ifreq), ifc_buf=NULL}) = 0

ioctl(3, SIOCGIFCONF, {ifc_len=2 * sizeof(struct ifreq),
ifc_buf=[{ifr_name="lo", ifr_addr={sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("127.0.0.1")}}, {ifr_name="enp3s4f1",
ifr_addr={sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr("128.171.77.23")}}]}) = 0

ioctl(3, SIOCGIFHWADDR, {ifr_name="lo",
ifr_hwaddr={sa_family=ARPHRD_LOOPBACK, sa_data=00:00:00:00:00:00}}) = 0

ioctl(3, SIOCGIFHWADDR, {ifr_name="enp3s4f1",
ifr_hwaddr={sa_family=ARPHRD_ETHER, sa_data=00:1b:78:07:f9:87}}) = 0

close(3)                                = 0

stat("/etc/asterisk/asterisk.conf", {st_mode=S_IFREG|0644, st_size=814,
...}) = 0

open("/etc/asterisk/asterisk.conf", O_RDONLY) = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=814, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f4802804000

read(3, "[directories](!)\nastetcdir => /e"..., 4096) = 814

read(3, "", 4096)                       = 0

close(3)                                = 0

munmap(0x7f4802804000, 4096)            = 0

getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=4*1024}) = 0

rt_sigaction(SIGCHLD, {sa_handler=0x4571a0, sa_mask=[],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f47ffd29630}, NULL, 8) = 0

mkdir("/var/run/asterisk", 0755)        = -1 EEXIST (File exists)

geteuid()                               = 1002

getcwd("/home/asterisk", 4096)          = 15

stat("/home/asterisk", {st_mode=S_IFDIR|0770, st_size=4096, ...}) = 0

geteuid()                               = 1002

getegid()                               = 1002

getuid()                                = 1002

getgid()                                = 1002

access("/home/asterisk", R_OK|X_OK)     = 0

socket(AF_UNIX, SOCK_STREAM, 0)         = 3

connect(3, {sa_family=AF_UNIX, sun_path="/var/run/asterisk/asterisk.ctl"},
110) = 0

rt_sigaction(SIGINT, {sa_handler=0x456b00, sa_mask=[INT],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f47feffa400},
{sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

rt_sigaction(SIGTERM, {sa_handler=0x456b00, sa_mask=[TERM],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f47feffa400},
{sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

rt_sigaction(SIGHUP, {sa_handler=0x456b00, sa_mask=[HUP],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f47feffa400},
{sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0

read(3, "voip1.ifa.hawaii.edu/30632/16.14"..., 255) = 35

write(3, "cli quit after module reload res"..., 42) = 42

poll([{fd=3, events=POLLIN}], 1, 60000) = 1 ([{fd=3, revents=POLLIN}])

read(3, "Module 'res_pjsip.so' reloaded s"..., 511) = 45

write(1, "Module 'res_pjsip.so' reloaded s"..., 45Module 'res_pjsip.so'
reloaded successfully.

) = 45

poll([{fd=3, events=POLLIN}], 1, 60000) = 1 ([{fd=3,
revents=POLLIN|POLLHUP}])

read(3, "", 511)                        = 0

futex(0x8f4830, FUTEX_WAKE_PRIVATE, 2147483647) = 0

futex(0x8f45c0, FUTEX_WAKE_PRIVATE, 2147483647) = 0

access("/etc/localtime", R_OK)          = 0

open("/etc/localtime", O_RDONLY)        = 4

read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"...,
41992) = 312

close(4)                                = 0

open("/usr/share/zoneinfo/posixrules", O_RDONLY) = 4

read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"...,
41992) = 3519

close(4)                                = 0

gettid()                                = 7163

fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f4802804000

write(1, "Asterisk ending (0).\n", 21Asterisk ending (0).

)  = 21

close(3)                                = 0

exit_group(0)                           = ?

+++ exited with 0 +++

Curiously, no mention of the certificates defined in /etc/pjsip.conf:

[transport-tls]

type = transport

protocol = tls

bind = 0.0.0.0

;cert_file = /home/asterisk/certs/cert.pem

;cert_file = /home/asterisk/certs/fullchain.pem

;priv_key_file = /home/asterisk/certs/privkey.pem

cert_file = /home/asterisk/certs/asterisk.crt

priv_key_file = /home/asterisk/certs/asterisk.key
allow_reload = true

In the end the tls transport was still not installed for SOFTPHONE_B:

 Endpoint:  0000f30A0A01                                         Not in
use    0 of inf

     InAuth:  0000f30A0A01/0000f30A0A01

        Aor:  0000f30A0A01                                       1

      Contact:  0000f30A0A01/sip:0000f30A0A01 at 128.171.77.1 4800418965
NonQual         nan

  Transport:  transport-udp             udp      0      0  0.0.0.0:5060


 Endpoint:  0000f30B0B02                                         Not in
use    0 of inf

     InAuth:  0000f30B0B02/0000f30B0B02

        Aor:  0000f30B0B02                                       1

      Contact:  0000f30B0B02/sip:0000f30B0B02 at 128.171.77.4 615cc2a2c6
NonQual         nan

  Transport:  transport-udp             udp      0      0  0.0.0.0:5060


 Endpoint:  SOFTPHONE_A
Unavailable   0 of inf

     InAuth:  SOFTPHONE_A/SOFTPHONE_A

        Aor:  SOFTPHONE_A                                        2

  Transport:  transport-tcp             tcp      0      0  0.0.0.0:5060


 Endpoint:  SOFTPHONE_B
Unavailable   0 of inf

     InAuth:  SOFTPHONE_B/SOFTPHONE_B

        Aor:  SOFTPHONE_B                                        2

 Thanks,

--Ruishenhg

On Tue, Jan 26, 2021 at 10:17 PM Michael Maier <m1278468 at mailbox.org> wrote:

> On 26.01.21 at 21:12 Ruisheng Peng wrote:
> > Hi,
> >
> >   I'm experimenting with Asterisk-16.14.0 on a CentOS7 box, and run into
> > problems loading the SSL certificate to establish transport-tls.  Tried
> > self-signed certificate generated with ast_tls_cert under contrib/scripts
> > and the one issued by Letsencrypt, both would bomb out with a parsing
> error:
> >
> > [Dec  3 15:47:50] ERROR[11233] res_pjsip/config_transport.c: Transport:
> > transport-tls: cert_file /home/asterisk/certs/asterisk.crt is either
> > missing or not readable
>
> It's missing or not readable! Take care, that the file access rights of
> the file and the complete path are ok. Do a strace to verify, if the
> file is really loaded at all.
>
>
> Michael
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>       https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20210127/a19b660b/attachment-0001.html>


More information about the asterisk-users mailing list