Hi Wolfgang,

I would say adding the RPID hdr along with changing the FROM hdr is a little bit redundant - as most of the SIP phones do not interpret the RPID hdr, you may use RPID without FROM changing if the call goes to a GW and FROM changing (without adding RPID) if goes to a SIP UA.

regards,
bogdan

Wolfgang Hottgenroth wrote:

I've done it this way:

if (search("^Remote-Party-ID:.*<sip:.*?>.*?;privacy=full.*?")) {
  xlog("L_NOTICE", "*** full privacy requested\n");
  remove_hf("Remote-Party-ID");
  append_hf("Remote-Party-ID:\
<sip:[EMAIL PROTECTED]>;party=calling;screen=yes;privacy=full\n");
  uac_replace_from("anonymous", "sip:[EMAIL PROTECTED]");

  avp_printf("contacthelp", "$hdr(contact)");
  # xlog("L_NOTICE", "*** contact: $avp(contacthelp)\n");
  avp_subst("contacthelp", "/<sip:(.*)@(.*)>/<sip:\2>/");
  # xlog("L_NOTICE", "*** contact substituted: $avp(contacthelp)\n");
  remove_hf("Contact");
  avp_pushto("$Contact", "s:contacthelp");
}

What do other ones think about my approach? In my setup it works fine,
as it seems.



_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to