[Home]

Summary:ASTERISK-18396: [patch] - Variables Truncated When Using Realtime Dialplan
Reporter:Ross Beer (rossbeer)Labels:
Date Opened:2011-08-31 12:50:42Date Closed:2017-10-08 19:59:53
Priority:MajorRegression?
Status:Closed/CompleteComponents:PBX/pbx_realtime
Versions:1.8.6.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-18395 Lua applications argument length limitations
Environment:Cent OS 5.5Attachments:( 0) 20110913__ASTERISK-18396__2.diff.txt
( 1) 20110913__ASTERISK-18396.diff.txt
Description:When setting/using variables in a realtime MySQL database variables are truncated within Asterisk. The following is the output from the CLI:

SET("<channel removed>", "GROUPDIAL=Local/10000*200@vh-pbx-extension&Local/10000*201@vh-pbx-extension&Local/10000*202@vh-pbx-extension&Local/10000*203@vh-pbx-extension&Local/10000*200@vh-pbx-extension&Local/10000*200@vh-pbx-extension&Local/10000*200@vh-pbx-extension")

When appending with an additional extension it is truncated (Using the same loop as the previous entries):

SET("<channel removed>", "GROUPDIAL=Local/10000*200@vh-pbx-extension&Local/10000*201@vh-pbx-extension&Local/10000*202@vh-pbx-extension&Local/10000*203@vh-pbx-extension&Local/10000*200@vh-pbx-extension&Local/10000*200@vh-pbx-extension&Local/10000*200@vh-pbx-extension&Local/1")

If the same code is used in the extensions.conf this issue does not occur. However if you use the same variable once generated in the extensions.conf dial plan in a dial command from within a realtime dial plan the variable is once again truncated. It looks like the variable when being used in the real-time dial plan is cut short.

The variable is totally generated from within asterisk and the channel names are stored separately within the database dial plan. i.e they do no fill the length of the column, therefore they are being truncated inside the asterisk core.

Comments:By: Leif Madsen (lmadsen) 2011-09-13 12:31:53.370-0500

Can you please provide the database output and the Asterisk console output with debug level logging when the data is being read from the database? I'd also like to see the SQL statement log from the MySQL database (what Asterisk sends, and what MySQL returns)

By: Tilghman Lesher (tilghman) 2011-09-13 13:46:20.056-0500

Patch uploaded.  BTW, this patch will NOT actually change what appears on your console or in the log; however, the longer variables will still be seen by the target application.

By: Tilghman Lesher (tilghman) 2011-09-13 14:22:09.005-0500

Second patch WILL change what is on your console, to the appropriate length.

By: Leif Madsen (lmadsen) 2011-09-14 09:35:24.129-0500

Hopefully the reporter can test this out.

By: Ross Beer (rossbeer) 2011-10-01 06:19:08.065-0500

I can confirm that the variable length has been extended. I tested this to 20,000 characters but am sure that it will go more. 20,000 should be more than anyone needs!

In the CLI it only shows 8064 characters in 'SET' and 'NOOP', however this is a vast improvement over the ~250 characters it gave before.

Thank you for your work on this. Can we get this added to the next release?

By: Ross Beer (rossbeer) 2012-02-16 03:47:27.077-0600

Is it possible to get this moved into a RC?