No AMPUSER db entry

Hi!
I have freepbx running in a machine and the database in another
When I need to turn off the primary asterisk server i turn on the secondary asterisk server this have all the extension present in freepbx but i can’t receive calls I get this
To receive calls I only have to edit (I only press edit but i don’t change anything) the extension and press submit and aplly and they start receiving calls
The server are trixbox 2.2 beta and the external database is mysql 5.1
Someone as any idea how I resolve this!?
Thx

Connected to Asterisk 1.2.18 currently running on asterisk1 (pid = 29079)
Verbosity was 1 and is now 6
Core debug was 0 and is now 6
– Registered IAX2 ‘10002’ (AUTHENTICATED) at 10.10.10.14:4569
– Accepting call from ‘222222222’ to ‘5110’ on channel 0/1, span 4
– Executing NoOp(“Zap/94-1”, “Catch-All DID Match - Found 5110 - You probably want a DID for this.”) in new stack
– Executing Goto(“Zap/94-1”, “ext-did|s|1”) in new stack
– Goto (ext-did,s,1)
– Executing Set(“Zap/94-1”, “FROM_DID=s”) in new stack
– Executing Gosub(“Zap/94-1”, “app-blacklist-check|s|1”) in new stack
– Executing LookupBlacklist(“Zap/94-1”, “”) in new stack
– Executing GotoIf(“Zap/94-1”, “0?blacklisted”) in new stack
– Executing Return(“Zap/94-1”, “”) in new stack
– Executing Goto(“Zap/94-1”, “ext-local|10002|1”) in new stack
– Goto (ext-local,10002,1)
– Executing Macro(“Zap/94-1”, “exten-vm|novm|10002”) in new stack
– Executing Macro(“Zap/94-1”, “user-callerid”) in new stack
– Executing NoOp(“Zap/94-1”, “user-callerid: 222222222”) in new stack
– Executing GotoIf(“Zap/94-1”, “0?report”) in new stack
– Executing GotoIf(“Zap/94-1”, “0?start”) in new stack
– Executing Set(“Zap/94-1”, “REALCALLERIDNUM=222222222”) in new stack
– Executing NoOp(“Zap/94-1”, “REALCALLERIDNUM is 222222222”) in new stack
– Executing Set(“Zap/94-1”, “AMPUSER=”) in new stack
– Executing Set(“Zap/94-1”, “AMPUSERCIDNAME=”) in new stack
– Executing GotoIf(“Zap/94-1”, “1?report”) in new stack
– Goto (macro-user-callerid,s,11)
– Executing NoOp(“Zap/94-1”, “TTL: ARG1: novm”) in new stack
– Executing GotoIf(“Zap/94-1”, “0?continue”) in new stack
– Executing Set(“Zap/94-1”, “_TTL=64”) in new stack
– Executing GotoIf(“Zap/94-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,21)
– Executing NoOp(“Zap/94-1”, “Using CallerID “” <222222222>”) in new stack
– Executing Set(“Zap/94-1”, “FROMCONTEXT=exten-vm”) in new stack
– Executing Set(“Zap/94-1”, “VMBOX=novm”) in new stack
– Executing Set(“Zap/94-1”, “EXTTOCALL=10002”) in new stack
– Executing Set(“Zap/94-1”, “CFUEXT=”) in new stack
– Executing Set(“Zap/94-1”, “CFBEXT=”) in new stack
– Executing Set(“Zap/94-1”, “RT=”) in new stack
– Executing Macro(“Zap/94-1”, “record-enable|10002|IN”) in new stack
– Executing GotoIf(“Zap/94-1”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing DeadAGI(“Zap/94-1”, “recordingcheck|20070429-123249|1177846369.1”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20070429-123249|1177846369.1: No AMPUSER db entry for 10002. Not recording
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“Zap/94-1”, “No recording needed”) in new stack
– Executing Macro(“Zap/94-1”, “dial||tr|10002”) in new stack
– Executing DeadAGI(“Zap/94-1”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
dialparties.agi: priority is 1
dialparties.agi: Caller ID name is ‘unknown’ number is '222222222’
dialparties.agi: Methodology of ring is ‘none’
> dialparties.agi: USE_CONFIRMATION: ‘FALSE’
> dialparties.agi: RINGGROUP_INDEX: ‘’
– dialparties.agi: Added extension 10002 to extension map
– dialparties.agi: Extension 10002 cf is disabled
– dialparties.agi: Extension 10002 do not disturb is disabled
> dialparties.agi: extnum: 10002
> dialparties.agi: exthascw: 0
> dialparties.agi: exthascfb: 0
> dialparties.agi: extcfb:
> dialparties.agi: exthascfu: 0
> dialparties.agi: extcfu:
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
> dialparties.agi: ExtensionState: 0
dialparties.agi: Extension 10002 has ExtensionState: 0
– dialparties.agi: Checking CW and CFB status for extension 10002
– dialparties.agi: dbset CALLTRACE/10002 to 222222222
– AGI Script dialparties.agi completed, returning 0
– Executing NoOp(“Zap/94-1”, “Returned from dialparties with no extensions to call”) in new stack
– Executing NoOp(“Zap/94-1”, "DIALSTATUS is ") in new stack
– Executing GosubIf(“Zap/94-1”, “0?docfu|1”) in new stack
– Executing GosubIf(“Zap/94-1”, “0?docfb|1”) in new stack
– Executing NoOp(“Zap/94-1”, “Voicemail is novm”) in new stack
– Executing GotoIf(“Zap/94-1”, “1?s-|1”) in new stack
– Goto (macro-exten-vm,s-,1)
– Executing PlayTones(“Zap/94-1”, “congestion”) in new stack
– Executing Congestion(“Zap/94-1”, “10”) in new stack
– Channel 0/1, span 4 got hangup request
== Spawn extension (macro-exten-vm, s-, 2) exited non-zero on ‘Zap/94-1’ in macro ‘exten-vm’
== Spawn extension (macro-exten-vm, s-, 2) exited non-zero on ‘Zap/94-1’
– Hungup ‘Zap/94-1’