Hmmm.... I&#39;ll have to check that out tomorrow AM. So you&#39;re calling PauseQueueMember() to actually pause the user first? Something like PauseQueueMember(,${EXTEN})?<br><br>If the PQMSTATUS is &quot;Success&quot; instead of &quot;Already Paused&quot;, wouldn&#39;t it always respond with &quot;Success&quot; therefore not allowing the logic to continue?<br clear="all">

v/r,<br>Me<br><br>
<br><br><div class="gmail_quote">On Thu, May 5, 2011 at 7:26 PM, Warren Selby <span dir="ltr">&lt;<a href="mailto:wcselby@selbytech.com">wcselby@selbytech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div bgcolor="#FFFFFF"><div><div>There may be a more elegant way to do it, but what I do is simply call PauseQueueMember() first, then check the result of PQMSTATUS. I forget the exact results but I think it&#39;s either &#39;Success&#39; or &#39;Already Paused&#39;, and then I base my next step in logic based on that result. <br>

<br>Thanks,<div>--Warren Selby, dCAP</div></div><div><div></div><div class="h5"><div><br>On May 5, 2011, at 6:15 PM, Louis Carreiro &lt;<a href="mailto:carreirolt@gmail.com" target="_blank"></a><a href="mailto:carreirolt@gmail.com" target="_blank">carreirolt@gmail.com</a>&gt; wrote:<br>

<br></div><div></div><blockquote type="cite"><div>Well that makes sense....<br><br>Is there anyway to determine the user&#39;s state ([un]paused) in the dial plan prior to using the [Un]PauseQueueMember() app? <br><br>I&#39;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">&lt;<a href="mailto:wcselby@selbytech.com" target="_blank"></a><a href="mailto:wcselby@selbytech.com" target="_blank"></a><a href="mailto:wcselby@selbytech.com" target="_blank">wcselby@selbytech.com</a>&gt;</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><br>
On May 5, 2011, at 2:11 PM, Louis Carreiro &lt;<a href="mailto:carreirolt@gmail.com" target="_blank"></a><a href="mailto:carreirolt@gmail.com" target="_blank"></a><a href="mailto:carreirolt@gmail.com" target="_blank">carreirolt@gmail.com</a>&gt; wrote:<br>


<br>
&gt; Hey all!<br>
&gt;<br>
&gt; I&#39;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&#39;s state). My logic looks fine to me but every time ${PQMSTATUS} shows up empty.<br>




&gt;<br>
&gt; Here&#39;s the extensions.conf part....<br>
&gt;<br>
&gt; exten =&gt; *0,1,NoOp(${PQMSTATUS})<br>
&gt; exten =&gt; *0,n,Macro(user-callerid,SKIPTTL,)<br>
&gt; exten =&gt; *0,n,Set(CALLBACKNUM=${IF($[${LEN(${AMPUSER})}=0]?${CALLERID(number)}:${AMPUSER})})<br>
&gt; exten =&gt; *0,n,GotoIf($[&quot;${PQMSTATUS}&quot; = &quot;PAUSED&quot;]?unpause,1:pause,1)<br>
&gt;<br>
&gt; ; Pause ourselves in one or more queues<br>
&gt; exten =&gt; pause,1,NoOp()<br>
&gt; exten =&gt; pause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-queue/n)<br>
&gt; exten =&gt; pause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-internal/n)<br>
&gt; exten =&gt; pause,n,GoSub(changePauseStatus,start,1(PQMSTATUS,PAUSED,unavailable))<br>
&gt; exten =&gt; pause,n,Hangup()<br>
&gt;<br>
&gt; ; Unpause ourselves from one or more queues<br>
&gt; exten =&gt; unpause,1,NoOp()<br>
&gt; exten =&gt; unpause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-queue/n)<br>
&gt; exten =&gt; unpause,n,PauseQueueMember(,Local/${CALLBACKNUM}@from-internal/n)<br>
&gt;                                                                                                 ;   that queue, otherwise, we&#39;ll unpause in<br>
&gt;                                                                                                 ;   in all queues<br>
&gt; exten =&gt; unpause,n,GoSub(changePauseStatus,start,1(UPQMSTATUS,UNPAUSED,available))              ; use the changePauseStatus subroutine and<br>
&gt;                                                                                                 ;   pass the values for: variable to check,<br>
&gt;                                                                                                 ;   value to check for, and file to play<br>
&gt; exten =&gt; unpause,n,Hangup()<br>
&gt;<br>
&gt; ; ### Subroutine we use to check pausing and unpausing status ###<br>
&gt; [changePauseStatus]<br>
&gt; ; ARG1:  variable name to check, such as PQMSTATUS and UPQMSTATUS (PauseQueueMemberStatus / UnpauseQueueMemberStatus)<br>
&gt; ; ARG2:  value to check for, such as PAUSED or UNPAUSED<br>
&gt; ; ARG3:  file to play back if our variable value matched the value to check for<br>
&gt; ;<br>
&gt; exten =&gt; start,1,NoOp()<br>
&gt; exten =&gt; start,n,Playback(silence/1)<br>
&gt; ; Please note that ${ARG1} is wrapped in ${  } in order to expand the value of ${ARG1} into<br>
&gt; ;   the variable we want to retrieve the value from, i.e. ${${ARG1}} turns into ${PQMSTATUS}<br>
&gt; exten =&gt; start,n,Playback(${IF($[&quot;${${ARG1}}&quot; = &quot;${ARG2}&quot;]?${ARG3}:not-yet-connected)})<br>
&gt; ;exten =&gt; start,n,GotoIf($[${ISNULL(${xtn})}]?end)       ; if ${xtn} is null, then just Return()<br>
&gt; exten =&gt; start,n,Playback(in-the-queue)                 ;   if not null, then playback &quot;in the queue&quot;<br>
&gt; ;exten =&gt; start,n,SayNumber(${xtn})                      ;   and the queue number that we (un)paused from<br>
&gt; exten =&gt; start,n(end),Return()                          ; return from were we came<br>
&gt;<br>
&gt;<br>
&gt; v/r,<br>
&gt; Me<br>
&gt;<br>
</div></div>&gt; --<br>
&gt; _____________________________________________________________________<br>
&gt; -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank"></a><a href="http://www.api-digital.com" target="_blank"></a><a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>


&gt; New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
&gt;               <a href="http://www.asterisk.org/hello" target="_blank"></a><a href="http://www.asterisk.org/hello" target="_blank"></a><a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>


&gt;<br>
&gt; asterisk-users mailing list<br>
&gt; To UNSUBSCRIBE or update options visit:<br>
&gt;   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"></a><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"></a><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"></a><a href="http://www.api-digital.com" target="_blank"></a><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"></a><a href="http://www.asterisk.org/hello" target="_blank"></a><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"></a><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"></a><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>
</div></blockquote><blockquote type="cite"><div><span>--</span><br><span>_____________________________________________________________________</span><br><span>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank"></a><a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --</span><br>

<span>New to Asterisk? Join us for a live introductory webinar every Thurs:</span><br><span>               <a href="http://www.asterisk.org/hello" target="_blank"></a><a href="http://www.asterisk.org/hello" target="_blank"></a><a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a></span><br>

<span></span><br><span>asterisk-users mailing list</span><br><span>To UNSUBSCRIBE or update options visit:</span><br><span>   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"></a><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"></a><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></span></div>

</blockquote></div></div></div><div></div></div><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>