List Info

Thread: trunk r30152 - /trunk/apps/app_queue.c]




trunk r30152 - /trunk/apps/app_queue.c]
user name
2006-05-25 01:18:08
What, exactly, does rna stand for?

After looking a second and third time, I see that it must
means "ring no 
answer"...  Any chance you can add a comment which
explains this? 

-------- Original Message --------

Author: bweschke
Date: Wed May 24 19:11:30 2006
New Revision: 30152

URL: http://svn.digium.com/view/asterisk?rev=30152&view
=rev
Log:
 Make sure we catch all the instances where a member didn't
answer the call sent to them rather than just on a timeout
after a dial attempt and some minor code cleanup/reuse.


Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http
://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=3
0152&r1=30151&r2=30152&view=diff
============================================================
==================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed May 24 19:11:30 2006
 -1659,6
+1659,23 
 	ast_mutex_unlock(&qe->parent->lock);
 }
 
+static void rna(int rnatime, struct queue_ent *qe, char
*membername)
+{
+
+	if (option_verbose > 2)
+		ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in
%d ms\n", rnatime);
+	ast_queue_log(qe->parent->name,
qe->chan->uniqueid, membername,
"RINGNOANSWER", "%d", rnatime);
+	if (qe->parent->autopause) {
+		if (!set_member_paused(qe->parent->name,
membername, 1)) {
+			if (option_verbose > 2)
+				ast_verbose( VERBOSE_PREFIX_3 "Auto-Pausing Queue
Member %s in queue %s since they failed to
answer.\n", membername, qe->parent->name);
+		} else {
+			if (option_verbose > 2)
+				ast_verbose( VERBOSE_PREFIX_3 "Failed to pause
Queue Member %s in queue %s!\n", membername,
qe->parent->name);
+		}
+	}
+ return;
+} 
 
 #define AST_MAX_WATCHERS 256
 
 -1677,6
+1694,10 
 	struct ast_channel *winner;
 	struct ast_channel *in = qe->chan;
 	char on[256] = "";
+	long starttime = 0;
+	long endtime = 0;	
+
+	starttime = (long)time(NULL);
 	
 	while(*to && !peer) {
 		int numlines, retry, pos = 1;
 -1792,6
+1813,9 
 							if (in->cdr)
 								ast_cdr_busy(in->cdr);
 							do_hang(o);
+							endtime = (long)time(NULL);
+							endtime -= starttime;
+							rna(endtime*1000, qe, on);
 							if (qe->parent->strategy !=
QUEUE_STRATEGY_RINGALL) {
 								if (qe->parent->timeoutrestart)
 									*to = orig;
 -1804,6
+1828,9 
 								ast_verbose( VERBOSE_PREFIX_3 "%s is
circuit-busy\n", o->chan->name);
 							if (in->cdr)
 								ast_cdr_busy(in->cdr);
+							endtime = (long)time(NULL);
+							endtime -= starttime;
+							rna(endtime*1000, qe, on);
 							do_hang(o);
 							if (qe->parent->strategy !=
QUEUE_STRATEGY_RINGALL) {
 								if (qe->parent->timeoutrestart)
 -1831,6
+1858,9 
 					}
 					ast_frfree(f);
 				} else {
+					endtime = (long)time(NULL);
+					endtime -= starttime;
+					rna(endtime*1000, qe, on);
 					do_hang(o);
 					if (qe->parent->strategy !=
QUEUE_STRATEGY_RINGALL) {
 						if (qe->parent->timeoutrestart)
 -1872,20
+1902,8 
 			}
 			ast_frfree(f);
 		}
-		if (!*to) {
-			if (option_verbose > 2)
-				ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up
in %d ms\n", orig);
-			ast_queue_log(qe->parent->name,
qe->chan->uniqueid, on, "RINGNOANSWER",
"%d", orig);
-			if (qe->parent->autopause) {
-				if (!set_member_paused(qe->parent->name, on, 1))
{
-					if (option_verbose > 2)
-						ast_verbose( VERBOSE_PREFIX_3 "Auto-Pausing
Queue Member %s in queue %s since they failed to
answer.\n", on, qe->parent->name);
-				} else {
-					if (option_verbose > 2)
-						ast_verbose( VERBOSE_PREFIX_3 "Failed to pause
Queue Member %s in queue %s!\n", on,
qe->parent->name);
-				}
-			}
-		}
+		if (!*to) 
+			rna(orig, qe, on);
 	}
 
 	return peer;

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   
http://lists.digium.com/mailman/listinfo/svn-commits

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
trunk r30152 - /trunk/apps/app_queue.c]
user name
2006-05-25 13:47:07
	Based on the code in the commit message and other
experience with call
centers Ring No Answer will pause an agent in a queue if
they fail to
answer a call. For example if I log into a queue and then
get up to goto
the washroom and a call comes to my phone and I fail to
answer it will
pause me in that queue so I don't miss anymore calls.

-Evan

North Antara wrote:
> What, exactly, does rna stand for?
> 
> After looking a second and third time, I see that it
must means "ring no
> answer"...  Any chance you can add a comment
which explains this? 
> 
> -------- Original Message --------
> 
> Author: bweschke
> Date: Wed May 24 19:11:30 2006
> New Revision: 30152
> 
> URL: http://svn.digium.com/view/asterisk?rev=30152&view
=rev
> Log:
> Make sure we catch all the instances where a member
didn't answer the
> call sent to them rather than just on a timeout after a
dial attempt and
> some minor code cleanup/reuse.
> 
> 
> Modified:
>    trunk/apps/app_queue.c
> 
> Modified: trunk/apps/app_queue.c
> URL:
> http
://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=3
0152&r1=30151&r2=30152&view=diff
> 
>
============================================================
==================
> 
> --- trunk/apps/app_queue.c (original)
> +++ trunk/apps/app_queue.c Wed May 24 19:11:30 2006
>  -1659,6 +1659,23 
>     ast_mutex_unlock(&qe->parent->lock);
> }
> 
> +static void rna(int rnatime, struct queue_ent *qe,
char *membername)
> +{
> +
> +    if (option_verbose > 2)
> +        ast_verbose( VERBOSE_PREFIX_3 "Nobody
picked up in %d ms\n",
> rnatime);
> +    ast_queue_log(qe->parent->name,
qe->chan->uniqueid, membername,
> "RINGNOANSWER", "%d", rnatime);
> +    if (qe->parent->autopause) {
> +        if (!set_member_paused(qe->parent->name,
membername, 1)) {
> +            if (option_verbose > 2)
> +                ast_verbose( VERBOSE_PREFIX_3
"Auto-Pausing Queue
> Member %s in queue %s since they failed to
answer.\n", membername,
> qe->parent->name);
> +        } else {
> +            if (option_verbose > 2)
> +                ast_verbose( VERBOSE_PREFIX_3
"Failed to pause Queue
> Member %s in queue %s!\n", membername,
qe->parent->name);
> +        }
> +    }
> + return;
> +}
> #define AST_MAX_WATCHERS 256
> 
>  -1677,6 +1694,10 
>     struct ast_channel *winner;
>     struct ast_channel *in = qe->chan;
>     char on[256] = "";
> +    long starttime = 0;
> +    long endtime = 0;   
> +
> +    starttime = (long)time(NULL);
>     
>     while(*to && !peer) {
>         int numlines, retry, pos = 1;
>  -1792,6 +1813,9 
>                             if (in->cdr)
>                                
ast_cdr_busy(in->cdr);
>                             do_hang(o);
> +                            endtime =
(long)time(NULL);
> +                            endtime -= starttime;
> +                            rna(endtime*1000, qe, on);
>                             if
(qe->parent->strategy !=
> QUEUE_STRATEGY_RINGALL) {
>                                 if
(qe->parent->timeoutrestart)
>                                     *to = orig;
>  -1804,6 +1828,9 
>                                 ast_verbose(
VERBOSE_PREFIX_3 "%s is
> circuit-busy\n", o->chan->name);
>                             if (in->cdr)
>                                
ast_cdr_busy(in->cdr);
> +                            endtime =
(long)time(NULL);
> +                            endtime -= starttime;
> +                            rna(endtime*1000, qe, on);
>                             do_hang(o);
>                             if
(qe->parent->strategy !=
> QUEUE_STRATEGY_RINGALL) {
>                                 if
(qe->parent->timeoutrestart)
>  -1831,6 +1858,9 
>                     }
>                     ast_frfree(f);
>                 } else {
> +                    endtime = (long)time(NULL);
> +                    endtime -= starttime;
> +                    rna(endtime*1000, qe, on);
>                     do_hang(o);
>                     if (qe->parent->strategy !=
QUEUE_STRATEGY_RINGALL) {
>                         if
(qe->parent->timeoutrestart)
>  -1872,20 +1902,8 
>             }
>             ast_frfree(f);
>         }
> -        if (!*to) {
> -            if (option_verbose > 2)
> -                ast_verbose( VERBOSE_PREFIX_3
"Nobody picked up in %d
> ms\n", orig);
> -            ast_queue_log(qe->parent->name,
qe->chan->uniqueid, on,
> "RINGNOANSWER", "%d", orig);
> -            if (qe->parent->autopause) {
> -                if
(!set_member_paused(qe->parent->name, on, 1)) {
> -                    if (option_verbose > 2)
> -                        ast_verbose( VERBOSE_PREFIX_3
"Auto-Pausing
> Queue Member %s in queue %s since they failed to
answer.\n", on,
> qe->parent->name);
> -                } else {
> -                    if (option_verbose > 2)
> -                        ast_verbose( VERBOSE_PREFIX_3
"Failed to pause
> Queue Member %s in queue %s!\n", on,
qe->parent->name);
> -                }
> -            }
> -        }
> +        if (!*to) +            rna(orig, qe, on);
>     }
> 
>     return peer;
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> svn-commits mailing list
> To UNSUBSCRIBE or update options visit:
>   
http://lists.digium.com/mailman/listinfo/svn-commits
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )