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

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Jul 10 10:08:19 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13051 
====================================================================== 
Reported By:                pj
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13051
Category:                   Functions/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
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:              
====================================================================== 
Date Submitted:             07-10-2008 09:45 CDT
Last Modified:              07-10-2008 10:08 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.


====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 07-10-08 10:08  
---------------------------------------------------------------------- 
What is the output of 'dialplan show' ? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-10-08 10:08  Corydon76      Note Added: 0090014                          
======================================================================




More information about the asterisk-bugs mailing list