[Users] The usrloc table, Oracle, and Asterisk

Jerome Martin jmartin at longphone.fr
Fri Dec 15 14:59:05 CET 2006


On Fri, 2006-12-15 at 12:07 -0200, Juan Carlos Castro y Castro wrote:
> OK, now I'm trying to do something along the lines of:
> 
> if ("$hdr(expires)" > 3600) {
>         avp_db_query("UPDATE sip_conf SET ipaddr='$si', port='$sp', 
> regseconds=$Ts+$hdr(expires), useragent='$ua' WHERE name='$au'");
> } else {
>         avp_db_query("UPDATE sip_conf SET ipaddr='$si', port='$sp', 
> regseconds=$Ts+3600, useragent='$ua' WHERE name='$au'");
> };
> 
> But I get a syntax error at the "if". How can I do such a comparison?

Take a look at avpcheck() :

http://www.openser.org/docs/modules/1.1.x/avpops.html#AEN384





More information about the sr-users mailing list