FreePBX | Register | Issues | Wiki | Portal | Support

Pause member in all queues after hanging up for 30 seconds (Not Wrapup time)


(Brandon Brown) #1

Is there a way using only the dial plan to automatically pause a member in all of their assigned queues for a fixed amount of time after hanging up a phone call and then unpause them? This is very similar to wrap up time, however wrap up time does not actually pause them and with the application I am building I need to be able to see the member paused when QueueMemberStatus is executed.


(Brandon Brown) #2

I figured it out. To anyone trying to accomplish the same thing this is the code I am using to do it.

$ext->add('macro-dialout-one-predial-hook', 's', '1', new \ext_noop('Entering user defined context macro-dialout-one-predial-hook in extensions_custom.conf'));
$ext->add('macro-dialout-one-predial-hook', 's', '', new \ext_setvar('CHANNEL(hangup_handler_push)','testing-hangup,s,1'));
$ext->add('testing-hangup', 's', '', new \ext_setvar('MemberChannel','Local/${CHANNEL(peername)}@from-queue/n'));
$ext->add('testing-hangup', 's', '', new \extension('PauseQueueMember(,${MemberChannel})'));
$ext->add('testing-hangup', 's', '', new \ext_system('sleep 5'));
$ext->add('testing-hangup', 's', '', new \extension('UnPauseQueueMember(,${MemberChannel})'));
$ext->add('testing-hangup', 's', '', new \ext_return());

(system) closed #3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.