<div>Hello,</div><div><br></div><div>I found an ugly behavior. In fact it is both a code bug and a mistake of concepts. I'm talking about AMI event from app_queue.c. First let me bring the concepts from voipinfo:</div>
<div><br></div><div>ABANDON: "The caller abandoned their position in the queue."</div>
<div>EXITEMPTY: "The caller was exited from the queue forcefully because the queue had no reachable members and it's configured to do that to callers when there </div><div>are no reachable members."</div><div>
EXITWITHKEY: "The caller elected to use a menu key to exit the queue."</div><div>EXITWITHTIMEOUT: "The caller was on hold too long and the timeout expired."</div><div><br></div><div>I don't want mean we don't know about it, however it's my argument to bring to discuss the importance of this fix. In short, the problem is that app_queue sends the same event to EXITWITHTIMEOUT, EXITWITHKEY, SYSCOMPAT, EXITEMPTY. When app_queue receives any of them it sends: QueueCallerAbandon. In other hand, app_queue saves the correct event in queue_log. As follows:</div>
<div><br></div><div>if (qe.expire && (time(NULL) >= qe.expire)) {</div><div> record_abandoned(&qe);</div><div> reason = QUEUE_TIMEOUT;</div><div> res = 0;</div><div> ast_queue_log(args.queuename, chan->uniqueid, "NONE", "EXITWITHTIMEOUT", "%d", qe.pos);</div>
<div> break;</div><div>}</div><div><br></div><div>The code above sends a "QueueCallerAbandon" coded in record_abandoned.</div><div><br></div><div>I was talking about it with Corydon and he alerted me about the complexity to implement changes in AMI events because many apps use the events in yours front-ends.</div>
<div><br></div><div>What I suggest to this case is create a "deprecated" event in the asterisk 1.4 and 1.6 to events: EXITWITHTIMEOUT, EXITWITHKEY, SYSCOMPAT, EXITEMPTY and sent both the new events and the deprecate event. At 1.8 asterisk this "deprecated event" will be removed. It's not the handsome solution, but is a way to start a change. My argument about this change is that attach a new line "deprecate" at AMI events won't cause problems to implementations that depends of it and at same time send the new events will let the developers of both front-ends and asterisk AMI monitoring to adapt our codes before the asterisk 1.8.</div>
<div><br></div><div>The code below represent a "deprecate" event:</div><div><br></div><div>manager_event(EVENT_FLAG_AGENT, "QueueCallerAbandon",</div><div> "Queue: %s\r\n"</div><div>"Uniqueid: %s\r\n"</div>
<div>"Position: %d\r\n"</div><div> "OriginalPosition: %d\r\n"</div><div> "HoldTime: %d\r\n"</div><div> "Replacedby: QueueCallerExitWithTimeout"</div><div> "Deprecated: Yes",</div>
<div> qe->parent->name, qe->chan->uniqueid, qe->pos, qe->opos, (int)(time(NULL) - qe->start));</div><div><br></div><div>To real ABANDON events the lines "Replacedby" and "Deprecated" will not appear, because it will not removed at future versions.</div>
<div><br></div><div>I posted in pastebin a complete code (asterisk-1.6.2.14) to exemplify my idea: <a href="http://pastebin.com/gaSSnfSW">http://pastebin.com/gaSSnfSW</a> (diff version: <a href="http://pastebin.com/m1zzcF9q">http://pastebin.com/m1zzcF9q</a>)</div>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>Bye</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8">