Track unanswered calls. userfield is empty

Hi,

I am trying a simple thing, I want to be able to track all attempts made for an order.
I want to record on the cdr also the unanswered calls with some userfield and I use asynchronous(true).
I use an ivr to place calls with the originateAction class, hence I need to store the destination somewhere
since the dest is always the same.

When the call is answered the script stores into the db the userfield succesfully
exten => 9000,1,Set(CDR(userfield)=${destNumber}|${orderId})
exten => 9000,n,Answer()

but when the call is not answered, I have this on the db
calldate: 2011-05-07 10:56:24
clid: SIP/9500
src:
dst: 9000
dcontext: tutorial
channel: SIP/9500-00000004
dstchannel:
lastapp: Dial
lastdata: SIP/9500
duration: 0
billsec: 0
disposition: NO ANSWER
amaflags: 3
accountcode: SIP/9500
uniqueid: 1304758529.4
userfield:

The userfield is empty!!

I have tried
Map params = new HashMap();
params.put(“userfield”,destinationNumber+"|"+orderId);
originateAction.setVariables(params);

no luck!

I have tried getting the uniqueId from the originateResponse but it is empty.
The workaround which I have found is to set the orderId and destination into the account parameter.

any help would be appreciated.

maybe my approach is wrong and you can indicate another way to implement this.

thanks in advance

With CDRs, nothing beyond the most basic is simple.

In this case, I think you are only getting the CDR on the destination channel, which will not have the userfield from the originating channel.

Do you have CDRs enabled for unanswered calls.

The Answer() application doesn’t have anything like the same effect as DIal with an answer on the B side.

I’d suggest trying to force out the CDR with ResetCDR.