[Asterisk-Users] (Un)PauseQeueMamber usage

Dov Bigio dovb at terra.com.br
Wed Feb 1 12:07:53 MST 2006


Hi BJ,

I am trying your example, but I am getting calls to 'h' logged on CDR.
If I put NoCDR() on the h extension, priority 1, CDR stores my calls, but
with zero billable length.

I am really confused with h extension, NoCDR and ForkCDR ;)

Thank you
Dov


----- Original Message ----- 
From: "BJ Weschke" <bweschke at gmail.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Saturday, January 28, 2006 10:59 AM
Subject: Re: [Asterisk-Users] (Un)PauseQeueMamber usage


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/
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users






More information about the asterisk-users mailing list