Iñaki Baz Castillo пишет: > El Viernes, 5 de Diciembre de 2008, Juha Heinanen escribió: > >> if caller needs privacy, then it is up to the UA to send anonymous from >> header together with p-p-i and privacy headers. >> > > That would be so cool... Unfortunatelly I just know a SIP phone implementing > it: Twinkle. > > Other phones (as Linksys) when the user enables privacy during a call, just > set the From Display-Name with "Anonymous" value, while the From username > remains the real :( > > Yep, some UAC set "Anonymous" only in Display Name. But u can fix it using this code:
$var(url) = $fu; if(is_present_hf("Privacy") && ($hdr(Privacy)=="id" || $hdr(Privacy)=="user") && search("(From|f):\s*\"?anonymous")) { uac_replace_from("Anonymous","sip:[EMAIL PROTECTED]"); if(!is_present_hf("P-Asserted-Identity")) { append_hf("P-Asserted-Identity: <$var(url)>\r\n"); }; } With best regards, -- Alexandr Dubovikov * [EMAIL PROTECTED] RusNet * mailto:[EMAIL PROTECTED] AD1-UANIC * ICQ: 122351182 * http://www.start4.info _______________________________________________ Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users