[Asterisk-Users] (Un)PauseQeueMamber usage
BJ Weschke
bweschke at gmail.com
Sat Jan 28 05:59:49 MST 2006
On 1/28/06, Joe <jrothstein at comcentrixs.com> wrote:
> Does anyone have an example of hoe to use these two commands? I have read he
> documentation, and I am still unclear on where this command goes, as part of
> extensions.conf or where?
>
> If someone could post a working example it would be most helpful.
>
Here's how I've done it before for other clients:
On the dialout portion I've changed the dial plan to:
exten => _1NXXNXXXXXX,1,GotoIf($[${LEN(${$[AGENTBYCALLERID_${CALLERID(num)}]})}
> 2]?2:3)
exten => _1NXXNXXXXXX,2,PauseQueueMember(|Agent/${$[AGENTBYCALLERID_${CALLERID(num)}]})
exten => _1NXXNXXXXXX,3,Dial(SIP/<SIP PEER>/${EXTEN},,Tg)
exten => _1NXXNXXXXXX,4,ForkCDR()
What that's basically saying is that if the calling number is also
logged in as an agent, go ahead and pause that queue member in all
queues that they belong to and then make the call. I'm doing the
GotoIf because there are other extensions in that same context that
may not be logged in as agents and I don't want to make that pqm call
(though there's no real harm in doing so, it'll just tell you there's
no Interface as specified) with.
Then, in that same context, you put the following in the h extension....
exten => h,1,ForkCDR()
exten => h,2,GotoIf($[${LEN(${$[AGENTBYCALLERID_${CALLERID(num)}]})} > 2]?3:4)
exten => h,3,UnPauseQueueMember(|Agent/${$[AGENTBYCALLERID_${CALLERID(num)}]})
exten => h,4,NoOp("Done!")
ForkCDR is important because if you don't do it you're going to find
that the original CDR that used to contain the destination number in
it, now contains only the 'h' extension in it. You could also use
ResetCDR(w) here. Your choice really. ForkCDR will fork the one CDR
into two preserving the original dial information, and then you may
choose to do a NoCDR() or just deal with the additional CDR generated
to the 'h' extension by ignoring it when you parse CDRs.
Hope this helps.
--
Bird's The Word Technologies, Inc.
http://www.btwtech.com/
More information about the asterisk-users
mailing list