<p style="white-space: pre-wrap; word-wrap: break-word;">I think this will work but i'd like to propose an alternative...<br>Instead of creating a body supplement module, create a body generator module that registers as "cpim-pidf+xml".  In that module's allocate_body callback, call ast_sip_pubsub_generate_body_content for "pidf+xml".  That will give you an ast_str with the normal pidf+xml in it.  You can then call pj_xml_parse to turn it into an XML node and return that as the body.  When your generate_body_content function gets called, you just add your cisco specific stuff.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This way you don't have to mess with res_pjsip_pubsub and mung up the provided accept based on the UA.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Regardless of the solution, the big question is... Will this apply to ALL Cisco phones and/or all phones that ask for "cpim-pidf+xml" or is it only some Cisco phones or some firmwares?<br></p><p>Patch set 5:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13162">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13162">change 13162</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13162"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ib5a2944de0e280d3c92eed42d91a0bcb0bcf387c </div>
<div style="display:none"> Gerrit-Change-Number: 13162 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: snuffy <snuffy22@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-CC: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 12 Nov 2019 18:13:46 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>