[Users] Questions about regexp and AVPs

Mahesh Paolini-Subramanya mahesh at corp.aptela.com
Thu Nov 30 20:18:36 CET 2006


Yeah, suspected as much. 
Was already using fm, but was thinking of this along the lines of some of the more complex processing that we need to do
Never mind, more than one way to skin a cat...

cheers, and tx
----- Original Message -----
From: Bogdan-Andrei Iancu <bogdan at voice-system.ro>
To: mahesh at aptela.com
Cc: users <users at openser.org>
Sent: Thursday, November 30, 2006 3:37:24 AM GMT-0600
Subject: Re: [Users] Questions about regexp and AVPs

Hi Mahesh,

the "re" operator accepts only string values as a second operand. See:
    http://www.voice-sistem.ro/docs/avpops/ar01s06.html#avp_check

the limitation is because performance reasons - having dynamic regexp is 
something very costly. You may consider as alternative the "fm" operator.

regards,
bogdan

Mahesh Paolini-Subramanya wrote:

> I think I'm missing something pretty obvious here, but is there a 
> reason that
> avp_check("$avp(tmpVar1)", "re/$avp(myNetwork0)/i")
> barfs on 1.1.x?
>
> I get the error
>  0(0) ERROR:avpops:fixup_check_avp: regexp operation requires string value
>  0(0) ERROR: fix_actions: fixing failed (code=-1) at cfg line 3491
>
> In the above,
>    $avp(tmpVar1) ==  "1.2.3.4"
>    $avp(myNetwork0) == "1.2.3"
>
> Now, I'd hoped that I could actually run the following
> avp_check("$avp(tmpVar1)", "re/^$avp(myNetwork0)/i")
> but that doesn't work
>
> Then, setting
> $avp(myNetwork0) == "^1.2.3"
> and running
> avp_check("$avp(tmpVar1)", "re/$avp(myNetwork0)/i")
> didn't work either
>
> Sooo, whats the solution?
> avp_check can't have AVPs on both sides of the check?
>
> cheers
> -- 
> *******************************************
> Mahesh Paolini-Subramanya      (703) 386-1500 x9100
> CTO                                         mahesh at aptela.com
> Aptela, Inc.                               http://www.aptela.com
> "Aptela: How Business Answers The Call"
> *******************************************
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>  
>



-- 
*******************************************
Mahesh Paolini-Subramanya      (703) 386-1500 x9100
CTO                                         mahesh at aptela.com
Aptela, Inc.                               http://www.aptela.com
"Aptela: How Business Answers The Call"
*******************************************





More information about the Users mailing list