I tried working around this by escaping each dblquote char with a backslash, or using \x22 or \042 in lieu, and none paid off.
The same spurious chars get prepended if one attempts to doublequote the keyname.
Most perniciously: when one backslash-escapes a set of doublequotes in the value side of the header then other, behaving custom SIP headers that one has added just start /not/ showing up. Havoc ensues.
So my question would then be: how does one include the doublequote char (and only the doublequote char), at will, in the keyname and value side of a SIP header?
Failing my question bearing any fruit I’d then suggest this is a bug?
Whilst re-iterating Stewart’s question about why you are not using Asterisk’s built in P-Asserted-Identity processing, could I also ask why do you need the quotes in the first place? Even allowing that you didn’t mark it up properly for the forum, the following would have been syntactically valid and would be treated the same as one with the quotes as a well as the angle brackets, by all normal implementations:
[quote=“Stewart1, post:2, topic:77507, full:true”]what do you need in P-Asserted-Identity that the built-in features won’t do?[/quote]I am able to send (manually constructed) SIPheader “Privacy=id”. However if I activate the GUI feature to sendPAI then it stops sending header “Privacy=id” (as I posted here: [Bug?] SIPheader WARS: P-Asserted-ID 'kills' Privacy:id ?!?!?! ).
So In response I’m trying to send my own PAI header, hoping that if I do it myself then it won’t ‘kill’ my “Privacy=id” header.
It is about the same overall goal and it is clearly necessary to read it in order to understand why you are doing what you are doing in the current thread.
Unfortunately, I never read chan_pjsip in enough depth to be able to easily find my way around it, but it seems very weird that it, or the FreePBX function is adding an HTTP URL. The first thing I’d want to look at (after fully investigating the way that Privacy is generated) would be a verbose log of the add header function in FreePBX, to eliminate that as a source of the mangling.
I suspect these threads are really about not having caller ID marked as unverified, as a result of voip.ms being slow to support STIR/SHAKEN well:
I can’t find anything about it on their searchable web site, but maybe Policy: Id causes them to present a network provider ID. However, I can’t think of any good reason for sending them PAI in the first place, if that is what is wanted. Maybe they are going to provide verified status if the user provided ID matches the network provided one, in which case that is probably the best approach, rather than sending one they must mark as unverified, then saying don’t use it.
I do half wonder if the OP is expecting the Display Name to get through, but privacy: id appears to me to be intended to affect the whole ID, not just the machine processable part.
There seem to be a lot of voip.ms users here, so either there is going to be a rush of topics, if the change just went in and is causing them problems, or most people have an acceptable solution already.
Actually, they’re about precisely what they say they are about.
As it happens my interest in these various minutiae of how things work is due to my interest in mimicing what *67 does on ILEC wireline, but one does not need to know that to understand my inquiry here, say about dblquotechars.
I don’t know where in the dialplan you have those lines but if you want the PJSIP header applied to the outbound call leg it has to be done like I did with the b-leg parameter on the Dial command. Otherwise you are setting a SIP header on the a-leg which probably isn’t what you want.