Call Center in Asterisk 1.8.15

Hi friends, I recently started to work in a new company and inherited an Asterisk Server running perfectly. My problem is that I need to set up a small Call Center (for 3 SIP extensions only) and I can’t make it. I’ve been reading a lot of tutorials found on the web but I just simply can’t do it. Can anybody help me please??
Any help would be very much appreciated. Thanks in advance.

BR.

It would be very hard to help without knowing which applications are available, if you’re using realtime (database) or config files, and is it for inbound or outbound calls.

If it’s inbound, then you’d probably set up a queue and log each extension in as an agent once they’re set up in the /etc/asterisk/sip.conf file (unless it’s realtime, then the database table could be any name…found in /etc/asterisk/extconfig.conf).

If it’s outbound only, then just add the extensions in the sip.conf (or realtime), and configure the phones. Make sure that they’re registered to a part of the dialplan (/etc/asterisk/extensions.conf) where they can dial out.

hi mkozusnik

first of all thank you very much for your answer!!

Regarding my problem I can tell you that my Asterisk is using config files and the call center is for inbound calls only.

I already tried to did what you recommended me about agents.conf, queues.conf and entensions.conf files and didn’ t work. Let me explain you more detailed what I need:

-I already set up 3 extensions in SIP.conf file (3195, 3196 and 3198). Those extensions works fine if I call them.
-I need that when an external caller dial an external number (wich I have in my E1 card) the call goes to the extensions I mentioned before like in a Call Center (I think that calls ACD)

If you like I can send you my .conf files

Thank you very much again!!

It might be easier if I look at the configs. Can you upload them somewhere and send the link, or would you rather email them?

I have a few questions:

  1. Will the agents be available all of the time, or will they need to log in and out of the queue?
  2. Should the queue ring every extension that’s not already on a call, or should it be a round-robin?
  3. Do you want a wrapup time built in? If they just took a call, give them 15-30 seconds before the next call will go to them.
  4. Is there are max number of callers you want in the queue? You would need to set an overflow extension or voicemail box.

For now, we won’t worry about announcements and can refine it later.

I think I rather send you the files by email, can you tell me where to??

about your questions:

  1. The agents will be available in shifts, so I think they sholud log in and log out
  2. The queue should ring in every extension that’s not in use
  3. I don’t want wrapup time
  4. I’m thinking in a max. of 10 calls in the queue

Thanks again!!

I sent you a message. It might take a few. I do most everything in the database, so I might have to look some stuff up again. :slight_smile:

I sent you the files already.

Thank you very much!!:+1:

OK, without trying the code myself, here are a few notes:

  1. Remove the period and space in the queue name. Spaces can mess up several things in all programming.

  2. I don’t see where anything is sending the calls to Queues,3197,1 (context,extension,priority). When a call comes in to this box, where is it sent? In that context, you would need a Goto. Something like the following:
    exten => XXXXXXXXXX,1,Goto(Queues,3197,1) ; Where XXXXXXXXXX is the inbound DID

  3. There’s no code to allow the queue members to log in.

  4. To ring every extension, you’ll need strategy=ringall. rrmemory is for round-robin.

  5. joinempty should probably be set to no. If it’s yes, callers will be placed in the queue even if no agents are logged in to answer.

  6. leavewhenempty should probably be changed to yes. If all of the agents log out while callers are in the queue, they will be stuck there.

  7. Since you’re not using static agents, you don’t need to have that in the agents.conf or queues.conf. They can log in and out by dialing.

What you’ll need is something like this. Let’s say the inbound DID is 800-555-1212.

extensions.conf - I’m not sure of your inbound context (where the PRI sends all inbound calls), so I’ll use “from-pstn”. I’m also not sure where your extensions are registered, so I’ll use “from-internal-sip”. You may eventually want to add some security to make them enter a code so only they can log in, but this should help get you started.

[from-internal-sip]
;Dial 28 to Log in using the current phone
exten => 28,AddQueueMember(CallQueue3197)
same => n,Hangup()
;Dial 29 to Log out using the current phone
exten => 29,RemoveQueueMember(CallQueue3197)
same => n,Hangup()

[from-pstn]
exten => 8005551212,1,Goto(Queues,3197,1)

;Always a good idea to add a hangup for invalid, timeout, or hangup calls.
exten    => i,1,Hangup()
exten    => t,1,Hangup()
exten    => h,1,Hangup()

[Queues]
exten => 3197,1,Answer() ; Not sure if this is necessary. Some apps will also answer the call.
same => n,Set(acount=${QUEUE_MEMBER(CallQueue3197,count)})
same => n,GoToIf($["${acount}" > "0"]?agentexists)
;In here, you could send the call to Voicemail or just hangup

same => n,Hangup()

same => n(agentexists),Queue(CallQueue3197)

exten    => i,1,Hangup()
exten    => t,1,Hangup()
exten    => h,1,Hangup()


queues.conf
[CallQueue3197]
musicclass=default 
strategy=ringall
joinempty=no
leavewhenempty=yes
ringinuse=no

