[asterisk-users] CDR on MySQL

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


Hi I have tried setting endbeforehexten=yes but still CDR does not get 
inserted before h exten. what i tried is setting ResetCDR(w) before the 
DEADAGI. Like this:

exten =>  h,1,ResetCDR(w)
exten =>  h,2,DEADAGI(get-unqiueid.php)

it seems to work but it's inserting 2 record on the CDR, one with 
disposition ANSWERED and one with NO ANSWER.

any ideas? thanks again.

regards
Ron

On 12/22/2010 7:29 PM, Ishfaq Malik wrote:
> 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
>



More information about the asterisk-users mailing list