Filling CDR userfield

Hello,

I’ve got a simple extension for inbound calls.
i want to fill the userfied in the cdr table.
CDR table is filled with all calls but the userfield is empty.

what i’m doing wrong?

regards
philip

[CODE]
[from-pstn-custom]
include => from-cwb

[from-cwb]
exten => _07211111111.,1,Set(CDR(userfield)=9999)
exten => _07211111111.,n,Dial(SIP/sipgate/${EXTEN})
[/CODE]

-- Executing [07211111111@from-pstn:7] Set("SIP/125486524875-00000002", "CDR(userfield)=9999") in new stack -- Executing [07211111111@from-pstn:11] Dial("SIP/125486524875-00000002", "SIP/sipgate/07211111111") in new stack -- Called SIP/sipgate/07211111111 -- SIP/sipgate-00000003 is making progress passing it to SIP/125486524875-00000002 -- SIP/sipgate-00000003 is ringing -- SIP/sipgate-00000003 answered SIP/125486524875-00000002 -- Locally bridging SIP/125486524875-00000002 and SIP/sipgate-00000003 -- Executing [h@from-pstn:1] NoOp("SIP/125486524875-00000002", "H Extension: DIALSTATUS: ANSWER HANGUPCAUSE: 16") in new stack -- Executing [h@from-pstn:4] Hangup("SIP/125486524875-00000002", "") in new stack == Spawn extension (from-pstn, h, 4) exited non-zero on 'SIP/125486524875-00000002' == Spawn extension (from-pstn, 07211111111, 11) exited non-zero on 'SIP/125486524875-00000002'

Have no clue but your concept is flawed. You are bypassing the freepbx dial plan with your method.

You need to load the variable in macro pre dial hook then send control back to freepbx. Acck

i know, thats something special, i cant use the normal freepbx dialplan. what did u mean with load the variable in macro pre dial hook nad send control back to freepbx?

Macro pre dial hook is already in the free pix dial plan so you can execute code prior to freepbx calling dialparties.agi

Macro pre dial hook is already in the free pix dial plan so you can execute code prior to freepbx calling dialparties.agi

problem solved
yum install asterisk-addons-mysql
i dont use the distro, was a custom installation on centos 6.5