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

Greg Boehnlein damin at nacs.net
Fri Aug 26 17:57:23 MST 2005


On Thu, 18 Aug 2005, Hadar Pedhazur wrote:

> 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...)

It is the correct behavior because when you use SIP/100, chan_sip (which 
has no concept of an agent) is being used instead of chan_agent to 
deliver the call. Think of chan_agent as an intermediary between the PBX 
core and the physical endpoint. chan_agent accepts the call, puts the 
caller on hold and then grabs chan_sip to complete the other side of the 
call. When all requirements of chan_agent are met, it then proceeds to 
bridge the two calls together and get out of the way.
 
> 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".

Right. It's a botched design and chan_agent's design doesn't lend itself 
to being very helpful in the process, but that is where it had to go. This 
is the reason that I dropped work on it, as ICD was a much more 
intelligent design at the time.

> 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 ;-).

Don't have an answer for this one. :)

-- 
    Vice President of N2Net, a New Age Consulting Service, Inc. Company
         http://www.n2net.net Where everything clicks into place!
                             KP-216-121-ST






More information about the asterisk-users mailing list