[asterisk-dev] res_config_mysql - maximum field length for appdata

Tilghman Lesher tlesher at digium.com
Fri May 7 08:29:07 CDT 2010


On Friday 07 May 2010 04:24:15 Sebastian Denz wrote:
> Hello list,
>
> i have already posted to asterisk-users, but maybe this is more dev
> related...
>
> :)
>
> as I am trying to write a complex macro for my users i have the problem,
> that the appdata field in the extensions table is to small for all my macro
> parameters.
>
> I am using the DB definition from
> http://www.voip-info.org/wiki/view/Asterisk+RealTime+Extensions
> so appdata is limited to 128 characters.
>
> And I would prefer some more ;)
>
> After looking around in res_config_mysql.c I did not find any design based
> limitation because to me the relevant data structures seems to be allocated
> dynamically.
>
> But as I am not a skilled C-hacker, it will be great if someone could tell
> me if there will be unwanted side effects after changing the fieldlength to
> something like 200 characters or more...
>
> btw: is there another (maybe more official?!) source for the database
> definition than voip-info.org? I did not find anything in the addons
> directory...

Certainly 200 is not a length barrier.  The next limit up really is more along
the lines of 4095 characters, which is the size of the variable expansion
buffer.  Starting in 1.8, even that limit will be gone, as the variable
expansion routines have been modified to use as large buffers as needed
(or, in most cases, as small as, which should create a commensurate
performance boost).

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list