Thread: [Asterisk-java-devel] AsteriskAgent - State
Brought to you by:
srt
From: Thomas K. <tho...@ac...> - 2008-01-24 14:22:15
|
Hello! I've got the following problem: I'd like to get the number of agents which are in the "calling" state. I wrote the following code: for (AsteriskAgent agent : asteriskServer.getAgents()) { if(agent.getStatus() == AgentState.AGENT_ONCALL){ active_calls++; } } But the state of all agents is always IDLE, even if the corresponding agent is currently engaged in a call. Did I forget to set something in the config files of asterisk? I already set the following variables: in queues.conf: eventwhencalled = yes in sip.conf: callevents = yes Thanks a lot, Thomas -- Thomas Kenner |
From: Carlos G M. <tr...@hu...> - 2008-01-24 14:50:38
|
Thomas, if you are using Agents, they are only "ACTIVE" when receiving calls. If they make calls, then the Agent channel is still idle, as you see. Managing this and also the fact that most IP phones can actually have multiple calls is ... problematic sometimes. (I.e. your agents, if human, usually don't want to receive an ACD call when talking, and somehow if you have blended agents, you have to block that). -Carlos Thomas Kenner @ 24/1/2008 08:22 -0600 dixit: > Hello! > > I've got the following problem: > > I'd like to get the number of agents which are in the "calling" state. I wrote > the following code: > > for (AsteriskAgent agent : asteriskServer.getAgents()) { > if(agent.getStatus() == AgentState.AGENT_ONCALL){ > active_calls++; > } > } > > But the state of all agents is always IDLE, even if the corresponding agent is > currently engaged in a call. > > Did I forget to set something in the config files of asterisk? I already set > the following variables: > in queues.conf: eventwhencalled = yes > in sip.conf: callevents = yes > > Thanks a lot, > Thomas > -- Carlos G Mendioroz <tr...@hu...> LW7 EQI Argentina |
From: Breucking P. <bre...@go...> - 2008-01-24 15:07:00
|
Hi Thomas, I checked your snippet against trunk version and it worked as expected. Has the engaged agent answered a call from the queue? For more help I need some more information: - asterisk version - code revision - short descriptions of agents/queue scenario Regards, Patrick Patrick Breucking <bre...@GO...> (System Engineer) * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 * http://www.GONICUS.de *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder *Vorsitzender des Beirats: Juergen Michels *Amtsgericht Arnsberg * HRB 1968 Am 24.01.2008 um 15:22 schrieb Thomas Kenner: > Hello! > > I've got the following problem: > > I'd like to get the number of agents which are in the "calling" > state. I wrote > the following code: > > for (AsteriskAgent agent : asteriskServer.getAgents()) { > if(agent.getStatus() == AgentState.AGENT_ONCALL){ > active_calls++; > } > } > > But the state of all agents is always IDLE, even if the > corresponding agent is > currently engaged in a call. > > Did I forget to set something in the config files of asterisk? I > already set > the following variables: > in queues.conf: eventwhencalled = yes > in sip.conf: callevents = yes > > Thanks a lot, > Thomas > > -- > Thomas Kenner > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > |
From: Thomas K. <tho...@ac...> - 2008-01-25 09:02:35
|
Hi Patrick, The engaged agent answered the call directly from another agent. I tested calling over a queue: the state was set to AGENT_ONCALL. Should the state only be set to AGENT_ONCALL if the call comes from a queue? When is the state AGENT_RINGING set? Which event is triggered? Thanks a lot, Thomas (I'm using code revision 944 and Asterisk 1.4.10) On Thursday 24 January 2008 16:06:55 Breucking Patrick wrote: > Hi Thomas, > > I checked your snippet against trunk version and it worked as > expected. Has the engaged agent answered a call from the queue? > > For more help I need some more information: > > - asterisk version > - code revision > - short descriptions of agents/queue scenario > > Regards, > Patrick > > > Patrick Breucking <bre...@GO...> (System Engineer) > * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg > * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 > * http://www.GONICUS.de > > *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg > *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder > *Vorsitzender des Beirats: Juergen Michels > *Amtsgericht Arnsberg * HRB 1968 > > Am 24.01.2008 um 15:22 schrieb Thomas Kenner: > > Hello! > > > > I've got the following problem: > > > > I'd like to get the number of agents which are in the "calling" > > state. I wrote > > the following code: > > > > for (AsteriskAgent agent : asteriskServer.getAgents()) { > > if(agent.getStatus() == AgentState.AGENT_ONCALL){ > > active_calls++; > > } > > } > > > > But the state of all agents is always IDLE, even if the > > corresponding agent is > > currently engaged in a call. > > > > Did I forget to set something in the config files of asterisk? I > > already set > > the following variables: > > in queues.conf: eventwhencalled = yes > > in sip.conf: callevents = yes > > > > Thanks a lot, > > Thomas > > > > -- > > Thomas Kenner > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > Asterisk-java-devel mailing list > > Ast...@li... > > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel -- DI Thomas Kenner eMail: tho...@ac... www: http://www.acoveo.com |
From: Breucking P. <bre...@go...> - 2008-01-25 11:50:06
|
Am 25.01.2008 um 10:02 schrieb Thomas Kenner: > Hi Patrick, > > The engaged agent answered the call directly from another agent. I > tested > calling over a queue: the state was set to AGENT_ONCALL. Should the > state > only be set to AGENT_ONCALL if the call comes from a queue? This event is generated by the asterisk and so it should. This is maybe a fault in the asterisk agent model. Stefan what do you think about it. Should we "correct" these "faults"? > > > When is the state AGENT_RINGING set? Which event is triggered? This event is not implemented and will be removed. > > > Thanks a lot, > Thomas > > (I'm using code revision 944 and Asterisk 1.4.10) > > > On Thursday 24 January 2008 16:06:55 Breucking Patrick wrote: >> Hi Thomas, >> >> I checked your snippet against trunk version and it worked as >> expected. Has the engaged agent answered a call from the queue? >> >> For more help I need some more information: >> >> - asterisk version >> - code revision >> - short descriptions of agents/queue scenario >> >> Regards, >> Patrick >> >> >> Patrick Breucking <bre...@GO...> (System Engineer) >> * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg >> * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 >> * http://www.GONICUS.de >> >> *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg >> *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder >> *Vorsitzender des Beirats: Juergen Michels >> *Amtsgericht Arnsberg * HRB 1968 >> >> Am 24.01.2008 um 15:22 schrieb Thomas Kenner: >>> Hello! >>> >>> I've got the following problem: >>> >>> I'd like to get the number of agents which are in the "calling" >>> state. I wrote >>> the following code: >>> >>> for (AsteriskAgent agent : asteriskServer.getAgents()) { >>> if(agent.getStatus() == AgentState.AGENT_ONCALL){ >>> active_calls++; >>> } >>> } >>> >>> But the state of all agents is always IDLE, even if the >>> corresponding agent is >>> currently engaged in a call. >>> >>> Did I forget to set something in the config files of asterisk? I >>> already set >>> the following variables: >>> in queues.conf: eventwhencalled = yes >>> in sip.conf: callevents = yes >>> >>> Thanks a lot, >>> Thomas >>> >>> -- >>> Thomas Kenner >>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Asterisk-java-devel mailing list >>> Ast...@li... >>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > > > > -- > DI Thomas Kenner > eMail: tho...@ac... > www: http://www.acoveo.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > |
From: Stefan R. <ste...@re...> - 2008-01-25 12:06:57
Attachments:
signature.asc
|
Breucking Patrick wrote: > This event is generated by the asterisk and so it should. This is maybe= > a fault in the asterisk agent model. Stefan what do you think about it.= > Should we "correct" these "faults"? I think we should closly mirror the Asterisk model in the live API. Thomas, you said the agent was on a direct call from another agent and not one from the queue. In Asterisk you have pseudo channels for agents (Agent/xxx iirc) if you want to treat the calls from other agents like queue calls you should not call the agent directly (e.g. on the corresponding SIP/xxx channel but use the agent pseudo channel in your dialplan. This should make the queue aware that the agent is on call and trigger the desired events. =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Breucking P. <bre...@go...> - 2008-01-25 12:13:35
|
Thats my opinion to, it will be difficult to understand processes, if they are handled different in a "live"-image of asterisk Regards, Patrick Patrick Breucking <bre...@GO...> (System Engineer) * GONICUS GmbH * NL Arnsberg * Moehnestrasse 11-17 * D-59755 Arnsberg * Tel.: +49 (0) 29 32 / 9 16 - 0 * Fax: +49 (0) 29 32 / 9 16 - 278 * http://www.GONICUS.de *Sitz der Gesellschaft: Moehnestrasse 11-17 * D-59755 Arnsberg *Geschaeftsfuehrer: Rainer Luelsdorf, Alfred Schroeder *Vorsitzender des Beirats: Juergen Michels *Amtsgericht Arnsberg * HRB 1968 Am 25.01.2008 um 13:06 schrieb Stefan Reuter: > Breucking Patrick wrote: >> This event is generated by the asterisk and so it should. This is >> maybe >> a fault in the asterisk agent model. Stefan what do you think about >> it. >> Should we "correct" these "faults"? > > I think we should closly mirror the Asterisk model in the live API. > > Thomas, you said the agent was on a direct call from another agent and > not one from the queue. In Asterisk you have pseudo channels for > agents > (Agent/xxx iirc) if you want to treat the calls from other agents like > queue calls you should not call the agent directly (e.g. on the > corresponding SIP/xxx channel but use the agent pseudo channel in your > dialplan. This should make the queue aware that the agent is on call > and > trigger the desired events. > > =Stefan > > -- > reuter network consulting > Neusser Str. 110 > 50760 Koeln > Germany > Telefon: +49 221 1305699-0 > Telefax: +49 221 1305699-90 > E-Mail: ste...@re... > Jabber: ste...@re... > WWW: http://www.reucon.com > > Steuernummern 215/5140/1791 USt-IdNr. DE220701760 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel |
From: Thomas K. <tho...@ac...> - 2008-01-28 09:44:01
|
On Friday 25 January 2008 13:06:38 Stefan Reuter wrote: > Thomas, you said the agent was on a direct call from another agent and > not one from the queue. In Asterisk you have pseudo channels for agents > (Agent/xxx iirc) if you want to treat the calls from other agents like > queue calls you should not call the agent directly (e.g. on the > corresponding SIP/xxx channel but use the agent pseudo channel in your > dialplan. This should make the queue aware that the agent is on call and > trigger the desired events. OK. Thanks a lot for your help. When I try to dial the agent [exten => 1234,n,Dial(Agent/1234)] instead of the SIP channel, then I get the following warning from Asterisk: app_dial.c:1106 dial_exec_full: Unable to create channel of type 'Agent' (cause 17 - User busy) I think this problem doesn't really belongs to this mailing-list. But if you have an idea what the problem could be, I would be gratful for any hint. ;-) Regards, Thomas -- Thomas Kenner |
From: Stefan R. <ste...@re...> - 2008-01-29 01:28:58
Attachments:
signature.asc
|
Thomas Kenner wrote: > app_dial.c:1106 dial_exec_full: Unable to create channel of type 'Agent= '=20 > (cause 17 - User busy) Is the agent actually logged in? =3DStefan --=20 reuter network consulting Neusser Str. 110 50760 Koeln Germany Telefon: +49 221 1305699-0 Telefax: +49 221 1305699-90 E-Mail: ste...@re... Jabber: ste...@re... WWW: http://www.reucon.com Steuernummern 215/5140/1791 USt-IdNr. DE220701760 |
From: Thomas K. <tho...@ac...> - 2008-01-29 07:35:06
|
On Tuesday 29 January 2008 02:28:46 Stefan Reuter wrote: > Is the agent actually logged in? Yes, the agent is logged in. Thomas -- Thomas Kenner |