[Asterisk-code-review] app_queue: Fix ordering problem joining queue. (asterisk[master])

Jaco Kroon asteriskteam at digium.com
Wed Apr 12 04:49:38 CDT 2023


Jaco Kroon has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/20039 )

Change subject: app_queue: Fix ordering problem joining queue.
......................................................................


Patch Set 1:

(1 comment)

Patchset:

PS1: 
plastiekpoot*CLI> channel originate Local/s at silence application Queue test
    -- Called s at silence
    -- Executing [s at silence:1] Answer("Local/s at silence-00000000;2", "") in new stack
    -- Local/s at silence-00000000;1 answered
       > Launching Queue(test) on Local/s at silence-00000000;1
    -- Started music on hold, class 'default', on channel 'Local/s at silence-00000000;1'
    -- Executing [s at silence:2] Playback("Local/s at silence-00000000;2", "silence/10") in new stack
    -- <Local/s at silence-00000000;2> Playing 'silence/10.gsm' (language 'en')
plastiekpoot*CLI> queue show 
test has 1 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
   No Members
   Callers: 
      1. Local/s at silence-00000000;1 (wait: 0:03, prio: 0)

plastiekpoot*CLI> exit


I trust this shows the immediate issue resolved.

Using the full log to show that the functionality now works as expected, queues.conf:

[test]
periodic-announce-frequency=10
periodic-announce=silence/2
periodic-announce-startdelay=2


[Apr 12 11:46:22] VERBOSE[29337] dial.c: Called s at silence
[Apr 12 11:46:22] VERBOSE[29338][C-00000004] pbx.c: Executing [s at silence:1] Answer("Local/s at silence-00000003;2", "") in new stack
[Apr 12 11:46:22] VERBOSE[29337] dial.c: Local/s at silence-00000003;1 answered
[Apr 12 11:46:22] VERBOSE[29337] pbx.c: Launching Queue(test) on Local/s at silence-00000003;1

So start time is 46:22.

[Apr 12 11:46:22] VERBOSE[29337] res_musiconhold.c: Started music on hold, class 'default', on channel 'Local/s at silence-00000003;1'
[Apr 12 11:46:22] VERBOSE[29338][C-00000004] pbx.c: Executing [s at silence:2] Playback("Local/s at silence-00000003;2", "silence/10") in new stack
[Apr 12 11:46:22] VERBOSE[29338][C-00000004] file.c: <Local/s at silence-00000003;2> Playing 'silence/10.gsm' (language 'en')
[Apr 12 11:46:24] VERBOSE[29337] res_musiconhold.c: Stopped music on hold on Local/s at silence-00000003;1

2 seconds in, as per startdelay we play the periodic announcement:

[Apr 12 11:46:24] VERBOSE[29337] app_queue.c: Playing periodic announcement
[Apr 12 11:46:24] VERBOSE[29337] file.c: <Local/s at silence-00000003;1> Playing 'silence/2.gsm' (language 'en')
[Apr 12 11:46:26] VERBOSE[29337] res_musiconhold.c: Started music on hold, class 'default', on channel 'Local/s at silence-00000003;1'
[Apr 12 11:46:32] VERBOSE[29338][C-00000004] pbx.c: Executing [s at silence:3] Goto("Local/s at silence-00000003;2", "loop") in new stack
[Apr 12 11:46:32] VERBOSE[29338][C-00000004] pbx_builtins.c: Goto (silence,s,2)
[Apr 12 11:46:32] VERBOSE[29338][C-00000004] pbx.c: Executing [s at silence:2] Playback("Local/s at silence-00000003;2", "silence/10") in new stack
[Apr 12 11:46:32] VERBOSE[29338][C-00000004] file.c: <Local/s at silence-00000003;2> Playing 'silence/10.gsm' (language 'en')
[Apr 12 11:46:34] VERBOSE[29337] res_musiconhold.c: Stopped music on hold on Local/s at silence-00000003;1

And again 10 seconds after that.  With the relative setting this would be delayed by a further 2 seconds.

[Apr 12 11:46:34] VERBOSE[29337] app_queue.c: Playing periodic announcement
[Apr 12 11:46:34] VERBOSE[29337] file.c: <Local/s at silence-00000003;1> Playing 'silence/2.gsm' (language 'en')
[Apr 12 11:46:36] VERBOSE[29337] res_musiconhold.c: Started music on hold, class 'default', on channel 'Local/s at silence-00000003;1'

Again, sincere apologies for not testing this properly, in my mind it was such a simple change, but this again goes to show that the assumptions are your worst enemy.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/20039
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I8047cfb1ccd006c10fdc288e12f85561b17baea0
Gerrit-Change-Number: 20039
Gerrit-PatchSet: 1
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Friendly Automation
Gerrit-Comment-Date: Wed, 12 Apr 2023 09:49:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230412/47a78560/attachment-0001.html>


More information about the asterisk-code-review mailing list