[Home]

Summary:ASTERISK-18733: No CDR for AMI redirect
Reporter:Martin Vit (festr)Labels:
Date Opened:2011-10-18 16:35:43Date Closed:2018-01-02 08:44:27.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:CDR/General
Versions:1.8.7.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:debian 6Attachments:
Description:I've simple dialplan SIP ->
[default]
exten => ..,1,Answer()
same => n,Wait(120)

Then I use AMI redirect to redirect it to [internal] context where is Dial(SIP/internal,,). After successfull call, no CDR is written. Without AMI redirect, CDR just write ok.
Comments:By: Martin Vit (festr) 2011-10-18 16:37:10.684-0500

SVN-trunk-r341198 does not works too.

By: Vitezslav Novy (vnovy) 2011-12-18 06:06:25.808-0600

I can confirm the problem.
Also scenario when call is ringing on phone and is redirected has same problem.
I think it's because redirect function  (main/manager.c) sets AST_FLAG_BRIDGE_HANGUP_DONT flag on channel, but this flag is cleared only if channel is bridged, when bridge is finnished. Otherwise flag is kept set and it is reason why CDR is not written.

I have patch which clears AST_FLAG_BRIDGE_HANGUP_DONT flag also in __ast_pbx_run (main/pbx.c) when sof hangup with AST_SOFTHANGUP_ASYNCGOTO flag  appears (there are 2 places where it is processed). It works for me, but it's not much tested and also I'm not familiar with asterisk internals so I'd like to ask somebody to say if this way is OK.


By: Steve Davies (one47) 2012-01-04 11:36:29.781-0600

Please try the patch I posted here: ASTERISK-17826, it may need a small modification for 1.8, as it is designed for 10.x trunk.

This does what Vitezslav Novy describes above, and a little more to ensure that a channel does not become unanswered after a transfer, and I have made significant efforts to follow this through and work out the implications. Comments welcomed.


By: Maciej Krajewski (jamicque) 2012-06-21 06:22:06.623-0500

It does not work.

By: Gabriel Ortiz Lour (elbriga) 2016-06-01 12:57:32.714-0500

Just for the record, for those who are still using 1.8 and 11:

Instead the AMI "Redirect" action, use AMI "Command" action:
Action: Command
Command: channel redirect $chan $context,$exten,$prio

Works as expected and generates the CDR

By: Joshua C. Colp (jcolp) 2017-12-19 06:29:36.037-0600

CDR support has been completley rewritten in current supported versions of Asterisk. Do you still have this issue?

By: Asterisk Team (asteriskteam) 2018-01-02 08:44:27.881-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines