Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: app_queue.c
- --- app_queue.c (revision 295023)
- +++ app_queue.c (working copy)
- @@ -2884,6 +2885,7 @@
- /* Request the peer */
- tmp->chan = ast_request(tech, qe->chan->nativeformats, qe->chan, location, &status);
- if (!tmp->chan) { /* If we can't, just go on to the next call */
- + rna(0, qe, tmp->member->state_interface, tmp->member->membername, 0, AST_CAUSE_CONGESTION);
- if (qe->chan->cdr)
- ast_cdr_busy(qe->chan->cdr);
- tmp->stillgoing = 0;
- @@ -2967,6 +2969,7 @@
- /* Place the call, but don't wait on the answer */
- if ((res = ast_call(tmp->chan, location, 0))) {
- /* Again, keep going even if there's an error */
- + rna(0, qe, tmp->member->state_interface, tmp->member->membername, 0, AST_CAUSE_CONGESTION);
- ast_debug(1, "ast call on peer returned %d\n", res);
- ast_verb(3, "Couldn't call %s\n", tmp->interface);
- ast_channel_unlock(tmp->chan);
- @@ -3189,7 +3192,7 @@
- }
- /*! \brief RNA == Ring No Answer. Common code that is executed when we try a queue member and they don't answer. */
- -static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername, int pause)
- +static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername, int pause, int reason)
- {
- ast_verb(3, "Nobody picked up in %d ms\n", rnatime);
- @@ -3209,6 +3212,7 @@
- "Member: %s\r\n"
- "MemberName: %s\r\n"
- "Ringtime: %d\r\n"
- + "Reason: %s\r\n"
- "%s",
- qe->parent->name,
- qe->chan->uniqueid,
- @@ -3216,9 +3220,10 @@
- interface,
- membername,
- rnatime,
- + ast_cause2str(reason),
- qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
- }
- - ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
- + ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d|%s", rnatime, ast_cause2str(reason));
- if (qe->parent->autopause != QUEUE_AUTOPAUSE_OFF && pause) {
- if (qe->parent->autopause == QUEUE_AUTOPAUSE_ON) {
- if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {
- @@ -3515,7 +3520,7 @@
- do_hang(o);
- endtime = (long) time(NULL);
- endtime -= starttime;
- - rna(endtime * 1000, qe, on, membername, 0);
- + rna(endtime * 1000, qe, on, membername, 0, o->chan->hangupcause);
- if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
- if (qe->parent->timeoutrestart)
- *to = orig;
- @@ -3533,7 +3538,7 @@
- ast_cdr_busy(in->cdr);
- endtime = (long) time(NULL);
- endtime -= starttime;
- - rna(endtime * 1000, qe, on, membername, 0);
- + rna(endtime * 1000, qe, on, membername, 0, o->chan->hangupcause);
- do_hang(o);
- if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
- if (qe->parent->timeoutrestart)
- @@ -3648,7 +3653,7 @@
- }
- if (!*to) {
- for (o = start; o; o = o->call_next)
- - rna(orig, qe, o->interface, o->member->membername, 1);
- + rna(orig, qe, o->interface, o->member->membername, 1, AST_CAUSE_NOANSWER);
- }
- }
- Index: UPGRADE.txt
- --- UPGRADE.txt (revision 295023)
- +++ UPGRADE.txt (working copy)
- @@ -30,6 +30,12 @@
- - The default value for 'context' and 'parkinglots' in gtalk.conf has
- been changed to 'default', previously they were empty.
- +QueueLog:
- + - RINGNOANSWER now has the hangup reason as the last parameter.
- +Manager:
- + - Manager event AgentRingNoAnswer now includes "Reason"-
- + parameter, which holds the hangup reason.
- +
- ===========================================================
- ===========================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement