[Home]

Summary:ASTERISK-29658: app_queue: Multiple members in same queue with same state interface don't all reflect proper state
Reporter:Bill Kervaski (bkervaski)Labels:
Date Opened:2021-09-16 08:42:16Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Applications/app_queue
Versions:18.6.0 Frequency of
Occurrence
Constant
Related
Issues:
is duplicated byASTERISK-29782 app_queue: Queue members showing Unavailable for no reason
Environment:CentOs StreamAttachments:( 0) debug_log.txt
Description: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](extension)
> endpoint/transport=default-udp-transport
> endpoint/context=default
> inbound_auth/username=800
> inbound_auth/password=800
>
> [801](extension)
> endpoint/transport=default-udp-transport
> endpoint/context=default
> inbound_auth/username=801
> inbound_auth/password=801
>
> [802](extension)
> endpoint/transport=default-udp-transport
> endpoint/context=default
> inbound_auth/username=802
> inbound_auth/password=802
Comments:By: Asterisk Team (asteriskteam) 2021-09-16 08:42:19.700-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Bill Kervaski (bkervaski) 2021-09-16 08:42:45.541-0500

The debug log. I removed my public IP address and replaced it with 1.2.3.4 and replaced the hostname with "dev".

By: Bill Kervaski (bkervaski) 2021-09-16 08:55:25.261-0500

In the case of our usage, we use PJSIP as well as our own app that uses WSS via a Local channel push notification in a loop for the duration of the dial from the queue.  It works great, with the exception that the state interface won't update for the local channel so our web based queue monitor reflects the same.  It would be great, if someone was so inclined, to have the local channel sync up with the hints.  I would do more damage than good to the Asterisk source, I haven't messed with it since 0.9, so we are happy to offer a bounty to anyone that can get it patched supporting this usage and accepted in an upcoming release.  Cheers, all :)

By: Joshua C. Colp (jcolp) 2021-09-16 08:58:46.094-0500

The issue has nothing to do with Local channels specifically. The state and hint update code only updates the first member with the state interface/hint it encounters. If there are multiple, they aren't updated.

By: Bill Kervaski (bkervaski) 2021-09-16 09:18:38.352-0500

That makes sense, thanks for the reply.  We have a work around by just using one interface and spawn both the PJSIP (and all registered devices via PJSIP_DIAL_CONTACTS) and WSS calls from that, however, in that case BLINDTRANSFER and ATTENDEDTRANSFER aren't logged by the queue and the agent gets credit for the entire call (beyond just their participation).  Typing that out gave me an idea, a possible alternative to both, going off to test it.