[asterisk-users] CDR on MySQL
Bryant Zimmerman
BryantZ at zktech.com
Wed Dec 22 17:51:37 UTC 2010
What would it do if you
exten => h,1,ResetCDR(w)
exten => h,2,NoCDR()
exten => h,3,DEADAGI(get-unqiueid.php)
I have not tried it but in theory it should write the first CDR and then
kill the write of the second NO ANSWER CDR.
Let me know if it works for you as I may need to do it on some of my h
exten code as well.
Bryant
----------------------------------------
From: "Ron" <nhadie at gmail.com>
Sent: Wednesday, December 22, 2010 9:42 AM
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] CDR on MySQL
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
>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101222/5c476f83/attachment-0001.htm>
More information about the asterisk-users
mailing list