David, to answer your question, if I put NoOp(${CDR(... in the same context,
it shows the correct destination.

Dealing with CDR values have been a pain, and I know this because I've made
two billing systems in last two years. For AGI, there is DeadAGI, which
helps, but this current scenario was different, and my finding was that
putting ResetCDR after GotoIf statement was causint dst to change to 'h'. I
actually upgraded my stable Asterisk 1.2 system to Asterisk 1.4 just in a
hope to solve this dst = h problem, but it didn't help. If it is a bug, it
is still there.

I have solved the problem few hours ago. I have posted the details in
another thread. I found out that ResetCDR should be put before GotoIf. I
needed to have ResetCDR after GotoIf. I found a work around to solve my
problem by using macros. I've posted the code in my other thread.

I have a production server and I have put my new code on it already after
testing, and my billing system is working fine now.

Zeeshan

On Wed, Jul 15, 2009 at 12:42 PM, David Backeberg <[email protected]>wrote:

> On Mon, Jul 13, 2009 at 8:10 PM, Zeeshan Zakaria<[email protected]>
> wrote:
> > Any idea why is this happening and how can I have correct 'dst' value if
> the
> > caller hangs up first.
> >
> > [dialout]
> >         exten => _NXXNXXXXXX,s,1,Dial(SIP/XXXXXX/${EXTEN},30)
>
> What happens when you put a
> exten => _NXXNXXXXXX,s,2,NoOp(${CDR(dst))
> in there?
>
>
> >         exten => h,1,Macro(hangupcall,${EXTEN},${CDR(accountcode)})
> >
> > [macro-hangupcall]
> >         NoOp(${CDR(dst)})
> >         Set(dialout_num=${ARG1})
> >         Set(user_id=${ARG2})
> >         ResetCDR(vw);
> >         NoCDR();
> >         Hangup();
> >
> >
> > --
> > Zeeshan A Zakaria
> >
> > _______________________________________________
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
> >
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Zeeshan A Zakaria
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to