Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asterisk-app-queue causes a crash of asterisk #865

Open
fedv-mbu opened this issue Apr 23, 2024 · 8 comments
Open

asterisk-app-queue causes a crash of asterisk #865

fedv-mbu opened this issue Apr 23, 2024 · 8 comments

Comments

@fedv-mbu
Copy link

Maintainer: @jslachta

Environment: OpenWRT 23.05.3 on Zyxel NBG6716 ath79 / mips_24kc

Description:

I Installed OpenWRT 23.05.3 with Asterisk 20 on a Zyxel NBG6716 Router with all my other required modules for asterisk.
So far everything works great, except app_queue.

The Issue is as follows:
I dial my Queue test number which forwards the call to a queue called "zentrale"
The Member from this queue "6002" picks up
Asterisk Crashes with a SIGSEGV:

[ 4168.760322] do_page_fault(): sending SIGSEGV to asterisk for invalid read access from 00000001
[ 4168.769157] epc = 77356b3c in libc.so.6[772b0000+1b3000]
[ 4168.774603] ra = 77873ced in libjansson.so.4.14.0[77870000+9000]

Any Idea what might be the cause?
Things I've tried:

Different OpenWRT version (22)
Different Asterisk version (18)
PJSIP instead of chan_sip

Thanks!
Michel

@micmac1
Copy link
Collaborator

micmac1 commented Apr 23, 2024 via email

@fedv-mbu
Copy link
Author

fedv-mbu commented May 2, 2024

Hi There,

Here's my pjsip.conf:

;===============TRANSPORT

[simpletrans]
type=transport
protocol=udp
bind=0.0.0.0

;===============EXTENSION 6001

[6001]
type=endpoint
context=default
disallow=all
allow=ulaw
auth=auth6001
aors=6001

[auth6001]
type=auth
auth_type=userpass
password=6001
username=6001

[6001]
type=aor
max_contacts=10


;===============EXTENSION 6002

[6002]
type=endpoint
context=default
disallow=all
allow=ulaw
auth=auth6002
aors=6002

[auth6002]
type=auth
auth_type=userpass
password=6002
username=6002

[6002]
type=aor
max_contacts=10

And here's my extensions.conf: (The part that gets run)

[default]
exten => 6001,hint,SIP/6001
exten => 6002,hint,SIP/6002
include => vod-in
exten => 425,1,Answer
exten => 425,n,Wait(1)
exten => 425,n(rwlqueue),Noop(Zentrale an Warteschlange)
exten => 425,n,Goto(queue,zentrale,1)

And of course my queues.conf:

[zentrale]
;music = default
strategy = ringall
servicelevel = 30
timeout = 120
wrapuptime=5
announce = /mnt/usb/ansagen/ansage21
announce-frequency = 30
;announce-holdtime = no

;member => Local/zentrale1@default
member => SIP/6002

@micmac1
Copy link
Collaborator

micmac1 commented May 4, 2024

Hi there,

I tried your config. Only changed the "announce" in queues.conf and pointed it to a wav file that exists on my router. Upon start these are the logs:

Sat May  4 11:55:53 2024 daemon.info asterisk[4831]: PBX UUID: acbf9772-ae1f-4777-8108-3a659fe4f92e
Sat May  4 11:55:53 2024 daemon.info asterisk[4831]: [May  4 09:55:53] NOTICE[4831]: loader.c:2405 load_modules: 82 modules will be loaded.
Sat May  4 11:55:53 2024 daemon.info asterisk[4831]: [May  4 09:55:53] ERROR[4831]: config_options.c:710 aco_process_config: Unable to load config file 'cdr.conf'
Sat May  4 11:55:53 2024 daemon.info asterisk[4831]: [May  4 09:55:53] NOTICE[4831]: cdr.c:4444 process_config: Failed to process CDR configuration; using defaults
Sat May  4 11:55:53 2024 daemon.info asterisk[4831]: [May  4 09:55:53] NOTICE[4831]: cdr.c:4568 cdr_toggle_runtime_options: CDR simple logging enabled.
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: [May  4 09:55:54] NOTICE[4831]: indications.c:1100 load_indications: Default country for indication tones: us
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: [May  4 09:55:54] NOTICE[4831]: indications.c:424 ast_set_indication_country: Setting default indication country to 'us'
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: [May  4 09:55:54] ERROR[4882]: res_pjsip/config_system.c:267 system_create_resolver_and_set_nameservers: There are no local system nameservers configured, resorting to system resolution
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: [May  4 09:55:54] ERROR[4882]: res_pjsip/config_system.c:267 system_create_resolver_and_set_nameservers: There are no local system nameservers configured, resorting to system resolution
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: [May  4 09:55:54] WARNING[4831]: pbx.c:8797 ast_context_verify_includes: Context 'default' tries to include nonexistent context 'vod-in'
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: [May  4 09:55:54] WARNING[4831]: pbx.c:8797 ast_context_verify_includes: Context 'local' tries to include nonexistent context 'parkedcalls'
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: [May  4 09:55:54] WARNING[4831]: loader.c:2509 load_modules: The deprecated module 'app_macro.so' has been loaded and is running, it may be removed in a future version
Sat May  4 11:55:54 2024 daemon.info asterisk[4831]: Asterisk Ready.

Then I register two phones, 6001 and 6002. Then I call 425 and I only see this in the log:

Sat May 4 11:56:02 2024 daemon.info asterisk[4831]: [May 4 09:56:02] WARNING[4901][C-00000001]: pbx.c:4507 __ast_pbx_run: Channel 'PJSIP/6001-00000000' sent to invalid extension but no invalid handler: context,exten,priority=queue,zentrale,1

Asterisk didn't crash, but the call didn't work either. I guess something is missing in the reproducer. Please double-check and let me know what's missing.

@fedv-mbu
Copy link
Author

fedv-mbu commented May 6, 2024

Sorry, you're missing this context in extensions.conf:

[queue]
; Zentrale -0
; 30 Sekunden Announcement fehlt
exten => zentrale,1,Answer
exten => zentrale,n,Wait(2)
exten => zentrale,n,Playback(/mnt/usb/ansagen/ansage11)
exten => zentrale,n,Queue(zentrale,tT,,120)
exten => zentrale,n,Playback(/mnt/usb/ansagen/ansage12)
exten => zentrale,n,Voicemail(98,s)

@micmac1
Copy link
Collaborator

micmac1 commented May 6, 2024 via email

@fedv-mbu
Copy link
Author

fedv-mbu commented May 6, 2024

Does the other extension not ring?
You need to dial from 6001, so 6002 as a queue member rings.
And pickup is where it crashes.

@micmac1
Copy link
Collaborator

micmac1 commented May 6, 2024 via email

@micmac1
Copy link
Collaborator

micmac1 commented May 6, 2024

I misspoke, previous entry corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants