$vz(i) = 0;
pv_unset("$vn(save_ai)")
while ($vz(i) < $hdrc(P-Asserted-Identity)) {
$vn(temp_holder) = $(hdr(P-Asserted-Identity)[$vz(i)]);
if ( $(vn(temp_holder){nameaddr.uri}{uri.scheme}) =~ "^sip" ) {
$vn(save_ai) = $vn(temp_holder);
break;
}
}
if ( $vn(save_ai) != $null ) {
remove_hf("P-Asserted-Identity"); append_hf("P-Asserted-Identity: $vn(save_ai)\r\n");
}
might need some tuning, and you need the textops module.
_______________________________________________Greetings,I have a client that sends me two P-Asserted-Identity headers, one with SIP URI and one with tel URI.The pseudo variable $ai returns the topmost P-Asserted-Identity header and I only need the one with the SIP URI.How should i proceed ? Is there a way to delete the one with tel URI? the header removal functions i find only work with header name.I could also work with something different than $ai for this scenario.Best Regards,
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users