@MartinPalmAGDS — I have a propose fix here https://github.com/kamailio/kamailio/pull/3171 Appreciate if you could test it out. It converts the certificate serial number to a BIGNUM and then string.
You cannot extract eh serial number as int from the pv but you can extract as string.