<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt">What would it do if you <br />
exten => h,1,ResetCDR(w)<br />
exten => h,2,NoCDR()<br />
exten => h,3,DEADAGI(get-unqiueid.php)<br />
<br />
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.<br />
<br />
Let me know if it works for you as I may need to do it on some of my h exten code as well.<br />
<br />
Bryant<br />
<br />
<div id="divSignature"></div>
<br />
<br />
<span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><hr width="100%" size="2" align="center" />
<b>From</b>: "Ron" <nhadie@gmail.com><br />
<b>Sent</b>: Wednesday, December 22, 2010 9:42 AM<br />
<b>To</b>: asterisk-users@lists.digium.com<br />
<b>Subject</b>: Re: [asterisk-users] CDR on MySQL</span><br />
<br />
Hi I have tried setting endbeforehexten=yes but still CDR does not get <br />
inserted before h exten. what i tried is setting ResetCDR(w) before the <br />
DEADAGI. Like this:<br />
<br />
exten => h,1,ResetCDR(w)<br />
exten => h,2,DEADAGI(get-unqiueid.php)<br />
<br />
it seems to work but it's inserting 2 record on the CDR, one with <br />
disposition ANSWERED and one with NO ANSWER.<br />
<br />
any ideas? thanks again.<br />
<br />
regards<br />
Ron<br />
<br />
On 12/22/2010 7:29 PM, Ishfaq Malik wrote:<br />
> On Wed, 2010-12-22 at 18:10 +0800, Ron wrote:<br />
>> Hi All,<br />
>><br />
>> I've got this dialplan:<br />
>><br />
>><br />
>> [macro-callout-intl]<br />
>> exten => s,1,ResetCDR(w)<br />
>> exten => s,2,Dial(IAX2/${ARG1}/018${OUTBOUND}||t|L(${OUTTIME}00:6000))<br />
>> exten => s,3,Goto(s-${DIALSTATUS},1)<br />
>> exten => s,4,Hangup(19)<br />
>> exten => s-BUSY,1,NoCDR()<br />
>> exten => s-BUSY,n,Playback(user&is-curntly-busy)<br />
>> exten => s-BUSY,n,Hangup(19)<br />
>> exten => s-CONGESTION,1,NoCDR()<br />
>> exten => s-CONGESTION,n,Playback(user&is-curntly-busy)<br />
>> exten => s-CONGESTION,n,Hangup(19)<br />
>> exten => s-CHANUNAVAIL,1,NoCDR()<br />
>> exten => s-CHANUNAVAIL,n,Playback(user&is-curntly-unavail)<br />
>> exten => s-CHANUNAVAIL,n,Hangup(19)<br />
>> exten => s-NOANSWER,1,NoCDR()<br />
>> exten => s-NOANSWER,n,Playback(number-not-answering)<br />
>> exten => s-NOANSWER,n,Hangup(19)<br />
>> ;exten => s-ANSWER,1,ResetCDR(w)<br />
>> ;exten => s-ANSWER,n,Set(CDR(UserField)=${SIP_HEADER(From)})<br />
>> ;exten => s-ANSWER,n,Hangup(19)<br />
>> exten => h,1,DEADAGI(get-unqiueid.php)<br />
>><br />
>> on the last line...i would like to get the uniqueid of the call and use<br />
>> it to compute cost of the call. unfortunately with this setup, after i<br />
>> hangup, it does not insert the CDR yet. so my AGI get-unqiueid.php does<br />
>> not find any record. have i placed my ResetCDR(w) correctly?<br />
>><br />
>> thank you in advanced.<br />
>><br />
>> regards<br />
>> Ron<br />
>><br />
> Make sure you set<br />
><br />
> endbeforehexten=yes<br />
><br />
> in cdr.conf<br />
><br />
> Ish<br />
><br />
<br />
--<br />
_____________________________________________________________________<br />
-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
New to Asterisk? Join us for a live introductory webinar every Thurs:<br />
http://www.asterisk.org/hello<br />
<br />
asterisk-users mailing list<br />
To UNSUBSCRIBE or update options visit:<br />
http://lists.digium.com/mailman/listinfo/asterisk-users<br />
<br /></span>