Trying to set some CDR fields in the "connected" macro of a queue command. None of the custom fields I set are stored in the database, but I can set "userfield" and it does get set. I think that the macro runs on the agent's channel, not the caller's, and this might contribute to the problem.

From the sample below "userfield" (and its alias operatorid) are saved in the CDR record, but salesqueue_answered is not.

What am I missing?

Asterisk 1.8.10.1~dfsg-1ubuntu1


  same =>n,Queue(sales,tc,,,,,QueueConnected)

[macro-QueueConnected]
; this runs on the agent/member's channel
exten =>s,1,NoOp()
  same =>n,Set(CDR(salesqueue_answered)=1)
same =>n,Set(OPERATORID=${ODBC_OPERATORID_FROM_ADDRESS(${MEMBERINTERFACE})}) ; userfield is mapped to operatorid in cdr_adaptive_odbc because setting operatorid directly doesn't work here
  same =>n,Set(CDR(userfield)=${OPERATORID})


--

Mitch


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

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

Reply via email to