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:
[outgoing]
exten => _X.,1,Set(CALLERID(num)=xxxxxxxxx)
same => _X.,n,Dial(SIP/trunk/${EXTEN})
[ivr-1]
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