[asterisk-users] CDR on MySQL

Ron nhadie at gmail.com
Wed Dec 22 10:10:14 UTC 2010


Hi All,

I've got this dialplan:


[macro-callout-intl]
exten => s,1,ResetCDR(w)
exten => s,2,Dial(IAX2/${ARG1}/018${OUTBOUND}||t|L(${OUTTIME}00:6000))
exten => s,3,Goto(s-${DIALSTATUS},1)
exten => s,4,Hangup(19)
exten => s-BUSY,1,NoCDR()
exten => s-BUSY,n,Playback(user&is-curntly-busy)
exten => s-BUSY,n,Hangup(19)
exten => s-CONGESTION,1,NoCDR()
exten => s-CONGESTION,n,Playback(user&is-curntly-busy)
exten => s-CONGESTION,n,Hangup(19)
exten => s-CHANUNAVAIL,1,NoCDR()
exten => s-CHANUNAVAIL,n,Playback(user&is-curntly-unavail)
exten => s-CHANUNAVAIL,n,Hangup(19)
exten => s-NOANSWER,1,NoCDR()
exten => s-NOANSWER,n,Playback(number-not-answering)
exten => s-NOANSWER,n,Hangup(19)
;exten => s-ANSWER,1,ResetCDR(w)
;exten => s-ANSWER,n,Set(CDR(UserField)=${SIP_HEADER(From)})
;exten => s-ANSWER,n,Hangup(19)
exten => h,1,DEADAGI(get-unqiueid.php)

on the last line...i would like to get the uniqueid of the call and use 
it to compute cost of the call. unfortunately with this setup, after i 
hangup, it does not insert the CDR yet. so my AGI get-unqiueid.php does 
not find any record. have i placed my ResetCDR(w) correctly?

thank you in advanced.

regards
Ron





More information about the asterisk-users mailing list