Re: [OpenSIPS-Users] Parse P-Asserted-Identity
:+1: Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS eBootcamp 2021 https://opensips.org/training/OpenSIPS_eBootcamp_2021/ On 1/11/22 9:14 PM, Kingsley Tart wrote: That's interesting - I'm more accustomed to seeing those tags on an RPID header than PAID. With PAID I would have expected a separate Privacy header to contain the "id" string. Is this still OK with the RFCs? Cheers, Kingsley. On Mon, 2021-11-29 at 13:22 +0100, Mickael MONSIEUR wrote: Hello, My provider add to my INVITE's : P-Asserted-Identity: "Anonymous" ;party=calling;privacy=yes;screen=no Whether the call should be Anonymized to end-users. How to get the value of "privacy" ? I try: if( $(ai{privacy}) == "yes" ) But it does not work. (error when starting opensips) Thanks ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Parse P-Asserted-Identity
That's interesting - I'm more accustomed to seeing those tags on an RPID header than PAID. With PAID I would have expected a separate Privacy header to contain the "id" string. Is this still OK with the RFCs? Cheers, Kingsley. On Mon, 2021-11-29 at 13:22 +0100, Mickael MONSIEUR wrote: > Hello, > > My provider add to my INVITE's : > > P-Asserted-Identity: "Anonymous" > ;party=calling;privacy=yes;screen=no > > Whether the call should be Anonymized to end-users. > > How to get the value of "privacy" ? > > I try: > > if( $(ai{privacy}) == "yes" ) > > But it does not work. (error when starting opensips) > > Thanks > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Parse P-Asserted-Identity
Mickael, The PAI header is not just a parameter list, so you can’t use that transformation directly. The PAI header follows the name-addr spec and the params are part of the URI. So it would be something like one of the following. $(ai{uri.param,privacy}) [1] $(ai{nameaddr.param, privacy}) [2] You may even have to combine the two if the parameters are associated with the uri in the name-addr: $(ai{nameaddr.uri}{uri.param,privacy}) You should try printing out things like $(ai{nameaddr.uri}) or $(ai{uri.params}) to see what you get and help narrow down where the parameters are located. I always get confused by uri params vs host params vs name-addr params. I will point out that the P-Asserted-Identity spec doesn’t actually define a privacy parameter like this. Privacy for PAI is indicated by the Privacy header, which is a separate header. For indicating privacy of the PAI header contents, the Privacy header should have a value of “id”. In fact, these parameters all seem to be ones typically used with the Remote-Party-ID (RPID) header, not the PAI header. [3] [4] [5] You can check the presence and value of the Privacy header with something like this: if (is_present_hf("Privacy") && ($hdr(Privacy) =~ "id|user")) { // do stuff } [1] https://www.opensips.org/Documentation/Script-Tran-3-2#toc38 [2] https://www.opensips.org/Documentation/Script-Tran-3-2#toc70 [3] https://datatracker.ietf.org/doc/html/rfc3325 [4] https://datatracker.ietf.org/doc/html/rfc3323 [5] https://datatracker.ietf.org/doc/html/draft-ietf-sip-privacy-04 Ben Newlin From: Users on behalf of Mickael MONSIEUR Date: Monday, November 29, 2021 at 9:32 AM To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] Parse P-Asserted-Identity No more result with: xlog("L_NOTICE","P-Asserted-Identity param = $(hdr(P-Asserted-Identity){param.value,privacy})\n"); Nov 29 14:17:13 [16103] P-Asserted-Identity param = Le lun. 29 nov. 2021 à 13:44, Mickael MONSIEUR a écrit : > > Hello, > > xlog("L_NOTICE","P-Asserted-Identity params = $(ai{param.value,privacy})\n"); > > Nov 29 13:43:34 [15988] P-Asserted-Identity params = > > Le lun. 29 nov. 2021 à 13:32, David Villasmil > a écrit : > > > > https://www.opensips.org/Documentation/Script-Tran-2-4#toc60 > > > > Regards, > > > > David Villasmil > > email: david.villasmil.w...@gmail.com > > phone: +34669448337 > > > > > > On Mon, Nov 29, 2021 at 12:22 PM Mickael MONSIEUR > > wrote: > >> > >> Hello, > >> > >> My provider add to my INVITE's : > >> > >> P-Asserted-Identity: "Anonymous" > >> ;party=calling;privacy=yes;screen=no > >> > >> Whether the call should be Anonymized to end-users. > >> > >> How to get the value of "privacy" ? > >> > >> I try: > >> > >> if( $(ai{privacy}) == "yes" ) > >> > >> But it does not work. (error when starting opensips) > >> > >> Thanks > >> > >> ___ > >> Users mailing list > >> Users@lists.opensips.org > >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Parse P-Asserted-Identity
No more result with: xlog("L_NOTICE","P-Asserted-Identity param = $(hdr(P-Asserted-Identity){param.value,privacy})\n"); Nov 29 14:17:13 [16103] P-Asserted-Identity param = Le lun. 29 nov. 2021 à 13:44, Mickael MONSIEUR a écrit : > > Hello, > > xlog("L_NOTICE","P-Asserted-Identity params = $(ai{param.value,privacy})\n"); > > Nov 29 13:43:34 [15988] P-Asserted-Identity params = > > Le lun. 29 nov. 2021 à 13:32, David Villasmil > a écrit : > > > > https://www.opensips.org/Documentation/Script-Tran-2-4#toc60 > > > > Regards, > > > > David Villasmil > > email: david.villasmil.w...@gmail.com > > phone: +34669448337 > > > > > > On Mon, Nov 29, 2021 at 12:22 PM Mickael MONSIEUR > > wrote: > >> > >> Hello, > >> > >> My provider add to my INVITE's : > >> > >> P-Asserted-Identity: "Anonymous" > >> ;party=calling;privacy=yes;screen=no > >> > >> Whether the call should be Anonymized to end-users. > >> > >> How to get the value of "privacy" ? > >> > >> I try: > >> > >> if( $(ai{privacy}) == "yes" ) > >> > >> But it does not work. (error when starting opensips) > >> > >> Thanks > >> > >> ___ > >> Users mailing list > >> Users@lists.opensips.org > >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > ___ > > Users mailing list > > Users@lists.opensips.org > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Parse P-Asserted-Identity
Hello, xlog("L_NOTICE","P-Asserted-Identity params = $(ai{param.value,privacy})\n"); Nov 29 13:43:34 [15988] P-Asserted-Identity params = Le lun. 29 nov. 2021 à 13:32, David Villasmil a écrit : > > https://www.opensips.org/Documentation/Script-Tran-2-4#toc60 > > Regards, > > David Villasmil > email: david.villasmil.w...@gmail.com > phone: +34669448337 > > > On Mon, Nov 29, 2021 at 12:22 PM Mickael MONSIEUR > wrote: >> >> Hello, >> >> My provider add to my INVITE's : >> >> P-Asserted-Identity: "Anonymous" >> ;party=calling;privacy=yes;screen=no >> >> Whether the call should be Anonymized to end-users. >> >> How to get the value of "privacy" ? >> >> I try: >> >> if( $(ai{privacy}) == "yes" ) >> >> But it does not work. (error when starting opensips) >> >> Thanks >> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Parse P-Asserted-Identity
https://www.opensips.org/Documentation/Script-Tran-2-4#toc60 Regards, David Villasmil email: david.villasmil.w...@gmail.com phone: +34669448337 On Mon, Nov 29, 2021 at 12:22 PM Mickael MONSIEUR < mickael.monsi...@gmail.com> wrote: > Hello, > > My provider add to my INVITE's : > > P-Asserted-Identity: "Anonymous" > ;party=calling;privacy=yes;screen=no > > Whether the call should be Anonymized to end-users. > > How to get the value of "privacy" ? > > I try: > > if( $(ai{privacy}) == "yes" ) > > But it does not work. (error when starting opensips) > > Thanks > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Parse P-Asserted-Identity
Hello, My provider add to my INVITE's : P-Asserted-Identity: "Anonymous" ;party=calling;privacy=yes;screen=no Whether the call should be Anonymized to end-users. How to get the value of "privacy" ? I try: if( $(ai{privacy}) == "yes" ) But it does not work. (error when starting opensips) Thanks ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users