[Home]

Summary:ASTERISK-20599: [patch] A Module to Submit CDR via Curl to a webservice end point
Reporter:Alex (abar)Labels:patch
Date Opened:2012-10-23 18:36:00Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Functions/func_curl
Versions:10.2.1 13.18.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cdr_curl.c
( 1) cdr_curl.conf
Description:A Module to Submit CDR via Curl to a webservice end point.
Comments:By: Alex (abar) 2012-10-23 18:40:38.443-0500

This code was written against the asterisk 10.2.0, but wasn't a choice in the affected versions list.

By: Michael L. Young (elguero) 2012-10-24 06:49:10.829-0500

In order for a new feature to be accepted, it needs to be written against trunk for inclusion in the next version of Asterisk which will be 12.

Also, you should post your code to ReviewBoard in order for it to go through the code review process.  Once it passes that process, it can be brought into the code base.

This article on the Asterisk Wiki, [https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines#AsteriskIssueGuidelines-PatchandCodesubmission],has the details on how to submit a new feature.

By: Rusty Newton (rnewton) 2012-10-30 20:26:15.602-0500

Setting this to needs feedback, so the reporter can provide a patch against trunk.

Alex, do you have access to reviewboard? If not, E-mail "mjordan at digium.com" to request access.

By: Alex (abar) 2012-10-30 20:27:41.604-0500

Hi Rusty, No I dont, I will request access asap. Thanks!

By: Matt Jordan (mjordan) 2012-10-30 20:57:56.681-0500

So, before readying the patch for Review Board, you should make sure that the patch conforms to the coding guidelines on the Asterisk wiki:


https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines

Two things I noticed in the patch, but there may be others:

{noformat}
if (foo)
{
 /* ... */
}
else
{
 /* ... */
}

{noformat}

should be:

{noformat}

if (foo) {
/* ... */
} else {
/* ... */
}

{noformat}

And:

{noformat}

if (foo)
 bar;

{noformat}

should be:

{noformat}

if (foo) {
 bar;
}

{noformat}

By: Alex (abar) 2012-10-30 21:00:44.782-0500

Thanks Rusty, will check into the guidelines and fix those up.

By: Alex (abar) 2012-10-30 21:02:37.344-0500

Sorry Matt. Thought Rusty posted that.

By: Rusty Newton (rnewton) 2012-11-15 18:15:59.795-0600

Alex, putting this back into feedback so you have more time to post the modified code to this issue.

By: Alex (abar) 2012-11-18 17:49:26.151-0600

Great, thanks.

By: Felippe Silvestre (fsilvestre) 2017-10-25 14:00:08.777-0500

Use *ast_channel_amaflags2string* to convert the enum representation of an AMA flag to a string representation. (Since version *12*)
{code:none}
append_string_query_param("amaflags", ast_channel_amaflags2string(cdr->amaflags), buf, sizeof(buf));
append_string_query_param("accountcode", cdr->accountcode, buf, sizeof(buf));
append_string_query_param("flags", ast_channel_amaflags2string(cdr->flags), buf, sizeof(buf));
{code}