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

2005-08-26 Thread Hadar Pedhazur
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 [EMAIL PROTECTED]
Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
To: 'Asterisk Users Mailing List - Non-Commercial Discussion' 
asterisk-users@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  : [EMAIL PROTECTED];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 ;-).

___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


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

2005-08-26 Thread Greg Boehnlein
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  : [EMAIL PROTECTED];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



___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

2005-08-26 Thread Greg Boehnlein
On Fri, 26 Aug 2005, Hadar Pedhazur wrote:

 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.

I just got your message and responded to it! ;)

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



___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

2005-08-26 Thread Hadar Pedhazur

Greg Boehnlein wrote:
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.


Thank you very much for response, it clarified all of my fears ;-)

I just checked out the wiki page for ICD. I see that it's a work in 
progress. At the moment, my patched chan_agent does exactly what I 
need, given that I only have one queue that needs to be processed. I 
know I will eventually grow out of that.


So, the question is: Is ICD ready to use in a semi-production mode 
(meaning, once the specific tasks that I want are tested, if I stick 
to those, is the code stable)?, or, since my need isn't immediate, would 
I be better off waiting a few months for the code to mature a bit.


Just looking for an opinion, not absolution ;-)

Thanks again.
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


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

2005-08-18 Thread Hadar Pedhazur
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  : [EMAIL PROTECTED];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 ;-).

___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users