[Asterisk-code-review] res_pjsip_pidf: Cisco phone presence enablement (asterisk[master])

George Joseph asteriskteam at digium.com
Tue Nov 12 12:13:46 CST 2019


George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13162 )

Change subject: res_pjsip_pidf: Cisco phone presence enablement
......................................................................


Patch Set 5: Code-Review-1

I think this will work but i'd like to propose an alternative...
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.

This way you don't have to mess with res_pjsip_pubsub and mung up the provided accept based on the UA.

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?


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13162
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ib5a2944de0e280d3c92eed42d91a0bcb0bcf387c
Gerrit-Change-Number: 13162
Gerrit-PatchSet: 5
Gerrit-Owner: snuffy <snuffy22 at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Tue, 12 Nov 2019 18:13:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191112/ef3d5758/attachment.html>


More information about the asterisk-code-review mailing list