0

I have realtimequeue. After restarting asterisk do not sees queue members. When execute on cli this command “queue pause member SIP/111” get this error.

Unable to pause interface 'SIP/111’
Command ‘queue pause member SIP/111’ failed.

But after execute this command “queue show” Asterisk sees all queue members.

Note: I use realtime config.

[settings]
queues => odbc,asteriskdb,queue_table
queue_members => odbc,asteriskdb,queue_member_table
queue_log => odbc,asteriskdb,queue_log
Ramin Darvishov
  • 1,043
  • 1
  • 15
  • 30

1 Answers1

1

That is normal behavour for realtime queues.

However they still can work and queue will be fetched on first request. It designed so to support thousands of "lazy" queues.

If you want it always be in memory, use realtime config store method.

arheops
  • 15,544
  • 1
  • 21
  • 27
  • 1
    No, you use realtime queues. Realtime config is when you put in db config itself using "queues.conf", not "queues". If so, in table should be config file itself line-by-line and it load that only when you do module reload.https://www.voip-info.org/asterisk-realtime/ - see static configs section. – arheops Oct 06 '19 at 16:00
  • If queue is inactive for some period may be queued state changed from active to inactive ("lazy")? Or queue fetched once then it will always be active. – Ramin Darvishov Oct 07 '19 at 05:29
  • 1
    No. "Lazy" mean it NOT load ALL queues. When you ask for queue(exec app_queue) it check in realtime and if found start it. But can be billions of queues in database. Also it read members every time you start queue. – arheops Oct 07 '19 at 07:46
  • I have few queues. Is it possible without realtime config load all queues members after restart Asterisk? Or execute queue show command. – Ramin Darvishov Oct 07 '19 at 10:07
  • Load - yes. Just create call into each. stats not work for realtime, unless you do it via config load like described above – arheops Oct 07 '19 at 17:59
  • Can i write some shell script which runs after restart Asterisk or detect Asterisk loaded and run shell command. – Ramin Darvishov Oct 10 '19 at 12:47
  • 1
    For most system asterisk started via shell script /usr/sbin/safe_asterisk.sh, just change it. – arheops Oct 10 '19 at 14:09
  • Sufficiently just adding to the end of file asterisk -rx 'queue show' ? It will execute after restarting asterisk (after whole opening)? Or must to wait a few seconds (with shell command sleep xx) – Ramin Darvishov Oct 10 '19 at 16:00