Note |
---|
Applies to VoipNow 3.X.X! |
Short codes *96 and *98 allow you to log in and log out from all queues where your extension is an agent. With a only a couple of dialplan modifications, you can also log in and log out from a specific queue. Either way, you need some basic understanding of the Asterisk dialplan to perform the actions detailed in here.
Info |
---|
All changes described below are done in |
Step-by-step guide
Queue login
To log in to a specific queue, follow the steps below:
- Copy the
[from-internal]
macro from/etc/asterisk/extensions_main.conf
to/etc/asterisk/extensions_custom.conf
. Then delete the lines below:
Code Block exten => *96,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => *96,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => *96,3,Goto(app-queue,loginown,1)
And replace them with the following lines:
Code Block exten => *96,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => *96,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => *96,3,Set(EXT=all) exten => *96,4,Goto(app-queue,loginown,1) exten => _*96X!,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => _*96X!,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => _*96X!,3,Set(EXT=${EXTEN:3}) exten => _*96X!,4,Goto(app-queue,loginown,1)
Then copy the
[app-queue]
macro toextensions_custom.conf
.Delete the line below:
Code Block exten => loginown,21,Gosub(macro-agentmanag,s,1(login,${CALLERCHAN},all,${CALLERCHAN})) ; operation, agent, queue, interface
And replace it with the following line:
Code Block exten => loginown,21,Gosub(macro-agentmanag,s,1(login,${CALLERCHAN},${EXT},${CALLERCHAN})) ; operation, agent, queue, interface
Now you can log in strictly to queue 0003*001 by dialing *960003*001.
Queue logout
To log out from a specific queue, follow the steps below:
Delete the lines below from the
[from-internal]
macro inextensions_custom.conf
:Code Block exten => *98,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => *98,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => *98,3,Set(AGENTID=${CALLERCHAN}) exten => *98,4,Set(AGENTINTERFACE=) exten => *98,5,Goto(app-queue,logout,1)
And replace them with the following lines:
Code Block exten => *98,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => *98,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => *98,3,Set(AGENTID=${CALLERCHAN}) exten => *98,4,Set(AGENTINTERFACE=) exten => *98,5,Set(EXT=all) exten => *98,6,Goto(app-queue,logout,1) exten => _*93X!,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => _*93X!,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => _*93X!,3,Set(AGENTID=${CALLERCHAN}) exten => _*93X!,4,Set(AGENTINTERFACE=) exten => _*93X!,5,Set(EXT=${EXTEN:3}) exten => _*93X!,6,Goto(app-queue,logout,1)
Then in the
[app-queue]
maco delete the line below:Code Block exten => logout,3,Gosub(macro-agentmanag,s,1(logout,${AGENTID},all,${AGENTINTERFACE})) ; operation, agent, queue, interface
And replace it with the following line:
Code Block exten => logout,3,Gosub(macro-agentmanag,s,1(logout,${AGENTID},${EXT},${AGENTINTERFACE})) ; operation, agent, queue, interface
Now you can log out strictly from queue 0003*001 by dialing *930003*001.
Log in/Log out with short queue number
These macros can be further enhanced to allow login and logout with the short queue number. Once you do that, you will be able to log in queue 0003*001 by dialing *96001.
The exact macro customization may vary according to the extension format. However, these examples apply for the classic XXXX*YYY extension format (4 digit organization ID, * separator and 3 digit extension number).
To log in, from the macro [from-internal] remove the lines detailed above in the Queue login section and replace them with the ones below:
Code Block |
---|
exten => *96,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => *96,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => *96,3,Set(EXT=all) exten => *96,4,Goto(app-queue,loginown,1) exten => _*96X!,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => _*96X!,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => _*96X!,3,Set(EXT=${CALLERCHAN:0:4}*${EXTEN:3}) exten => _*96X!,4,Goto(app-queue,loginown,1) |
To log out, from the macro [from-internal] remove the lines detailed above in the Queue logout section and replace them with the ones below:
Code Block |
---|
exten => *98,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => *98,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => *98,3,Set(AGENTID=${CALLERCHAN}) exten => *98,4,Set(AGENTINTERFACE=) exten => *98,5,Set(EXT=all) exten => *98,6,Goto(app-queue,logout,1) exten => _*93X!,1,Set(CALLERCHAN=${SIP_HEADER(X-voipnow-user)}) exten => _*93X!,2,Set(LOCALTOLOCALOUT=${CALLERCHAN}) exten => _*93X!,3,Set(AGENTID=${CALLERCHAN}) exten => _*93X!,4,Set(AGENTINTERFACE=) exten => _*93X!,5,Set(EXT=${CALLERCHAN:0:4}*${EXTEN:3}) exten => _*93X!,6,Goto(app-queue,logout,1) |
The [app-queue] macro requires the same modifications described above for the full extension login/logout.
Related articles
Content by Label | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.