[asterisk-dev] timelimit for calls bridged by queue app.

Rajkumar S rajkumars+asterisk at gmail.com
Wed Nov 1 00:11:04 MST 2006


Hi,

I need to limit the number of seconds an agent can talk to a caller
from a queue. There is an option of S(x) and L() which can use from
dial plan, but these do not work when the calls are bridged via
app_queue.

I went through the code and found that the &bridge_config that is used
in ast_bridge_call does not have timelimit value set. So I applied a
simple patch to set this (against v 1.2.4).

diff --git a/apps/app_queue.c b/apps/app_queue.c
index efd37e2..347a55e 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2061,6 +2061,8 @@ static int try_calling(struct queue_ent
                                *go_on = 1;
                        break;
                }
+       /* We are hardcoding 30 seconds time limit here */
+       bridge_config.timelimit = 30000;

        /* Hold the lock while we setup the outgoing calls */
        if (use_weight)

After applying this patch all calls that are bridged from the
app_queue is terminated in 30 seconds.

This is my first patch for asterisk and I would like to see if this
patch has any undesirable side effects affecting  stability of
asterisk in general. Any tips to make this a per queue option [some
thing like L in Dial] would also be much appreciated.

with warm regards,

raj


More information about the asterisk-dev mailing list