[asterisk-users] CDR on MySQL
Ishfaq Malik
ish at pack-net.co.uk
Wed Dec 22 11:29:46 UTC 2010
On Wed, 2010-12-22 at 18:10 +0800, Ron wrote:
> 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
>
Make sure you set
endbeforehexten=yes
in cdr.conf
Ish
--
Ishfaq Malik
Software Developer
PackNet Ltd
Office: 0161 660 3062
More information about the asterisk-users
mailing list