Semaphor blog
Blog: Semaphor

Tips about external agents attending a queue in freepbx

In many companies, there is a times where people are on the go, and therefore needs to take incomming calls on their cellphones.

That is quite easy with the follow-me functionality in Freepbx.
But what if someone want to log in a cellphone?
And how can you enforce that there at all times is at least one "agent" to attend a queue?
With this snippit, you can make two extensions that can be integrated into an IVR or called directly from internal. It checks if the person that tries to log off is the last one and plays a promt denying the logoff until another agent has logged in.

;Supportnumber log in og out
exten => 8000,1,wait(1)
same => n,Log(Info,${CALLERID(num)} logged in)
same => n,AddQueueMember(700,Local/${CALLERID(num)}@from-internal)
same => n,Playback(agent-loginok)
same => n,Hangup()

exten => 8001,1,wait(1)
same => n,Set(ACOUNT=${QUEUE_MEMBER(700,count)})
same => n,GoToIf($["${ACOUNT}"="1"]?few:eno)
same => n(few),Playback(yourthelast)
same => n,Log(Warning,${CALLERID(num)} tries to log off, but is the only one left)
same => n,Hangup()
same => n(eno),RemoveQueueMember(700,Local/${CALLERID(num)}@from-internal)
same => n,Playback(agent-loggedoff)
same => n,Log(Info,${CALLERID(num)} logged off)
same => n,Hangup()

29-01-2014 10:34


Add comment

It may take a moment until your comment is published.