Menu

int value with AVP

Ali Razzaq
2012-06-17
2013-05-09
  • Ali Razzaq

    Ali Razzaq - 2012-06-17

    hi all,

    any one can help me on, how to use an integer number as a value of my AVP (is it possible that the value of my AVP being integer?).

    if it is imposable, alternatively, how can i retrieve the last value of AVP stored in the table ?

    Thanks in advanced.

     
  • Bogdan-Andrei Iancu

    Hi AVPs can have either INTEGER, either STRING values, depending on how you assign the value from script:
    $avp(my_avp) = 1;
    $avp(your_avp) = "1";

    AVPs vars can have multiple values, they are stored as a stack (LIFO) - you can use also indexes to retrieve a certain value.

    For more see:
    http://www.opensips.org/Resources/DocsCoreVar18#toc2

    Regards,
    Bogdan

     
  • Ali Razzaq

    Ali Razzaq - 2012-06-23

    Yap, Thanks a lot. I figure it out.