<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Oct 13, 2017 at 3:21 PM, Ludovic Gasc <span dir="ltr"><<a href="mailto:gmludo@gmail.com" target="_blank">gmludo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Certainly as you, we have more and more phone brands who are capable to read the XML from a NOTIFY when a phone rings to extract callerid and show that on the screen.</div><div><br></div><div>The issue is that it doesn't work on chan_sip, not planned to be fixed:</div><div><a href="https://issues.asterisk.org/jira/browse/ASTERISK-24488" target="_blank">https://issues.asterisk.org/ji<wbr>ra/browse/ASTERISK-24488</a></div><div><br></div><div>Moreover, the situation is worse with pjsip, because we have less information:</div><div><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26454" target="_blank">https://issues.asterisk.org/ji<wbr>ra/browse/ASTERISK-26454</a></div><div><br></div><div>For now, we have a backup plan with something similar of this: <a href="https://github.com/kettenbach-it/asterisk-snom-pickup-info-xml-agi" target="_blank">https://github.com/kette<wbr>nbach-it/asterisk-snom-pickup-<wbr>info-xml-agi</a></div><div>But with a better scalability and based on AMI command MessageSend, to be NAT compliant: <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_MessageSend" target="_blank">https://wiki.asteri<wbr>sk.org/wiki/display/AST/Asteri<wbr>sk+13+ManagerAction_MessageSen<wbr>d</a></div><div><br></div><div>However, we have now an internal incentive to have an integrated solution directly in Asterisk.</div><div><br></div><div>We have an internal C developer who can work on it full-time, but before to follow the rabbit in the hole, I'm pretty sure that if it was simply to enrich this function:</div><div><a href="https://github.com/asterisk/asterisk/blob/master/res/res_pjsip_dialog_info_body_generator.c#L101" target="_blank">https://github.com/asterisk/as<wbr>terisk/blob/master/res/res_pjs<wbr>ip_dialog_info_body_generator.<wbr>c#L101</a></div><div>The patch was already made and merged a long time ago.</div><div><br></div><div>Is it a way exists to implement that or it needs to re-implement a part of Asterisk ?</div></div></blockquote><div><br></div></span><div>Hi Ludovic,</div><div><br></div><div>Yep, that's the place.  dialog_info_generate_<wbr>body_content is the function you want to extend.   Just don't modify any of the existing attributes and if you need to add data fields to the ast_sip_exten_state_data structure (or any public structure) make sure to do so at the end of the structure to preserve binary compatibility.</div></div></div></div></blockquote><div><br></div><div>Hi George,</div><div><br></div><div>Certainly as people before us, we didn't find an obvious way to add that easily.<br>We are working on a B plan with an external daemon, because it's easier to us to maintain.</div><div>Maybe we might publish something under an open source license at the end, I don't know yet.</div><div><br></div><div>Regards.</div></div></div></div>