Zeeshan Zakaria
2009-Jul-14 00:10 UTC
[asterisk-users] Why CDR is recording dst value = h?
For a new project, I have written a dialplan and it is pretty straight forward: The [dialout] context dials out a number, and h extension in this context writes the CDR. But what is happening is that if the callee hangs up first, all values in the CDR are fine, but if the caller hangs up first, the 'dst' column is always 'h'. I put a NoOp right in the begining of this macro to verify it. 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) 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090713/0dfcfea4/attachment.htm
Zeeshan Zakaria
2009-Jul-14 20:25 UTC
[asterisk-users] Why CDR is recording dst value = h?
It should be an easy one for many of the experts here. On Mon, Jul 13, 2009 at 8:10 PM, Zeeshan Zakaria <zishanov at gmail.com> wrote:> For a new project, I have written a dialplan and it is pretty straight > forward: The [dialout] context dials out a number, and h extension in this > context writes the CDR. But what is happening is that if the callee hangs up > first, all values in the CDR are fine, but if the caller hangs up first, the > 'dst' column is always 'h'. I put a NoOp right in the begining of this macro > to verify it. > > 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) > 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 >-- Zeeshan A Zakaria -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090714/157cf96f/attachment.htm
Philipp Kempgen
2009-Jul-14 21:24 UTC
[asterisk-users] Why CDR is recording dst value = h?
Zeeshan Zakaria schrieb:> For a new project, I have written a dialplan and it is pretty straight > forward: The [dialout] context dials out a number, and h extension in this > context writes the CDR. But what is happening is that if the callee hangs up > first, all values in the CDR are fine, but if the caller hangs up first, the > 'dst' column is always 'h'. I put a NoOp right in the begining of this macro > to verify it. > > Any idea why is this happening and how can I have correct 'dst' value if the > caller hangs up first.Maybe endbeforehexten=yes in cdr.conf does what you need. Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de --
David Backeberg
2009-Jul-15 16:42 UTC
[asterisk-users] Why CDR is recording dst value = h?
On Mon, Jul 13, 2009 at 8:10 PM, Zeeshan Zakaria<zishanov at gmail.com> 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 >