We have been using an extension that fires off a script to “change modes” - works well in ASL2.
Extension looks like this:
; ---- Command Process extentions ------ See /usr/local/bin/command_process
exten => _x.,1,System(/usr/local/bin/command_process ${EXTEN})
exten => _x.,n,Hangup()
When the extension is called, the code moves some files and reloads the core like so:
/bin/cp /etc/asterisk/local/modes/rpt.normal /etc/asterisk/rpt.conf
/usr/sbin/asterisk -rx "core reload"
I can run this command from the command line and all is good, but when I run the command from the extension, Asterisk does reload, but crashes:
[2024-07-14 09:49:26.378] NOTICE[396845]: cdr.c:4568 cdr_toggle_runtime_options: CDR simple logging enabled.
-- Reloading module 'cel' (CEL Engine)
-- CEL logging disabled.
-- Reloading module 'dnsmgr' (DNS Manager)
-- Reloading module 'dsp' (DSP)
-- Reloading module 'enum' (ENUM Support)
-- Reloading module 'features' (Call Features)
-- Reloading module 'http' (Built-in HTTP Server)
-- Reloading module 'indications' (Indication Tone Handling)
-- Reloading module 'acl' (Named ACL system)
-- Reloading module 'manager' (Asterisk Manager Interface)
-- Reloading module 'plc' (PLC)
-- Reloading module 'udptl' (UDPTL)
-- Reloading module 'res_crypto.so' (Cryptographic Digital Signatures)
-- Reloading module 'res_smdi.so' (Simplified Message Desk Interface (SMDI) Resource)
-- Reloading module 'chan_dahdi.so' (DAHDI Telephony w/PRI & SS7 & MFC/R2)
-- Reloading module 'chan_iax2.so' (Inter Asterisk eXchange (Ver 2))
-- Reloading module 'app_playback.so' (Sound File Playback Application)
-- Reloading module 'app_rpt.so' (Radio Repeater/Remote Base Application)
-- Reloading module 'chan_voter.so' (Voter Radio Channel Driver)
-- Reloading module 'pbx_config.so' (Text Extension Configuration)
== Setting global variable 'HOMENPA' to '616'
== Setting global variable 'NODE1' to '29972'
== Setting global variable 'NODE2' to '575'
> Time to scan old dialplan and merge leftovers back into the new: 0.000015 sec
> Time to restore hints and swap in new dialplan: 0.000006 sec
> Time to delete the old dialplan: 0.000024 sec
> Total time merge_contexts_delete: 0.000045 sec
> pbx_config successfully loaded 8 contexts (enable debug for details).
-- Reloading module 'res_rpt_http_registrations.so' (RPT HTTP Periodic Registrations)
-- Remote UNIX connection disconnected
At the disconnect entry, we usually have
-- Re-Loading config for repeater 29972
Where the “remote UNIX connection disconnected” is the behavior not seen when running the script from the command line. After the reload,
[2024-07-14 09:49:28.277] WARNING[396117]: channel.c:1086 __ast_queue_frame: Exceptionally long voice queue length (97 voice / 97 total) queuing to voter/29972
occurs indefinitely until I restart asterisk, and there is no repeater audio…
Not sure where to go from here…