How to log in to a specific queue ​
WARNING
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.
All changes described below are done in extensions_custom.conf. Never edit extensions_main.conf!
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:
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:
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 toÂextensions_custom.conf. - Delete the line below:
exten => loginown,21,Gosub(macro-agentmanag,s,1(login,${CALLERCHAN},all,${CALLERCHAN})) ; operation, agent, queue, interface- And replace it with the following line:
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 inÂextensions_custom.conf:
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:
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:
exten => logout,3,Gosub(macro-agentmanag,s,1(logout,${AGENTID},all,${AGENTINTERFACE})) ; operation, agent, queue, interface- And replace it with the following line:
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:
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:
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.