Hi,
avpops module in the CVS head has several new features:
*** A new function is now available to perform integer operations with avps:
avp_op("source/destination", "operator/value/flags")
the result of this function is the evaluation of the expression: 'destination' = 'source' 'operator' 'value'. If the 'destination' is not specified, then a new avp having the name and type of 'source' will be created.
The flags are: - d - delete the source after the operation - g - apply the operation to all 'source' avp
the 'value' must be an integer in the form of "i:integer_number" or an avp alias.
'source' and 'destination' can be specified as avp name or avp alias.
The operations that can be performed: - add - addition - sub - substitution - mul - multiplication - div - division - mod - module - and - bitwise and - or - bitwise or - xor - bitwise xor - not - bitwise not
*** avp_copy() can now perform cast operations. Two new flags were added - n - convert the value of source avp into integer number and store it in destination - s - convert the value of source avp into string and store it in destination
*** avp_check() has now more check operators - ne - not equal - le - least or equal - ge - greater or equal - and - bitwise and - or -bitwise or - xor - bitwise xor
See the readme for a few more information, the avpops tutorial will be updated for openser soon. Some internals were changed to allow these new features, so testing and feedback will be highly appreciated.
Regards, Ramona