At my job, the simple things like list management, network stuff, graphics and async communications are put in libraries and used in all our projects.
If something "complex" is available as third party source, we'll use that to give us a jumpstart.
In case of the SIP stack we bought, it was a fast start, but through the years there are so many things changed and added that you won't find a piece of the original code.
Recently I had the same with a 3rd party CORBA stack. It helped us interfacing, but it was bulky, complex and hard to understand. It had issues but we could work around it until early this year. It appeared to report wrong errors when a connection dropped (this was critical to us). So the lib was dropped and I rewrote a new, simpler implementation based on our own network layer.
When we needed SRTP, we could implement that ourselves, but encryption is hard to debug. Cisco had a nice simple, understandable C lib source, so we decided to use that as external lib.
Sometimes there is no lib available, only C sample code. In that case I had a choice to make it a C lib and use it, or pascalize the source. It took me, at that time, 2 weeks to have a working ACELP audio codec. Later I decided to do the same for a AMR-WB codec. This one looked similar, but took more than a month to debug it. Now I'm at a point where an OPUS codec is needed. It can be used as lib which would mean we have to distribute it, or I can convert it to pascal so we have it internally... (i think I go for the lib version)
Marc