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.
- Go to "Modules" -> "Dialplan Applications"
Section "Dialplan applications"
- Create a new dialplan.
Creating a new dialplan
- Specify the name, as well as the dialplan number (in our case - 2200105). Specify "Dialplan Asterisk" as the code type
New Dialplan Settings
- 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()
Code for dialplan
- Go to the "System file customization" section
"System file customization' section
- Open the file "/etc/asterisk/extensions.conf" for editing
"extensions.conf" file
- Paste the following code at the end of the file:
[all_peers](+)
exten => *46,1,Goto(applications,2200105,1)
Code for extensions.conf