<p>Thank you for the advice, <a href="https://github.com/miconda" class="user-mention">@miconda</a>.  I believe this may be a bug in PJSIP's header parsing (<a href="https://trac.pjsip.org/repos/browser/pjproject/trunk/pjsip/src/pjsip/sip_parser.c#L1128">https://trac.pjsip.org/repos/browser/pjproject/trunk/pjsip/src/pjsip/sip_parser.c#L1128</a>).  I'm not a C coder, but I've learned to troll through the code until I find something reasonable. Perhaps you can spot something in there.  I have requested to join the PJSIP mailing list to ask about this issue.</p>

<p>I asked originally about the quoting because I noticed Kamailio does quote the "received" parameter in the Contact header when it's sent back to a UAC:</p>

<pre><code>SIP/2.0 200 OK.
v: SIP/2.0/UDP 10.1.1.1:5060;rport=5060;branch=z9hG4bKPjCF9fXKT.TUYCvcI8L4gj70nJMeMYZwXR;received=10.1.1.2.
f: "Test" <sip:test@example.com>;tag=fFfFWPFbM71fqOQLp9biV6jtcZy-M3Ja.
t: "Test" <sip:test@example.com>;tag=ac90c8713242940d16090974f12e49d3.d0ca.
i: ZU0l8HgtMQ80aFG.P6LdNwCTtFiAlTBr.
CSeq: 895 REGISTER.
Contact: <sip:test@10.1.1.1:5060;ob>;expires=900;received="sip:10.1.1.2:5060".
Supported: outbound.
Content-Length: 0.
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/120#issuecomment-90752535">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZePPOaZRSbDItMmqdAH6qScHKDRcks5n9FbCgaJpZM4D7Ux0.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/120#issuecomment-90752535"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>