Impossible to set cdr userfiled after queue() command?


I want to set the CDR userfield AFTER the call has been picked up by an agent of the queue.

I tried the following:
exten = s,1,Queue(callcenter,r)
exten = s,n,Set(CDR(userfield)=${VAR})
exten = s,n,Hangup()
but $VAR is not written in the userfield

In the other hand, if I set $VAR before ringing the queue, the following is working fine :
exten = s,n,Set(CDR(userfield)=${VAR})
exten = s,1,Queue(callcenter,r)
exten = s,n,Hangup()

the problem is that $VAR is set when an agent has picked up the call so I can’t set the userfield before the Queue command

any idea ?

What is in ${VAR}? Is it the agent or something that is known at the initial connection? If so, you can probably use an AGI in the Queue command to set the variable. We use the AGI option of the queue commands for screen pops to specific agents. (See the setinterfacevar variable in queues.conf if that is what you are looking for)

ok thanks

I’ll have a look to it

I’m running Asterisk 1.2 and the setinterfacevar variable is not available…
I saw on the net that there is an AGI parameter in the Queue() command but it looks like it’s only available for asterisk 1.4…