Zeeshan Zakaria <[email protected]> writes:

> I've just found out that CDR(accountcode) variable can only be 20
> characters long, doesn't matter what size the MySQL column has for it.
>
> I need to increase it to at least 30 characters. Any idea how this can be
> accomplished?

As others have said, that requires recompilation, which is a pain.

However, there is another way, in sip.conf:

[foo]
accountcode=foo
setvar=FANCYLONGACCOUNTCODE=foo

Then in the dialplan:

exten => _X!,1,Set(CDR(fancylongaccountcode)=${FANCYLONGACCOUNTCODE})

Now you just need to set up cdr_adaptive_odbc to map
CDR(fancylongaccountcode) to accountcode in the database, or
alternatively use a database view to accomplish that.

I haven't tested it, but it should work.

Even better would be:

[foo]
accountcode=foo
setvar=CDR(fancylongaccountcode)=foo

but I'm not sure whether that works.

Last concern: Does setvar work even for transfers, like accountcode
does?


/Benny


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to