Pause for Queue agent

For the case when an employee has moved away and cannot answer a call, it is convenient to put the agent on pause. For example, an employee dials a special extension number *46 and leaves for lunch.

New calls to the employee will stop coming.

When the employee returns, he dials *46 again and disables the pause. In modern phones, everything can be reduced to pressing a single button.

  1. Go to "Modules" -> "Dialplan Applications"

  1. Create a new dialplan.

  1. Specify the name, as well as the dialplan number (in our case - 2200105). Specify "Dialplan Asterisk" as the code type

  1. Go to the "Programme Code" tab. Paste the following code into the black area:

1,Answer()
n,Set(PeerNumber=${CHANNEL(endpoint)})
n,Set(MemberStatus=${DB(QueueMemberOnPause/${PeerNumber}})
n,Set(AppName=${IF($[ "${MemberStatus}" != "1" ]?PauseQueueMember:UnpauseQueueMember)})
n,Set(NewMemberStatus=${IF($[ "${MemberStatus}" == "1" ]?0:1)})
n,Exec(${AppName}(,Local/${PeerNumber}@internal/n))
n,Set(DB(QueueMemberOnPause/${PeerNumber})=${NewMemberStatus})
n,Playback(beep)
n,Hangup()
  1. Go to the "System file customization" section

  1. Open the file "/etc/asterisk/extensions.conf" for editing

  1. Paste the following code at the end of the file:

[all_peers](+)
exten => *46,1,Goto(applications,,1)

Last updated