[asterisk-bugs] [Asterisk 0013051]: SIPPEER isn't working inside REGEX and IF

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jul 30 17:04:41 CDT 2008


The issue 0013197 has been set as DUPLICATE OF the following issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13051 
====================================================================== 
Reported By:                pj
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13051
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.4.21 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-07-10 09:45 CDT
Last Modified:              2008-07-30 17:04 CDT
====================================================================== 
Summary:                    SIPPEER isn't working inside REGEX and IF
Description: 
I'm checking if peer is registered OK, before issue Dial() to avoid warning
messages, I'm using expression below and it working as expected in trunk,
but it's not working in 1.4.21.1, this expression is always false:
if (${REGEX("^OK" ${SIPPEER(998,status)})})
as workaround for 1.4, I must first store result of REGEX in variable and
then check this variable using if() 
issue is probably with SIPPEER function, because if I tried replace
SIPPEER with string value, that SIPPEER returns, ie:
if (${REGEX("^OK" OK (57 ms))})
then it returns TRUE.


======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0013197 STAT() inside IF() doesn't work
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-07-30 17:04 murf           Relationship added       has duplicate 0013197
======================================================================




More information about the asterisk-bugs mailing list