<div dir="ltr"><div class="gmail_default" style="font-family:arial narrow,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 5:04 AM, Joshua Colp <span dir="ltr"><<a href="mailto:jcolp@digium.com" target="_blank">jcolp@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">George Joseph wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm VERY frustrated with pjproject right now. Not the software itself<br>
(well maybe a little) but the fact that troubleshooting is a nightmare<br>
because we can't control what version of pjproject was installed along<br>
with Asterisk and we can't control what options it was compiled with.<br>
This leads to issue where we're getting great debugging from Asterisk<br>
but nothing at all from pjproject because the user installed from their<br>
distro and it has no debugging info. So now we have to walk them though<br>
getting pjproject from source, etc, etc. This can also cause issues<br>
should Teluu change an API or some behavior that we're not prepared for<br>
and the user just does a 'yum update pjproject' and Asterisk dies. Then<br>
there's the issue where even though the verison is the same, the<br>
compiled-in options differ, some of them quite fatally. That unleashes<br>
a whole other mess.<br>
</blockquote>
<br></span>
There is the middle ground which is keep the ability to link against a shared system library if present but also bundle a pjproject and use it if the system library is not present (or you force the bundled version).</blockquote><div><br></div><div><div class="gmail_default" style="font-family:'arial narrow',sans-serif">I was also thinking we could statically link against the system-installed version but we're still back to the same problem where we have no clue at runtime what we're running against. </div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
pjproject was deeply embedded in 11 and I don't think that was right but<br>
I think we went too far in 13 by taking the hands-off approach. Maybe<br>
at the start of 13 it was ok, but we've since put chan_sip into<br>
"extended" support so we're pushing chan_pjsip as the supported stack,<br>
instead of it just being optional. Not to mention that chan_sip needs<br>
res_rtp_asterisk which is also dependent on pjproject. Can you see<br>
where I'm going? :)<br>
</blockquote>
<br></span>
In the current shared library method it is not a hard dependency.</blockquote><div><br></div><div><div class="gmail_default" style="font-family:'arial narrow',sans-serif">Strictly true but if you want ICE, TURN or STUN support, you need pjproject, no?</div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I propose that we bring pjproject into a new 'third-party' directory and<br>
statically link our res_pjsip* modules to it. We should NOT check it<br>
into the Asterisk repository however. Instead we should use scripts<br>
like get_mp3_source to get a specific pjproject version and a 'patches'<br>
directory that IS checked in that has things we've discovered we need.<br>
The patches should always be proposed upstream.<br>
<br>
It's a lot of work but I'm willing to dig in and I'll bet I could get a<br>
few volunteers to help.<br>
</blockquote>
<br></span>
>From a technical perspective you can not statically link each module to PJSIP, each module will end up with its own isolated running copy. You need to statically link it into one module (res_pjsip, or res_pjproject for example) and have it export all of the symbols to everything else. Additionally because all the symbols aren't actually being used the linker also likes to remove them unless you do magic to force them to be present regardless. This is how the PJSIP support was originally developed before shared library support was added to pjproject. If you go back in time almost everything needed to make it work in a bundled configuration is there already.</blockquote><div><br></div><div><div class="gmail_default" style="font-family:'arial narrow',sans-serif">I was nosing around 11 last night and realized that the plumbing is there. That's why I updated my level of effort. :)</div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Joshua Colp<br>
Digium, Inc. | Senior Software Developer<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>
Check us out at: <a href="http://www.digium.com" rel="noreferrer" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" rel="noreferrer" target="_blank">www.asterisk.org</a><br>
<br></font></span></blockquote></div></div></div>