<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Christian Gansberger escribi&oacute;:
<blockquote
 cite="mid:84e53ee00907090057t4e3423d9gb5177f9e75ebbe84@mail.gmail.com"
 type="cite">
  <pre wrap="">On Thu, Jul 9, 2009 at 12:21 AM, Miguel Molina<a class="moz-txt-link-rfc2396E" href="mailto:mmolina@millenium.com.co">&lt;mmolina@millenium.com.co&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Christian Gansberger escribi&oacute;:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi all!

I want to autopause my queue member when they are not answering within
20 seconds, and the autopause
should affect all queues they are member of, not only the queue where
the call was not answered.

Is there a way to do that?

The members gets dynamically added. I'm using asterisk 1.4.21.2.

_______________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
&nbsp; &nbsp;<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>

      </pre>
    </blockquote>
    <pre wrap="">Why would you want to do that? The purpose of the autopause is to
discard the "absent" agent that is not responding to the calls to not
try it anymore until it gets unpaused by a supervisor or someone else,
and therefore the pause is made to all queues the agent is member of.
Why pause it on only one queue, letting it ring on other queues?

Aside from the purpose you have on this, I think you would need to
modify the app_queue.c code to make the parameter configurable inside
each queue definition and not on the general section of queues.conf.
Then you would need to modify the logic to handle the autopause
configured for each queue. This is a general idea as I didn't take a
deep look of app_queue.c to see how it works exactly.

Any other solution without changing asterisk code would imply a external
application that monitors the queues and makes the custom autopause you
need.

Just my two cents...

--
Ing. Miguel Molina
Grupo de Tecnolog&iacute;a
Millenium Phone Center


_______________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
&nbsp; <a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->
To make things clearer:

I want  the queue member is autopaused on all queues. As a matter of
fact in asterisk (vers. 1.4.24.1)
the queue member is only paused on one Queue.

I tried setting autopause=yes in general context, which doesn't do anything.
So i set autopause=yes in every Queue definition, which is working,
but only on that queue.

I don't use the agents channel (well i tried, with ending up in lots
of trouble), because its
depreciated in asterisk 1.4 and gone in 1.6. so i decided to
do as proposed in UPGRADE.txt and
asterisk-src/doc/queues-with-callback-members.txt,
with one change, i'm not using the Local channel, because it is not
showing the right status
of the devices in the queue. (I wonder how the callcenter at digiums
ist working with that).

maybe anyone else having problems with queues in asterisk 1.4?

yours
christian gansberger
  </pre>
</blockquote>
You're right, the autopause on its standard behavior pauses only the
member of the queue where it belongs. Taking a little look at
app_queue.c (<a class="moz-txt-link-freetext" href="http://www.asterisk.org/doxygen/1.4/app__queue_8c.html">http://www.asterisk.org/doxygen/1.4/app__queue_8c.html</a>)
you can very easily patch the source code to achieve the functionality
you want. The key functions are:<br>
<br>
static int set_member_paused -&gt; Traverses the queues doing all the
things necessary on all different scenarios (realtime, etc) to pause
the member you give to it. If there's no queue name given, it with
pause the member on all queues (the PAUSEALL event).<br>
<br>
static void rna -&gt; (as the doxygen doc says) RNA == Ring No Answer.
Common code that is executed when we try a queue member and they don't
answer. <br>
<br>
If you take a look to the rna function, with autopaused enabled it will
pause the member if it doesn't answer the queue call after the timeout
time. You can make it pause all members just by changing this one line:<br>
<br>
<pre class="fragment">02164       <span class="keywordflow">if</span> (!<a
 class="code"
 href="http://www.asterisk.org/doxygen/1.4/app__queue_8c.html#d61f43e341bcf4c523f2fdb01ece066b">set_member_paused</a>(qe-&gt;<a
 class="code"
 href="http://www.asterisk.org/doxygen/1.4/structqueue__ent.html#59ceee334ec79ed344313a7e8affb3fc">parent</a>-&gt;<a
 class="code"
 href="http://www.asterisk.org/doxygen/1.4/structcall__queue.html#188159d17b341b26fcfe4b57baefd372">name</a>, <a
 class="code"
 href="http://www.asterisk.org/doxygen/1.4/structcallattempt.html#8ee1350d5c943c7ee1ad3da9078eda25">interface</a>, 1)) {

to

02164       <span class="keywordflow">if</span> (!<a class="code"
 href="http://www.asterisk.org/doxygen/1.4/app__queue_8c.html#d61f43e341bcf4c523f2fdb01ece066b">set_member_paused</a>("", <a
 class="code"
 href="http://www.asterisk.org/doxygen/1.4/structcallattempt.html#8ee1350d5c943c7ee1ad3da9078eda25">interface</a>, 1)) {

</pre>
That way we don't send the queue name, pausing it in all the queues it
is member of.<br>
<br>
Although it's not tested, it might work for you. That's the beauty of
Asterisk and well documented Open Source projects, you can get to the
code as deep as you want, learn from it how it works, and change
it/improve it according to your needs. Good contributions make it to
the official code as well.<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">-- 
Ing. Miguel Molina
Grupo de Tecnolog&iacute;a
Millenium Phone Center
</pre>
</body>
</html>