[Asterisk-Dev] res/res_agi.c set accountcode

Cristian Draghici cristian.draghici at gmail.com
Wed Jan 4 08:42:58 MST 2006


But I want to alter chan->accountcode where chan is a struct ast_channel *.

I don't see how setting a global variable (set variable calls
pbx_builtin_setvar_helper which seem to write in a associative array)
would help in my case.

In fact I've tested this from AGI:
set variable accountcode somevalue

and the CDR accountcode variable is not altered at all.

whereas doing
ast_copy_string(chan->accountcode, argv[2], sizeof(chan->accountcode));

does the trick.

Am I missing something really obvious?

Thanks,
Cristi


On 1/4/06, Kevin P. Fleming <kpfleming at digium.com> wrote:
> Cristian Draghici wrote:
>
> > Is there a way to alter the accountcode CDR field from AGI?
> >
> > I didn't find anything in res_agi.c and I've ended up writing my own
> > "SET ACCOUNTCODE" command (similar to "SET EXTENSION").
>
> This has already been answered on asterisk-users. You can set any
> variable, or dialplan function, via AGI.
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list