Asterisk 22 on docker not starting

Hi all, trying to install asterisk 22 on docker.
It always restart in loop.
What is wrong?
Here starting logs:

Running as user ‘asterisk’

UUID system initiated

PBX UUID: 6ecc4d67-99be-4fc4-9d33-b54f39dc7120

extract int from [5] in [0, 2147483647] gives 5

extract int from [50] in [0, 2147483647] gives 50

extract int from [20] in [0, 2147483647] gives 20

Parsing /etc/asterisk/stasis.conf

Resetting translation matrix

Increasing threadpool stasis/pool’s size by 5

Parsing /etc/asterisk/sorcery.conf

Creating topic. name: system:all, detail:

Topic ‘system:all’: 0x5612c1b375d0 created

Creating topic. name: endpoint:all, detail:

Topic ‘endpoint:all’: 0x5612c1b37d00 created

Creating topic. name: cache_pattern:0/endpoint:all, detail:

Topic ‘cache_pattern:0/endpoint:all’: 0x5612c1b37f70 created

Not changing threadpool size since new size 0 is the same as current 0

[Jan 29 12:18:47] Asterisk PBX Core Initializing

[Jan 29 12:18:47] Asterisk Dynamic Loader Starting:

[Jan 29 12:18:47] NOTICE[1]: loader.c:2559 load_modules: 347 modules will be loaded.

[Jan 29 12:18:48] NOTICE[1]: cdr.c:4585 cdr_toggle_runtime_options: CDR simple logging enabled.

[Jan 29 12:18:48] NOTICE[1]: indications.c:1100 load_indications: Default country for indication tones: us

[Jan 29 12:18:48] NOTICE[1]: indications.c:424 ast_set_indication_country: Setting default indication country to ‘us’

[Jan 29 12:18:48] – Local IPv4 address determined to be: 172.95.0.2

[Jan 29 12:18:48] – Local IPv6 address determined to be: ::1

[Jan 29 12:18:48] == ‘UDP+IPv4’ is an available SIP transport

[Jan 29 12:18:48] == ‘TCP+IPv4’ is not an available SIP transport, disabling resolver support for it

[Jan 29 12:18:48] == ‘TLS+IPv4’ is not an available SIP transport, disabling resolver support for it

[Jan 29 12:18:48] == ‘UDP+IPv6’ is not an available SIP transport, disabling resolver support for it

[Jan 29 12:18:48] == ‘TCP+IPv6’ is not an available SIP transport, disabling resolver support for it

[Jan 29 12:18:48] == ‘TLS+IPv6’ is not an available SIP transport, disabling resolver support for it

[Jan 29 12:18:48] == Endpoint my-provider is now Reachable

[Jan 29 12:18:48] == Endpoint 2002 is now Reachable

[Jan 29 12:18:48] == Endpoint 2001 is now Reachable

[Jan 29 12:18:48] == libsrtp2 2.4.2 initialized

[Jan 29 12:18:48] NOTICE[1]: res_smdi.c:1424 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.

[Jan 29 12:18:48] WARNING[1]: res_phoneprov.c:1249 get_defaults: Unable to find a valid server address or name.

[Jan 29 12:18:48] == RTP Allocating from port range 19000 → 19100

[Jan 29 12:18:48] == Binding IAX2 to default address 0.0.0.0:4569

[Jan 29 12:18:48] == 10 helper threads started

[Jan 29 12:18:48] == IAX Ready and Listening

[Jan 29 12:18:48] – Loaded provisioning template ‘default’

[Jan 29 12:18:48] NOTICE[1]: confbridge/conf_config_parser.c:2410 verify_default_profiles: Adding default_menu menu to app_confbridge

[Jan 29 12:18:48] NOTICE[1]: cel_custom.c:91 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.

[Jan 29 12:18:48] Added CEL CSV mapping for 0 files.

[Jan 29 12:18:48] == DUNDi Ready and Listening on 0.0.0.0:4520

[Jan 29 12:18:48] == UNISTIM Listening on 0.0.0.0:5000

[Jan 29 12:18:48] – Security Logging Enabled

[Jan 29 12:18:48] == Setting global variable ‘CONSOLE’ to ‘Console/dsp’

[Jan 29 12:18:48] == Setting global variable ‘TRUNK’ to ‘DAHDI/G2’

[Jan 29 12:18:48] == Setting global variable ‘TRUNKMSD’ to ‘1’

[Jan 29 12:18:48] – Including switch ‘DUNDi/e164’ in context ‘dundi-e164-switch’

[Jan 29 12:18:48] WARNING[1]: ael/pval.c:2451 check_pval_item: Warning: file /etc/asterisk/extensions.ael, line 196-196: macro call to ael-dundi-e164 cannot be found in the AEL code!

[Jan 29 12:18:48] WARNING[1]: ael/pval.c:2451 check_pval_item: Warning: file /etc/asterisk/extensions.ael, line 209-209: macro call to ael-dundi-e164 cannot be found in the AEL code!

[Jan 29 12:18:48] WARNING[1]: ael/pval.c:2451 check_pval_item: Warning: file /etc/asterisk/extensions.ael, line 328-328: macro call to ael-std-exten-ael cannot be found in the AEL code!

[Jan 29 12:18:48] == Setting global variable ‘CONSOLE-AEL’ to ‘“Console/dsp”’

[Jan 29 12:18:48] == Setting global variable ‘OUTBOUND-TRUNK’ to ‘“Zap/g2”’

[Jan 29 12:18:48] == Setting global variable ‘OUTBOUND-TRUNKMSD’ to ‘1’

[Jan 29 12:18:48] – Including switch ‘DUNDi/e164’ in context ‘ael-dundi-e164-switch’

[Jan 29 12:18:48] – Including switch ‘DUNDi/e164’ in context ‘dundi-e164-switch’

On Wednesday 29 January 2025 at 11:33:01, spady7 via Asterisk Community wrote:

Hi all, trying to install asterisk 22 on docker.
It always restart in loop.
What is wrong?

We don’t know - partly because you haven’t shown anything looping.

Antony.


“Remember: the S in IoT stands for Security.”

  • Jan-Piet Mens

I had lot of test and with asterisk 20.x it works perfectly. If I use asterisk 21.x or 22.x I always get a “Segmentation fault” on start up.
Nobody installed those versions on docker?

I found following error analyzing core dump:

#0 ast_str_hash (str=0x0) at /usr/src/asterisk-22.2.0-rc2/include/asterisk/strings.h:1263
1263 /usr/src/asterisk-22.2.0-rc2/include/asterisk/strings.h: No such file or directory.

Why still needs src files on asterisk startup?

It doesn’t need the source code at run time. It is trying to access it at debug time, to show the failing line. The actual string reference is null, which is the immediate cause of the crash. Such errors may be the result of corruption by another thread, but if not the full stack trace, not just the topmost frame, is needed for sensible debugging.