Well that makes sense....<br><br>Is there anyway to determine the user's state ([un]paused) in the dial plan prior to using the [Un]PauseQueueMember() app? <br><br>I'd like to be able to keep it very simple for my users by instructing them to dial one key code to pause or unpause.<br>
<br clear="all">v/r,<br>Me<br><br>
<br><br><div class="gmail_quote">On Thu, May 5, 2011 at 6:04 PM, Warren Selby <span dir="ltr"><<a href="mailto:wcselby@selbytech.com">wcselby@selbytech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
PQMSTATUS is set only after you run the application PauseQueueMember().<br>
<br>
Thanks,<br>
--Warren Selby, dCAP<br>
<div><div></div><div class="h5"><br>
On May 5, 2011, at 2:11 PM, Louis Carreiro <<a href="mailto:carreirolt@gmail.com">carreirolt@gmail.com</a>> wrote:<br>
<br>
> Hey all!<br>
><br>
> I'm trying to do a bit of logic here so that a user only has to dial one code to pause/unpause in a queue (e.g. *0 will (un)pause depending on the users's state). My logic looks fine to me but every time ${PQMSTATUS} shows up empty.<br>
><br>
> Here's the extensions.conf part....<br>
><br>
> exten => *0,1,NoOp(${PQMSTATUS})<br>
> exten => *0,n,Macro(user-callerid,SKIPTTL,)<br>
> exten => *0,n,Set(CALLBACKNUM=${IF($[${LEN(${AMPUSER})}=0]?${CALLERID(number)}:${AMPUSER})})<br>
> exten => *0,n,GotoIf($["${PQMSTATUS}" = "PAUSED"]?unpause,1:pause,1)<br>
><br>
> ; Pause ourselves in one or more queues<br>
> exten => pause,1,NoOp()<br>
> exten => pause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-queue/n)<br>
> exten => pause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-internal/n)<br>
> exten => pause,n,GoSub(changePauseStatus,start,1(PQMSTATUS,PAUSED,unavailable))<br>
> exten => pause,n,Hangup()<br>
><br>
> ; Unpause ourselves from one or more queues<br>
> exten => unpause,1,NoOp()<br>
> exten => unpause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-queue/n)<br>
> exten => unpause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-internal/n)<br>
> ; that queue, otherwise, we'll unpause in<br>
> ; in all queues<br>
> exten => unpause,n,GoSub(changePauseStatus,start,1(UPQMSTATUS,UNPAUSED,available)) ; use the changePauseStatus subroutine and<br>
> ; pass the values for: variable to check,<br>
> ; value to check for, and file to play<br>
> exten => unpause,n,Hangup()<br>
><br>
> ; ### Subroutine we use to check pausing and unpausing status ###<br>
> [changePauseStatus]<br>
> ; ARG1: variable name to check, such as PQMSTATUS and UPQMSTATUS (PauseQueueMemberStatus / UnpauseQueueMemberStatus)<br>
> ; ARG2: value to check for, such as PAUSED or UNPAUSED<br>
> ; ARG3: file to play back if our variable value matched the value to check for<br>
> ;<br>
> exten => start,1,NoOp()<br>
> exten => start,n,Playback(silence/1)<br>
> ; Please note that ${ARG1} is wrapped in ${ } in order to expand the value of ${ARG1} into<br>
> ; the variable we want to retrieve the value from, i.e. ${${ARG1}} turns into ${PQMSTATUS}<br>
> exten => start,n,Playback(${IF($["${${ARG1}}" = "${ARG2}"]?${ARG3}:not-yet-connected)})<br>
> ;exten => start,n,GotoIf($[${ISNULL(${xtn})}]?end) ; if ${xtn} is null, then just Return()<br>
> exten => start,n,Playback(in-the-queue) ; if not null, then playback "in the queue"<br>
> ;exten => start,n,SayNumber(${xtn}) ; and the queue number that we (un)paused from<br>
> exten => start,n(end),Return() ; return from were we came<br>
><br>
><br>
> v/r,<br>
> Me<br>
><br>
</div></div>> --<br>
> _____________________________________________________________________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br>