[asterisk-users] Dial to FastAGI application appears as 1-second CDR - how do I fix?

Tony Mountifield tony at softins.co.uk
Sat Jun 2 03:35:28 CDT 2018


In article <7d8dc02f-0fce-4d47-72d9-604994c33fa8 at palosanto.com>,
Alex Villací­s Lasso <a_villacis at palosanto.com> wrote:
> El 29/05/18 a las 05:24, Tony Mountifield escribió:
> > In article <3a005ff6-19a4-215b-4751-bee616ec74e6 at palosanto.com>,
> > Alex Villací­s Lasso <a_villacis at palosanto.com> wrote:
> >> In my application, I am using AMI to run an Originate command between a channel and a dialplan application (NOT a
> >> context). In my case, the application I want to invoke is FastAGI. The Originate AMI command works correctly, but
> >> Asterisk generates a very
> >> short (0-1s) duration for the CDR that results from this call, regardless of the time spent running the FastAGI
> >> application. I want the CDR duration to reflect the time spent in the entirety of the call, as is normal for ordinary
> >> calls. What should I do? I
> >> am running Asterisk 11.25.3 .
> >
> > Are you using Local channels as the target channel?
>
> Yes, this is the standard way my application works.

OK, so it is likely to be the same problem as I encountered.

> > I found what I believe is an issue with CDR handling when masquerading Local channels, when I ported
> > one of my old applications from Asterisk 1.2.32 to 11.25.3. It was recording an incorrect CDR
> > for the setup part of the call, and none for the answered part. In 1.2.32 I was getting two CDRs,
> > one for the setup part and another for the answered part.
> >
> > I eventually tracked it down to ast_do_masquerade() in channel.c, and made the following change,
> > which corrected the CDR behaviour back to the same as what Asterisk 1.2 had done:
> > [...]
> I will try doing this change and recompiling to see what happens.

Cool, please let us know if it helps!

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list