Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

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:

  1. Copy the [from-internal] macro from /etc/asterisk/extensions_main.conf to /etc/asterisk/extensions_custom.conf.  
  2. 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)
  3. 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)
  4. Then copy the [app-queue] macro to extensions_custom.conf

  5. Delete the line below:

    exten => loginown,21,Gosub(macro-agentmanag,s,1(login,${CALLERCHAN},all,${CALLERCHAN}))   ; operation, agent, queue, interface
  6. And replace it with the following line:

    exten => loginown,21,Gosub(macro-agentmanag,s,1(login,${CALLERCHAN},${EXT},${CALLERCHAN}))   ; operation, agent, queue, interface
  7. 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:

  1. 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)
  2. 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)
  3. 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
  4. And replace it with the following line:

    exten => logout,3,Gosub(macro-agentmanag,s,1(logout,${AGENTID},${EXT},${AGENTINTERFACE})) ; operation, agent, queue, interface
  5. 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.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.