Double database entries when using call files

Hi everyone, I have a voice broadcasting system and everythin works well except that its logging double entries for all answered calls. In my dialplan I have context like:

exten => _X.,1,Set(CALLERID(num)=xxxxxxxxx)
same => _X.,n,Dial(SIP/trunk/${EXTEN})

exten => s,1,NoOp(IVR 1)
same => n,Answer
same => n,Set(CDR(userfield)={num}) same => n,Background(en/silence/1) same => n,AMD() same => n,NoOp({AMDSTATUS})
same => n,GotoIf([{AMDSTATUS}=HUMAN]?humn:mach)
same => n(mach),NoOp(OOPS ! We’ve got a Machine …!!!)
same => n,Hangup
same => n(humn),NoOp(We’ve got a human on the line!)
same => n,Verbose(Call Answered from {CALLERID(num)} to {name})
same => n,Background(tt-monkeys)
same => n,WaitExten(5)

Now the problem is if I send the call direct to the spool directory I only get the cdr of answered numbers and if l send the call through Local/XXXXXX@outgoing l get double entries on answered calls.
Anyone to help on how l can get only one entry in the database

When using a Local channel that then does a Dial you effectively have 2 call legs going on, resulting in 2 entries. You may be able to use CDR_PROP[1] to disable CDRs on one but I have no experience doing so.


Thank you, let me check it out

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.