[SR-Users] Unexpected evaluation to false on a phonenumber in $avp
Alex Hermann
alex at speakup.nl
Tue Jan 6 09:46:54 CET 2015
On Monday 05 January 2015 16:19:51 Daniel Tryba wrote:
> I'm using an avp to make a redirect decision. Normally this avp contains
Dutch
> telephone numbers (+31[0-9]{7,10}). With a simple:
> if($avp(dst_redirectnumber))
> {
"if" statements only handle boolean conditions. An avp value does not result
in a boolean, but a string or integer. You should compare the avp to a
specific string or integer value (or $null), or use pv_isset().
(This is since the migration from kamailio 1.5 to sip-router).
--
Alex Hermann
More information about the sr-users
mailing list