Hi!
No offence - but the function names and parameters changed again ;) Just to document how it could be implemented as of Ottendorf:
if (avp_check("s:privacy", "eq/1/g")) { xlset_attr("$paidheader", "sip:%$callerid@domain.tld"); xlset_attr("$privacyheader", "id"); } else { xlset_attr("$paidheader", "sip:%$callerid@domain.tld"); xlset_attr("$privacyheader", "none"); } replace_attr_hf("P-Asserted-Identity", "$paidheader"); replace_attr_hf("Privacy", "$privacyheader");
This is based on RFC3323/3325 rather than Remote-Party-ID but you should get the idea.
- replace_avp_hf() got renamed to replace_attr_hf() - xlset_attr() needs a $ for the first argument/attr
Cheers, Hendrik