[Asterisk-Users] Updated Patch to chan_agent.c for PREACKANNOUNCE

Hadar Pedhazur hadar at unorthodox.com
Fri Aug 26 04:22:12 MST 2005


Hmmm. I am often surprised when I don't get a response to a post that I 
think would interest at least _one_ person in the community. This one 
surprised me a little more, since I offered some code ;-).

This morning, I just got a bounce notice that it was undelivered, which 
might explain it, except that I received the original post back through 
the list, so I don't understand it at all...

Anyway, I solved the one "bone-headed" problem that I describe below, 
namely why did the agents show up in one DB and not the other. I didn't 
set the "persistent" keyword in the agents.conf file (doh...).

All of my other questions still apply, as well as my offer to share the 
code/patch.

-------- Original Message --------
Subject: [Asterisk-Users] Updated Patch to chan_agent.c for PREACKANNOUNCE
Date: Thu, 18 Aug 2005 16:28:19 -0400
From: Hadar Pedhazur <hadar at unorthodox.com>
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion 
<asterisk-users at lists.digium.com>
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
<asterisk-users at lists.digium.com>

First, many thanks to Greg Boehnlein for his patch to chan_agent.c
for adding a "preackannounce" option.

I am running CVS HEAD from 2005/07/31, and the patch failed in a
few hunks, since the code was refactored to add in some CASE
statements where there were compound if statements before.

Anyway, I have successfully updated the patch to work against head
as of 3 weeks ago, and would happily share that with anyone who is
interested (just drop me a line off list).

If a "diff" is preferable to the full 70k of "C", just let me know
what the correct options are for creating a diff suitable for
patching the asterisk tree.

OK, that said, I have a few questions and comments on this topic.
This is my first use of the Queue command (very successfully so
far), but I am afraid that expanding my use will require further
patches, and I would like to verify that first.

1) If I use the syntax:

Member => SIP/100 (rather than member => Agent/100, which maps to
SIP/100)

Then "ackcall" isn't used at all. In other words, a "hard-wired"
member seems to ignore the agents.conf file completely. Is this
the desired behavior? (It isn't for me...)

2) Since agents.conf is a separate file from queues.conf, having
multiple queues does _not_ permit multiple "preackannounce"
messages, each tied to a different queue (this strikes me as
having better been patched into the Queue command). Similarly, you
can't have one queue that has "ackcall=yes", and another with
"ackcall=no".

3) I have the _exact_ same source version of CVS HEAD (from
2005/07/31) running on different servers (after a "cvs co", I tar
the source so that I can be sure I'm running _identical_
versions).

On one machine, when an Agent logs in, I can see it in the DB,
"database show" shows a key of:

//Agents/1001  : 721001 at internal;1001

On another machine, the DB shows _nothing_, yet the
AgentCallbackLogin application works correctly (logging agents in
and out), and shows the correct mapping on the CLI during a login.
Still, the DB has _no trace_ of the Agents. I can't explain the
difference in behavior, and would _love_ to have someone solve
that mystery for me.

I'm hoping that I am missing something obvious in the interaction
between the Queue command and the Agents channel, and that some
kind soul here will educate me. Otherwise, I think I might be off
to doing more work in "C" than I ever though I would again in my
life ;-).




More information about the asterisk-users mailing list