Queue Member Local Channel Hints not Updating

Asterisk 18.6.0

Hi All!

This was a fun one to troubleshoot …

When using a PJSIP interface and a Local interface in a Queue (dynamic or static), both sharing the same hint:

800 (PJSIP/100@pjsip_context from hint:100@pjsip) (ringinuse disabled) (dynamic) (Not in use)
800 (Local/100@local_context from hint:100@pjsip) (ringinuse disabled) (dynamic) (Not in use)

The Local interface’s hint won’t update unless the queue.conf file’s timestamp has changed and you reload the queue module or “queue reload all” in the cli.

Shouldn’t the Local interface’s state always shadow 100@pjsip in the above example?

Do you use includes?[1]

[1] [ASTERISK-29578] app_queue: Custom device state using included hints do not update - Digium/Asterisk JIRA

Yep! Thanks for replying, I reviewed the issue notes. I’m going to refactor to where the hints aren’t included and see what’s up.

Josh,

The includes didn’t seem to matter, but I wasn’t using them in queues.conf, only the dialplan. Moving the hints from the include to extensions.conf didn’t make a difference.

I also confirmed that touch queues.conf; asterisk -rx “queue reload members” gets the states to update.

I also commented out:

if (!strcmp(m->state_context, context) && !strcmp(m->state_exten, exten)) { … }

so update_status(q, m, device_state); is always called regardless and that also did not make a difference.

Unfortunately, I’m not versed enough in Asterisk’s inner workings to troubleshoot the source much further.

Any advice appreciated and thanks!!!

I’d suggest showing the actual dialplan in use, as well as the output of “core show hints”.

Note that I rebuilt our setup using custom device states (vs hints) and the same behavior … Local channels will not honor the state as PJSIP channels set to the same custom state unless you refresh the queue members after modifying the timestamp of queues.conf … very easy to reproduce …

Edit: For clarification, the custom states worked fine (devstate list) it’s just the queue that wouldn’t pickup the changes in state for Local channels only.

Josh,

Core Show Hints will show the correct state, that hasn’t been an issue.

Also, there’s no dialplan involved per-se (with the exception of defining the hints) so unsure what you’ll find there? Other than exten => s,1,Queue(args) where the call drops in the queue.

Thanks for your help, let me know if I can help test a patch or anything … or perhaps a bounty for a fix in app_queue.c, this one is kicking our arse …

Bill

I’m not actively working on such an issue, 'nor do I personally have any patches. If you believe there’s an underlying issue, then you can file an issue[1]. You would need to provide a complete debug log and configuration that reproduces the issue (not just “well configure a queue and call it like this”). There is no time frame on when it would get looked into. I will say using a Local channel and a different state interface is an extremely common thing to do and noone else seems to be experiencing an issue with that, so it is certainly possible it is something unique thus why providing configuration and instructions that reproduces it is critically important.

[1] System Dashboard - Digium/Asterisk JIRA

Thanks, Josh, as always. I’ll open a bug report in JIRA.

I went back to the basics …

Here is an Asterisk 18.6.0 setup that perfectly duplicates the issue, it’s very easily reproducible.

It’s running on CentOs Stream (latest) and compiled with only “-with-jansson-bundled”.

The local queue member will only update its state when you change the timestamp of queues.conf and reload the members:

touch queues.conf; asterisk -rx “queue reload members” (the “refresh” fix)

core show hints

801@default : PJSIP/801 State:InUse&Ringing Presence:not_set Watchers 2
800@default : PJSIP/800 State:Idle Presence:not_set Watchers 0
802@default : PJSIP/802 State:Idle Presence:not_set Watchers 0

queue show 200

200 has 1 calls (max unlimited) in ‘ringall’ strategy (0s holdtime, 0s talktime), W:0, C:0, A:3, SL:0.0%, SL2:0.0% within 0s
Members:
801 (Local/801@local from hint:801@default) (ringinuse enabled) (Ring+Inuse) has taken no calls yet
801 (PJSIP/801 from hint:801@default) (ringinuse enabled) (Not in use) has taken no calls yet
Callers:
1. PJSIP/801-0000000c (wait: 0:05, prio: 0)

Just as a footnote, if you answer …

200 has 0 calls (max unlimited) in ‘ringall’ strategy (1s holdtime, 0s talktime), W:0, C:0, A:4, SL:0.0%, SL2:0.0% within 0s
Members:
801 (Local/801@local from hint:801@default) (ringinuse enabled) (On Hold) has taken no calls yet
801 (PJSIP/801 from hint:801@default) (ringinuse enabled) (in call) (Not in use) has taken no calls yet
No Callers

… and then run the “refresh” fix …

200 has 0 calls (max unlimited) in ‘ringall’ strategy (1s holdtime, 16s talktime), W:0, C:1, A:4, SL:0.0%, SL2:0.0% within 0s
Members:
801 (Local/801@local from hint:801@default) (ringinuse enabled) (On Hold) has taken no calls yet
801 (PJSIP/801 from hint:801@default) (ringinuse enabled) (On Hold) has taken no calls yet
No Callers

… everything syncs up properly.

queues.conf

[general]

[200]
member=>PJSIP/801,801,hint:801@default
member=>Local/801@local,801,hint:801@default

extensions.conf

[general]

[default]
exten => s,1,Playback(beep)
exten => s,n,Wait(30)
exten => s,n,Hangup

exten => _8XX,1,Dial(PJSIP/${EXTEN}&Local/${EXTEN}@local)

exten => 200,1,Queue(200)

exten => 800,hint,PJSIP/800
exten => 801,hint,PJSIP/801
exten => 802,hint,PJSIP/802

[local]
exten => _8XX,1(start),NoOp( *** ${EXTEN} *** )
exten => _8XX,n,Wait(3)
exten => _8XX,n,Goto(start)

pjsip.conf

[global]

[default-udp-transport]
type=transport
protocol=udp
bind=0.0.0.0

pjsip_wizard.conf

extension
type=wizard
accepts_auth=yes
accepts_registrations=yes
endpoint/disallow=all
endpoint/allow=g722
aor/max_contacts=1
aor/remove_existing=yes

800
endpoint/transport=default-udp-transport
endpoint/context=default
inbound_auth/username=800
inbound_auth/password=800

801
endpoint/transport=default-udp-transport
endpoint/context=default
inbound_auth/username=801
inbound_auth/password=801

802
endpoint/transport=default-udp-transport
endpoint/context=default
inbound_auth/username=802
inbound_auth/password=802

debug_log.txt (70.4 KB)

The code doesn’t currently expect/support multiple members in the same queue with the same state interface.

Oh, well, there’s that then :slight_smile:

(big thanks for your help and putting up with me)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.