[asterisk-bugs] [JIRA] (ASTERISK-19049) CDR wasn't generated after doing redirect through AGI

Gabriel Ortiz Lour (JIRA) noreply at issues.asterisk.org
Wed Jun 1 12:59:56 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-19049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230875#comment-230875 ] 

Gabriel Ortiz Lour commented on ASTERISK-19049:
-----------------------------------------------

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



> CDR wasn't generated after doing redirect through AGI
> -----------------------------------------------------
>
>                 Key: ASTERISK-19049
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-19049
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_cdr, CDR/General, Functions/func_cdr
>    Affects Versions: SVN, 1.8.7.2, 10.0.0-rc3
>         Environment: Linux Ubuntu 2.6.32-33-server, package from packages.asterisk.org, sources from packages.asterisk.org and from svn
>            Reporter: Martin Čechvala
>      Target Release: 12.0.0
>
>
> I received a call from uplink to one of the extensions. Then I use AMI and send:
> Action: Redirect
> Channel: SIP/uplink-000000 (source channel)
> Context: auto-answer
> Exten: 7000 (original called destination extension)
> Priority: 1
> auto-answer context:
> exten => 7000,1,SIPAddHeader(Call-Info: <sip:0.0.0.0>\;answer-after=0) ; similar header for other phones
> exten => 7000,n,Dial(SIP/7000,30)
> exten => 7000,n,Hangup
> Auto-answer context is for automatic phone pickup, it just inserts SIP header and calls the same phone.
> Phone is linksys, it accepts the call and everything works, but after hangup there is no CDR.
> I located the issue in main/features.c:4262. There is a comment "QUESTION: should we copy bridge_cdr fields to the peer before we throw it away?". Well, that's causing this problem.
> A temporarily (but really wrong) workaround is to replace
> ast_cdr_discard(bridge_cdr);
> with
> ast_cdr_end(bridge_cdr);
> ast_cdr_detach(bridge_cdr);
> printing CDR here solves this issue, but I think it raises other hidden issues.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list