[asterisk-users] Set CDR userfield for Queues

William Stillwell (Lists) william.stillwell-lists at ablebody.net
Sun Jan 24 11:44:32 CST 2010


Yeah, after hours of trying Friday, I got working by a macro.. I didn't like
the outcome using a context, the macro cdr records looked cleaner.


[macro-queue]

exten => s,1,Answer()
exten => s,n,Queue(${ARG1}|rn)
exten => s,n,Set(MEMBERINTERFACE='NOANSWER')
exten => s,n,VoiceMail(${ARG1},u)
exten => s,n,Hangup()
exten => h,1,Set(CDR(userfield)=${MEMBERINTERFACE})


Which is called from:

exten => _?????,1,Macro(queue,${EXTEN})




-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Deep D
Sent: Friday, January 22, 2010 11:28 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Set CDR userfield for Queues

I just added a line with 'h'extension.

My dialplan is like this

[mycontext]
exten => s,1,Queue(6000)

exten => h,1,Set(CDR(userfield)=${MEMBERINTERFACE})

On Sat, Jan 23, 2010 at 12:14 AM, William Stillwell (Lists)
<william.stillwell-lists at ablebody.net> wrote:
> "setinterfacevar=yes"
>
> Needs to be under each queue
>
> What does your dialplan end up looking like?
>
> I would like to add to mine, and stop running a cron job..
>
> exten => 5000,1,Answer
> exten => 5000,n,Queue(5000|rn)
> exten => 5000,n,VoiceMail(5000,u)
> exten => 5000,n,Hangup
>
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Deep D
> Sent: Friday, January 22, 2010 1:15 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Set CDR userfield for Queues
>
> The 'h' extension worked. Thanks.
>
> The other option of 'memebermacro' did not work.  On the asterisk
> console I could see that the macro is executed and cdr userfield is
> set when agent answers the call, but the userfield doesn't show up in
> the generated cdr.
>
> Also I had one more question. Doesn't "setinterfacevar=yes" work when
> it is declared in the general section? I had to declare it for each
> queues.
>
>
>
> On Fri, Jan 22, 2010 at 10:37 PM, Carlos Chavez <cursor at telecomabmex.com>
> wrote:
>> On Fri, 2010-01-22 at 20:25 +0530, Deep D wrote:
>>> I want to do something like this
>>> exten = 1234,n,Queue(6000,c)
>>> exten = 1234,n,Set(CDR(userfield)=${Agent})   ;; where Agent is the
>>> agent who answered the call
>>> exten = 1234,n,Hangup
>>>
>>        Actually because the user will hangup within the Queue application
> you
>> cannot do that.  You will have to use the h extension to make the change
>> to the userfield.  Something like this:
>>
>> h,1,Set(CDR(userfield)=${MEMBERINTERFACE})
>>
>>        Make sure you have setinterfacevar=yes in your queue.conf so that
>> variable is created when the user is connected to the agent.  Another
>> possibility is to run a macro by using "membermacro=somemacro" and set
>> the userfield within that macro.  I think that option is only available
>> on Asterisk 1.6.X and not for older ones though.  You can also run an
>> AGI script (you can set it as an option in the Queue commando) that will
>> set the userfield as this AGI is run just before the call is bridged to
>> the agent but the ${MEMBERINTERFACE} is already set.
>>
>>
>> --
>> Telecomunicaciones Abiertas de México S.A. de C.V.
>> Carlos Chávez Prats
>> Director de Tecnología
>> +52-55-91169161 ext 2001
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.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