I was recently learning and migrating to pjsip on asterisk 18 but when i changed the pjsip.conf and execute pjsip reload that lead me to
A module reload request is already in progress; please be patient
-- The previous reload command didn't finish yet
i wait about 15min and still said reloading
then i restart the asterisk using
systemctl restart asterisk
and
systemctl reload asterisk
that lead me to
Job for asterisk.service failed.
See "systemctl status asterisk.service" and "journalctl -xeu asterisk.service" for details.
when i check the asterisk status t return
root@asteriskstaging /e/asterisk [1]# systemctl status asterisk.service
â—Ź asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/init.d/asterisk; generated)
Active: active (running) since Sat 2024-07-27 03:40:04 UTC; 32s ago
Docs: man:systemd-sysv-generator(8)
Process: 1672972 ExecStart=/etc/init.d/asterisk start (code=exited, status=0/SUCCESS)
Process: 1673075 ExecReload=/etc/init.d/asterisk reload (code=exited, status=1/FAILURE)
Tasks: 72 (limit: 9444)
Memory: 45.5M (peak: 47.9M)
CPU: 353ms
CGroup: /system.slice/asterisk.service
└─21355 /usr/sbin/asterisk -U asterisk -G asterisk
Jul 27 03:40:04 asteriskstaging systemd[1]: Starting asterisk.service - LSB: Asterisk PBX...
Jul 27 03:40:04 asteriskstaging asterisk[1672972]: * Starting Asterisk PBX: asterisk
Jul 27 03:41:32 asteriskstaging asterisk[1675171]: Reloading Asterisk PBX configuration files.
Jul 27 03:41:32 asteriskstaging systemd[1]: asterisk.service: Control process exited, code=exited, status=1/FAILURE
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: http://www.ubuntu.com/support
â–‘â–‘
â–‘â–‘ An ExecReload= process belonging to unit asterisk.service has exited.
â–‘â–‘
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
Jul 27 03:41:32 asteriskstaging systemd[1]: Reload failed for asterisk.service - LSB: Asterisk PBX.
but when i execute safe_asterisk i can access cli again but the configurations aren’t updated.
here is my pjsip.conf
[global]
type = global
endpoint_identifier_order = ip,username,anonymous
[transport-udp-tcp-ws-wss]
type = transport
protocol = udp,tcp,ws,wss
bind = 0.0.0.0
[012399009]
type = endpoint
transport = transport-udp-tcp-ws-wss
context = from-internal
disallow = all
allow = ulaw
auth = 012399009
aors = 012399009
[012399009]
type = auth
auth_type = userpass
password = mypassword
username = 012399009
[012399009]
type = aor
contact = sip:012399009@192.168.xxx.xx
max_contacts = 1
qualify_frequency=0; i modified this line and reload then the error trigger
asteriskstaging*CLI> pjsip reload
Module 'res_pjsip.so' reloaded successfully.
Module 'res_pjsip_authenticator_digest.so' reloaded successfully.
Module 'res_pjsip_endpoint_identifier_ip.so' reloaded successfully.
Module 'res_pjsip_mwi.so' reloaded successfully.
Module 'res_pjsip_notify.so' reloaded successfully.
Module 'res_pjsip_outbound_publish.so' reloaded successfully.
Module 'res_pjsip_publish_asterisk.so' reloaded successfully.
Module 'res_pjsip_outbound_registration.so' reloaded successfully.
-- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Jul 27 03:45:03] ERROR[1680329]: config_options.c:798 aco_process_var: Error parsing protocol=udp,tcp,ws,wss at line 1650 of
[Jul 27 03:45:03] ERROR[1680329]: res_sorcery_config.c:422 sorcery_config_internal_load: Could not create an object of type 'transport' with id 'transport-udp-tcp-ws-wss' from configuration file 'pjsip.conf'
[Jul 27 03:45:03] NOTICE[1680329]: sorcery.c:1348 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
-- Reloading module 'res_pjsip_authenticator_digest.so' (PJSIP authentication resource)
-- Reloading module 'res_pjsip_endpoint_identifier_ip.so' (PJSIP IP endpoint identifier)
-- Reloading module 'res_pjsip_mwi.so' (PJSIP MWI resource)
-- Reloading module 'res_pjsip_notify.so' (CLI/AMI PJSIP NOTIFY Support)
-- Reloading module 'res_pjsip_outbound_publish.so' (PJSIP Outbound Publish Support)
-- Reloading module 'res_pjsip_publish_asterisk.so' (PJSIP Asterisk Event PUBLISH Support)
-- Reloading module 'res_pjsip_outbound_registration.so' (PJSIP Outbound Registration Support)
when i use safe_asterisk and reload pjsip this message shown up.
Best Regards.