henningw left a comment (kamailio/kamailio#4444)

> > Do you have any idea why case 2 fails so badly? Is this also the script 
> > interpreter or something else? I would expect the `{s.int}` transformation 
> > to apply first, resulting in an int of value 3, and then string expansion 
> > converting the int to a string "3". `xinfo("Target proto 2: $(rP{s.int})"); 
> > # "tls"`
> 
> Found it. The {s.int} transformation adds the `PV_TYPE_INT` flag to the PV if 
> it has the `PV_VAL_INT` flag set, but does not actually convert the int to a 
> string if it already has the `PV_VAL_STR` flag set. Because this class of 
> PV's have both `PV_VAL_STR` and `PV_VAL_INT` set, the string value remains 
> "tls" instead of becoming "3".
> 
> IMHO an explicit request from the admin to convert to int should make sure 
> the value becomes an int in any context. I'll cook up a patch.

Then we should also adapt the docs that the $rP will return an e.g. "tls" if 
asked for the string content, but 3 if asked for the integer content.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4444#issuecomment-3452124167
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/4444/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to