[asterisk-bugs] [JIRA] (ASTERISK-20723) Asterisk warns about pipe characters in string variable created using Set

Michael L. Young (JIRA) noreply at issues.asterisk.org
Sun Nov 25 13:48:45 CST 2012


    [ https://issues.asterisk.org/jira/browse/ASTERISK-20723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200031#comment-200031 ] 

Michael L. Young edited comment on ASTERISK-20723 at 11/25/12 1:47 PM:
-----------------------------------------------------------------------

Cam, the reason why it is not a bug is that the code was programmed for what you want.  There is a specific check on this particular warning to see if that option is set.  It is not turning off all warnings.  Only warnings that might be considered "optional" or harmless such as this one.  Also, not everyone is going to get this warning.  It is only displayed when someone uses the pipe character.  Not all users are using strings in the way you are.  So, it is not that I don't think it worthy of time and effort, it is that the code specifically was already written to handle this situation for you and those who have this warning being displayed.  Obviously, someone else had already thought about the fact that this warning you are getting was harmless and if someone chose to turn it off, they could do so.
                
      was (Author: elguero):
    Cam, the reason why it is not a bug is that the code was programmed for what you want.  There is a specific check on this particular warning to see if that option is set.  It is not turning off all warnings.  Only warnings that might be considered "optional" or harmless such as this one.  So, it is not that I don't think it worthy of time and effort, it is that the code specifically was already written to handle this situation for you.  Obviously, someone else had already thought about the fact that this warning you are getting was harmless and if someone chose to turn it off, they could do so.
                  
> Asterisk warns about pipe characters in string variable created using Set
> -------------------------------------------------------------------------
>
>                 Key: ASTERISK-20723
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20723
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/PBX
>    Affects Versions: 1.8.18.0
>         Environment: Asterisk 1.8.18.0 on a i686 running CentOS Linux 5.5
>            Reporter: Cam
>            Assignee: Michael L. Young
>            Severity: Minor
>
> Consider these two lines of dialplan:
> {noformat}
> exten => s,n,Set(regx=^1?8(00|22|33|44|55|66|77|88)[2-9][0-9]{6}$)
> exten => s,n,GotoIf($[${REGEX("${regx}" ${OUTNUM})} = 1]?tollfree)
> {noformat}
> When these are executed, the Asterisk CLI shows this warning after the first of the two lines (the Set statement):
> {noformat}
> [2012-11-24 03:41:26] WARNING[13479]: pbx.c:1442 pbx_exec: The application delimiter is now the comma, not the pipe.  Did you forget to convert your dialplan?  (Set(regx=^1?8(00|22|33|44|55|66|77|88)[2-9][0-9]{6}$))
> {noformat}
> Since at this point we are only putting a string into a string variable, Asterisk should not be complaining about the contents, since that string might be used for any number of purposes totally unrelated to the Asterisk dialplan.  In this particular case the pipe characters are being used in a regular expression, which is still valid usage, but Asterisk doesn't yet know that when the Set statement is invoked.
> Strangely, this only happens on one of two Asterisk systems, both running the exact same version of Asterisk and running the identical two lines shown above.  Both were compiled using the same options in menuselect, so I have no idea why one spits out this error and not the other.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list