Summary: | ASTERISK-14613: [patch] Length of the parameters using an Async Originate | ||
Reporter: | Ernesto J. Perez (ernestojpg) | Labels: | |
Date Opened: | 2009-08-07 08:03:15 | Date Closed: | 2012-09-07 08:32:38 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) manager_asyncdatalength.patch | |
Description: | In the Originate Action, when the Async option is true, the Data option can only be 80 characters or less. When Async option is false (or it is not present), the Data option can be much longer. ****** ADDITIONAL INFORMATION ****** EG: This Originate works fine Action: Originate Channel: Local/711@outgoing CallerID: "Administrador" ActionID: myActionID_4a7bf40c606b7 Application: AGI Data: AGI_LlamAutom.php|/var/lib/asterisk/verbio/audio/verbio-tts-4a7bed9c2c8|/mnt/www/nbx_V1/branches/myOwnSound|beep But in the following Originate, the 'Data' field is truncated, to 80 caracters (counting after the colon): Action: Originate Channel: Local/711@outgoing Async: true CallerID: "Administrador" ActionID: myActionID_4a7bf40c606b7 Application: AGI Data: AGI_LlamAutom.php|/var/lib/asterisk/verbio/audio/verbio-tts-4a7bed9c2c8|/mnt/www/nbx_V1/branches/myOwnSound|beep The AGI only recieves: 'AGI_LlamAutom.php|/var/lib/asterisk/verbio/audio/verbio-tts-4a7bed9c2c8|/mnt/ww' | ||
Comments: | By: Michael Ricordeau (tamiel) 2009-11-26 09:57:48.000-0600 I just noticed this bug too on 1.4.26.2. With "Async: true", max length is 80 (including '\0') because Originate execute fast_originate() function and this function use struct fast_originate_helper . In this struct, field appdata (where "Data" field will be copied with ast_copy_string) ) is char appdata[AST_MAX_EXTENSION] and AST_MAX_EXTENSION is set to 80 . Without Async mode, max length is 256 (including '\0'), because when passing data to ast_pbx_outgoing_app function, appdata is copied into tmp->data in pbx.c with ast_copy_string and tmp->data is char data[256]. Here is a patch for version 1.4.x to set Data max length set to 256 (including '\0') in Async mode . This patch probably work with 1.6.0.x because fast_originate_helper is the same. By: Matt Jordan (mjordan) 2012-09-07 08:32:13.755-0500 This should no longer be an issue in Asterisk 1.8+. The Originate handling was redone to be tolerant of longer fields, and was made consistent between asynchronous Originate commands and synchronous Originate commands. See {noformat}action_originate{noformat} and the {noformat}fast_originate{noformat} methods in Asterisk 1.8+. |