Right now I´m out of the office but tomorrow morning as soon as I get there I´ll correct everything you suggest.
Thank you very much!!!
I hope tomorrow I can solve this problem with your very much appreciated help

BR.

Hi mkozusnik,

I trying to do what you suggested me but without any luck. I already modified the extensions.conf file. This the bottom’s file, please take a look:

Please note that in exten_aditional.conf file is my [from-pstn] context. What I don’t understand here is this part:

[from-internal-sip]
;Dial 28 to Log in using the current phone
exten => 28,AddQueueMember(CallQueue3197)
same => n,Hangup()
;Dial 29 to Log out using the current phone
exten => 29,RemoveQueueMember(CallQueue3197)
same => n,Hangup()

that’s for agent’s logging, right?? The extensions I’m going to use (3195,3196 and 3197 are registered en exten_callcenter.conf file. Do I need to define agents in the agents.conf file??

the thing is that when I dial the DID nothing happens, the call goes to nowhere. Here’s my queues.conf file (bottom):

Please no that I have there 1 agent define (100), is that correct??

Can you give me your opinion about all this??? Thank you very much in advance!!!

Can you send the output from the CLI when you make an inbound call?

$ asterisk -rvvvvvvvvvvvvvv

Yes, the Add and Remove Queue Memebers are for logging in and out, so you shouldn’t need to configure the agents separately.

here you go:

MFC/R2 call offered on chan 28. ANI = 6181340231, DNIS = 1370, Category = National Priority Subscriber
MFC/R2 call has been accepted on backward channel 28
– Executing [1370@bestel:1] Goto(“DAHDI/28-1”, “Queues,3197,1”) in new stack
– Goto (Queues,3197,1)
– Executing [3197@Queues:1] Answer(“DAHDI/28-1”, “”) in new stack
[Sep 29 14:46:32] WARNING[30906]: app_queue.c:6420 queue_function_qac: queue CallQueue3197 was not found
– Executing [3197@Queues:2] Set(“DAHDI/28-1”, “acount=0”) in new stack
– Executing [3197@Queues:3] GotoIf(“DAHDI/28-1”, “0?agentexists”) in new stack
– Executing [3197@Queues:4] Hangup(“DAHDI/28-1”, “”) in new stack
== Spawn extension (Queues, 3197, 4) exited non-zero on ‘DAHDI/28-1’
– Executing [h@Queues:1] Hangup(“DAHDI/28-1”, “”) in new stack
== Spawn extension (Queues, h, 1) exited non-zero on ‘DAHDI/28-1’
– Hungup ‘DAHDI/28-1’

I’m calling from a cel 6181340231. The cel stays in the call but nothing happens. I have to end the call manually

You’ll probably need to run:
module reload app_queue.so

Can you do a queue show?

asterisk-whconfig01*CLI> module reload app_queue.so
       
asterisk-whconfig01*CLI> queue show 
71003 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
   No Members
   No Callers

71002 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
   No Members
   No Callers

71001 has 0 calls (max 10) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
   No Members
   No Callers

71000 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
   No Members
   No Callers

71004 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
   No Members
   No Callers

aster*CLI> queue show
CallQueue3197 has 0 calls (max unlimited) in ‘ringall’ strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
No Members
No Callers

I forgot this is 1.8. The function might be different. Let me take a look at one of our 1.8 machines. One moment.

Thanks a lot my friend!!

Try changing:

same => n,Set(acount=${QUEUE_MEMBER(CallQueue3197,count)})

to

same => n,Set(acount=${QUEUE_MEMBER_COUNT(CallQueue3197)})

Don’t forget to “dialplan reload”.

And post the CLI output also. There are no agents logged in, so if the function works, it should just hang up.

it’s the same, no difference. The cel from I’m calling stays in silence. This is CLI output:

MFC/R2 call offered on chan 29. ANI = 6181340231, DNIS = 1370, Category = National Priority Subscriber
MFC/R2 call has been accepted on backward channel 29
– Executing [1370@bestel:1] Goto(“DAHDI/29-1”, “Queues,3197,1”) in new stack
– Goto (Queues,3197,1)
– Executing [3197@Queues:1] Answer(“DAHDI/29-1”, “”) in new stack
– Executing [3197@Queues:2] Set(“DAHDI/29-1”, “acount=0”) in new stack
– Executing [3197@Queues:3] GotoIf(“DAHDI/29-1”, “0?agentexists”) in new stack
– Executing [3197@Queues:4] Hangup(“DAHDI/29-1”, “”) in new stack
== Spawn extension (Queues, 3197, 4) exited non-zero on ‘DAHDI/29-1’
– Executing [h@Queues:1] Hangup(“DAHDI/29-1”, “”) in new stack
== Spawn extension (Queues, h, 1) exited non-zero on ‘DAHDI/29-1’
– Hungup ‘DAHDI/29-1’

When I dial that extension 3197 from any other internal extension works fine