Hello,
update the wiki -- the common use case out there for those values is
lowercase (e.g., in sip uris).
Thanks,
Daniel
On 03/06/15 11:49, Mikko Lehto wrote:
Hi
PV cookbook says $proto returns values in uppercase¹,
but I am getting lower case values back.
PV module uses pv_get_proto() in pv_export_t structure:
---
static pv_export_t mod_pvs[] = {
.
.
.
{{"proto", (sizeof("proto")-1)},
PVT_OTHER, pv_get_proto, 0, 0, 0, 0, 0},
---
Further on, 3rd parameter (vtype) in call to get_valid_proto()²
asks for lowercase results:
---
int pv_get_proto(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
.
.
.
if (get_valid_proto_string(msg->rcv.proto, 0, 0, &s)<0) {
---
Should I update PV module or cookbook?
I am running 4.2 from git:
---
version: kamailio 4.2.4 (x86_64/linux) a23331
---
[1] UDP, TCP, TLS, SCTP, WS, WSS
http://kamailio.org/wiki/cookbooks/devel/pseudovariables#pr_-_protocol_of_r…
[2]
https://github.com/kamailio/kamailio/blob/master/modules/pv/pv_core.c#L1080