Asterisk and XMPP AstriCon Talk

In the last thursday I presented my talk “Using Asterisk and XMPP to provide greater tools to your customers and your users” on AstriCon 2016.

It was a great experience, and, as I promised during the talk, this page contains all resources (dialplans and links) of my demonstrations.

First, I’d like to share the link of Slideshare, where I published the presentation’s slides. Feel free to download and use it as you want (just maintain the credits, please 🙂 ).

Well, now let’s start talking about the earlier caller identification.

The first example that I showed was a basic earlier caller identification that can be done since Asterisk 1.4:

exten => 1000,1,NoOp(Earlier callerd identification - send message to JID)

; You can use an AGI to obtain the caller id name (from a database, for example)
; and then set it in the CALLERID(name) variable
same => n,agi(getCallerIdName.agi)

; The next AGI gets the JID (jabber identification) associated with the extension
; and then set it in the XMPP_DST variable
same => n,agi(getJID.agi)
same => n,JabberSend(${XMPP_RESOURCE},${XMPP_DST},Call from ${CALLERID(all)})
same => n,Answer()
same => n,Wait(1)
same => n,Playback(thanks_for_call)
same => n,Dial(SIP/1000,10) ; You need to adapt the Dial to your own scenario
same => n,Hangup

As you can see, I’m using two variables in this example: ${XMPP_RESOURCE} is the name of the resource associated with your Asterisk in xmpp.conf file. The ${XMPP_DST} is the JID (jabber identification) of the XMPP user that must be linked with the SIP extension. You can do that creating a new column in you sip peers table.

I’ll not publish the AGI files here because they are specific for each scenario.

The next example is another earlier caller identification but now it sends the identification to a chat room (MUC) and it’ll requires Asterisk 1.8, at least:

exten => 2000,1,NoOp(Earlier callerd identification - send message to MUC)

; You can use AGI to obtain the caller id name (from a database, for example)
; and then set it in the CALLERID(name) variable
same => n,agi(getCallerIdName.agi)

same => n,JabberJoin(${XMPP_RESOURCE},${XMPP_CHATROOM},Asterisk)
same => n,JabberSendGroup(${XMPP_RESOURCE},${XMPP_CHATROOM},Call from ${CALLERID(all)},Asterisk)

same => n,Answer()
same => n,Wait(1)
same => n,Playback(thanks_for_call)
same => n,Dial(SIP/2000,10) ; You need to adapt the Dial to your own scenario
same => n,Hangup

It’s a similar dialplan, but now you don’t need to get the JID of the user, because you’ll send the message to a chat room. But, you need to identify the JID of the chat room, that is represented in the dialplan as the ${XMPP_CHATROOM} variable. It’ll be something like myroom@conference.yourdomain.com.

Ok, let’s make it a little more advanced. We’ll use an IVR and send the message just to the logged agents of a queue.

exten => 3000,1,NoOp(IVR PoC Support - first example)
same => n,Set(IVR=example1)
same => n,goto(myivr,ivr,1)

Of course there is more than this 3 lines, and now I’m using AEL to control my IVR. To make the post more “readable”, this is the link of the AEL file.

Don’t forget to add the following line in your extensions.ael file:

#include "/etc/asterisk/extensions_ivr_astricon2016.ael"

Again, I’ll not publish all the AGIs because they are to my scenario, but they are simple queries in your database.

The last dialplan, is basically the same used before, but it changes the value of IVR, and, in AEL a new AGI is called, the one that gets the 5 last tickets from your customer queue in Request Tracker.

exten => 4000,1,NoOp(IVR PoC Support - second example using RT)
same => n,Set(IVR=example2)
same => n,goto(myivr,ivr,1)

This are the demonstrations that shows how to use earlier caller identification to provide your agents and users with valuable informations and some precious time. Using this approach your agents can prepare themselves to talk with yours customers, and consequently, your customers will have a better and efficient experience.

PoCs

The PoCs presented in the talk have specific pages:

If you have any doubts, or just want to talk about new ideas, you can contact me directly using the information in the slides of presentation.

See you!

Animated Social Media Icons by Acurax Responsive Web Designing Company
Visit Us On FacebookVisit Us On TwitterCheck Our FeedVisit Us On Linkedin