Menu

Logical Operation Opensips 1.8.2

Paul
2013-01-05
2013-05-09
  • Paul

    Paul - 2013-01-05

    What is the correct way to do a simple logical comparison?

    Specifically:

    if ( $avp(info) < 3 ) {
    

    …This throws an error during runtime

    if ( $avp(info) < "3" ) {
    

    …This works but only if $avp(info) is integer less than 9

    The old format was tried in both cases eg; $avp(i:info) but the same result.

    Can someone post a way to do this comparison?

     
  • apsaras

    apsaras - 2013-01-06

    Try this

    if($(avp(info){s.int})<3) {
    
     
  • Paul

    Paul - 2013-01-07

    That works, thanks.