Broadcast messages with Elastix’s Call Center Module
Hi people, this is my first appearence at this blog, by way of a small introduction my name is Juan Pablo Bustos and I’m writing from Mendoza – Argentina, I’m a Systems Analyst and also I have my ECT Certification.
I’ve been talking with Rafael about publishing this method, and he suggested to share it in the Elastix Blog, so that’s why I’ve have published it, so we can polish it and see a way to implement it on a larger scale.
The objective of this implementation is to use Elastix’s dialer to call a list of customers to deliver a message and to be able to still use the Call Center with “real” agents. I have also added a little PHP script that logs the customer’s answer (number dialed) after the call is completed.
To get this to work, we need to create:
- Some “virtual agents” that are created in the same way as the “real” agents in the Call Center’s GUI.
- A Custom Context to log them in with the command AgentCallbackLogin (sadly deprecated in Asterisk 1.6 , but able to be worked around).
- Another Custom Context to log them (for debugging purposes, but useful sometimes).
- A Custom Context to redirect the calls to a final custom context that will handle the calls.
It seems a little tricky, but with a few Custom Contexts you’ll be able to use a feature that is requested very often.
Now the question is, why “virtual” agents ? The answer is pretty simple, I needed to keep Call Center’s original functionality.
As you may noticed the way that Elastix’s dialer, before dialing, polls for the available agents, that’s why we are using AgentCallbackLogin, and to make it call.
So the overview of the process will be something like this:
1) We create the agent with the Call Center’s GUI.
2) We delete the password of the agent at the file
In etc/asterisk/agents.conf , it will be something like this:
Agent prototype: agent => [Agent ID],[password],[Agent’s Name]
[agents]
Agent => 1001,,Virtual 1
Agent => 1002,,Virtual 2
Agent => 1003,,Virtual 3
Agent => 1004,,Virtual 4
3) We create a Custom Context to login our virtual agent at extensions_custom.conf:
The prototype for AgentCallbackLogin is this:
AgentCallbackLogin([AgentNo][|Options[|exten[@context]]])
[login-agents]
exten => 1111,1,Answer
exten => 1111,n,NoOp(Logging Agents)
exten => 1111,n,AgentCallbackLogin(1001,s,501 at from-internal)
exten => 1111,n,AgentCallbackLogin(1002,s,502 at from-internal)
exten => 1111,n,AgentCallbackLogin(1003,s,503 at from-internal)
exten => 1111,n,AgentCallbackLogin(1004,s,504 at from-internal)
exten => 1111,n,NoOp(All Logged)
exten => 1111,n,Hangup()
4) We create a “Catch” extension to pick up all the calls directed to our virtual agents:
[catchcalls]
exten => 501,1, Goto(amessage,s,1)
exten => 502,1, Goto(amessage,s,1)
exten => 503,1, Goto(amessage,s,1)
exten => 504,1, Goto(amessage,s,1)
5) Finally we create the Custom Context to deliver the message:
[amessage]
exten => s,1,Answer
exten => s,2,Wait,2
exten => s,n,Read(tmp,custom/message1,1||1|5)
exten => s,n,Set(RESP=${tmp})
exten => s,n,Playback(thank-you-cooperation)
exten => s,n,Hangup()
exten => h,1,DeadAGI(llamadas.php,${RESP})
As you may notice if you want to store the answer in the case of a poll or similar, you can store the answer using the command read instead of playback, and once the call is finished call a script to handle the answer.
6) Create a queue where you’ll put your virtual agents.
7) Create an outgoing campaign and start burning minutes!
For this implementation I used Elastix 1.5.2 and Call Center 1.5 with 50 virtual agents and it works like a charm.
I hope you weren’t bored if this mini guide is kind of basic or by my English.
Thanks for reading it and I hope It’ll be useful
Tags: Agents, Asterisk, automated message, broadcast, Call Center, campaign, Dialer, Elastix, message

January 28th, 2010 at 8:51 pm
Juan Pablo, genial explicacion muy sencilla y aunque no he probado de seguro funcionara, el asunto es que mencionas un script en php (llamadas.php), pero no lo anexas.
January 29th, 2010 at 11:54 am
Estimado van,
Tal como menciono en el artículo se trata de una opción, si lo que necesitás es simplemente reproducir un mensaje, el contexto quedaría así:
[amessage]
exten => s,1,Answer
exten => s,2,Wait,2
exten => s,n,Playback(custom/message)
exten => s,n,Hangup()
En el caso del script es un script generico en php.
Saludos
January 29th, 2010 at 10:39 pm
muchas gracias por la aclaracion.
January 31st, 2010 at 8:47 am
[...] This post was mentioned on Twitter by rbonifaz, elastix, 咻~咻~我是风, asteriskbot, asteriskbot and others. asteriskbot said: @rbonifaz: ♺ @elastix: Broadcast messages with !Elastix’s Call Center Module http://ur1.ca/l025 #voip #asterisk [...]
February 4th, 2010 at 2:32 pm
Thanks for the great blog. Very useful
Have you had an issue with the retries, when I set this up it doesn’t recognize that the calls have been answered so it retries.
February 4th, 2010 at 10:24 pm
Hi,
You need to set the Short Call Threshold (at call center’s preferences) to a value that fit your needs, by default it’s 10 seconds, if your message is shorter than that, the dialer will think the call was to short, so it’ll call the same number again.
On the other hand, you can se to 0 the number of retries when you create the outgoing campaign.
Regards
February 5th, 2010 at 5:46 pm
This is a nice tutorial…
March 5th, 2010 at 5:22 pm
Juan Pablo
Is there a way to get the calls to show up in the Call Center Reports
Or record the calls
Thanks Danny
March 8th, 2010 at 11:05 pm
6string,
As you may notice at the end of this script you can find this line:
exten => h,1,DeadAGI(llamadas.php,${RESP})
That’s and example to use a php script who can save the numbers at a database, in my case, I made a script that saves the called number, and the option chosen, and also, I made another script to display saved data.
Regards