Either you haven’t correctly copied this, or your quote marks are not Quotation Marks, but rather a combination of Left Double Quotation Mark and RIght Double Quotation Mark.
Also the error message is reporting a null string, not a quotation mark.
Have you actually used UTF-8, as ISO-8859-1 may well created malformed UTF-8 code, which would cause a syntax error, in the actual SIP header.
The above uncertainties also mean that I can’t trust the position of the carat.
I don’t think the diaplan parser would invoke a yacc grammar, here, so I think we need to see where the value came from. I think the expression parser only gets invoked for $[…].
Call to GotoIf:
GotoIf($["${MASTER_CHANNEL(HeaderName)}" != ""]?x:y)
Log result:
GotoIf("PJSIP/xxxxxxxxxxxxx", ""{"?x:y") in new stack
The log result expected is:
GotoIf("PJSIP/xxxxxxxxxxxxx", "1?x:y") in new stack
The quotes in the json object are being processed by Asterisk. If you are just looking to see if the header has content and aren’t validating the content then wouldn’t this work?