Agent logon and logoff in 1.8

Hello all,

Sorry if this is already answered, but I did search both the forum and google. Maybe I just can’t make the best search phrase.

I need to implement simple agent logon and logoff on Asterisk 1.8.7, running on CentOS 5.5 if that matters.

From what I could read so far, AgentCallBackLogin is deprecated and AgentLogin has to be used. But I don’t know how and don’t have the Asterisk experience to figure it out. Also, the system has FreePBX 2.9 installed but since FreePBX doesn’t handle agents I think this is only Asterisk question (correct me if I’m wrong).

Comparing from an older system with Asterisk 1.2, I have created the following in extensions_custom.conf (since you don’t edit extensions.conf directly when FreePBX is involved):
[from-internal-custom]
exten => 200,1,Answer
exten => 200,2,AgentLogin()
exten => 200,3,Hangup()

That worked sort of, allowing me to hear the agent login message when dialing 200 and logging in the agent after entering the agent number followed by # (there are no agent passwords set).

But if you hang up the call, it logs off.

What I need is:

  1. Agent picks up the phone, dials 200 and listens to the agent message.
  2. Enters the agent number,# and listens to a message asking about the extension (which doesn’t happen in the above scenario).
  3. After entering the extension,# it gets “permanently” logged in on that extension even after he hangs up.
  4. He stays logged in until he logs off by doing the same procedure as above only without entering any extension number (agent number,#,#).

This is how it works on the old system I am trying to replace. I know things have changed in 1.8, so I am asking if there is anything simple and very similar or even better identical to the above. If it can be done, how?

I am good with linux CLI but a real beginner in Asterisk, so I prefer a simple solution that works. I don’t need anything fancy, just something that would log an agent, keep him logged in after hanging up the call he used to log in, and log him off on demand.

Sorry for the long post, I wanted to give as much information in advance. Thanks for any advice and help.
Darko.

The way that I do that is with an agi script, in the script you ask for the agent’s number and the agent’s password then lookup on the DB if matches I use the commands AddQueueMember or RemoveQueueMember in order to login or logoff from all queues.

Thanks for the reply. But as I said my knowledge of Asterisk is extremely limited and I would need more detailed example(s).
When you say that agent number/password are looked up in the DB, do you mean the agents.conf file? Because that’s where I have them set up.

I looked at AddQueueMember on voip-info.org but they also don’t have examples, only the syntax of the command. I’ll keep searching for examples when I have more time later on.
If I understood it correctly, you will have to pass the agent number somehow to AddQueueMember but I guess the agi script does that.

[quote]When you say that agent number/password are looked up in the DB, do you mean the agents.conf file? [/quote]No, I mean Mysql DB, i use static realtime so I search the agents in the DB.

Instead looking at voip-info you should look at this chapter of the book.

Thanks for the link, I looked into it and it looks promising.

One thing I didn’t notice, is an example for all members/agents to ring at the same time, not just the Round Robin mentioned in that example. We currently have it like that, all ring until one picks up the call.

And when the Round Robin is used, how does it work precisely, does it ring for 5sec for example and then begins ringing on the next member, or it rings all the time on the same member even if the person never picks up? And can you control the period that it will ring before jumping to the next member?

Well I will return you to VoIP-Info to this link you can check the Strategy and Timeout section for your responses.