[asterisk-dev] Recommendations for using a SIP stack with Asterisk

Saúl Ibarra Corretgé saghul at gmail.com
Tue Nov 13 06:50:01 CST 2012


Faidon Liambotis wrote:
> On 11/13/12 13:14, Saúl Ibarra Corretgé wrote:
>> I have some experience in this area and I can tell you we had to patch
>> PJSIP and there was no way around.
>
> If that's the case, then I'd say that PJSIP would be the wrong choice then.
>
>> Well, dependencies can be troublesome, look at libstrp. Upstream looks
>> abandoned and the version some distros package didn't contain all fixes
>> which were on CVS and some of them were pretty critical. Guess what,
>> PJSIP bundles it. And PortAudio. And more of them, see third_party/.
>
> Yikes! So, this embedding effect recurses into PJSIP, where it bundles
> all kinds of forked libraries within it? Where does that stop? This is
> no way to maintain a project, that's a maintainability and security
> nightmare.
>

Well, even if PJSIP is a generic SIP stack, it has a media layer and a 
very high level API for creating clients. We are doing a server here, so 
none of that is needed. They can all go away, Asterisk can probably just 
use SIP API, the SIPEvent API, and the ICE bits. But my point still 
serves as an example.

Sofia-SIP is a pure SIP library with no media stack and already packaged 
for many distros IIRC, but I'd rather pick a superior stack (not sure if 
that's the case) and tailor it to my needs that stick with a worse stack 
just because is more "distro friendly". Also, nothing is written in 
stone (/me thinks) things can be improved over time.

>> I think you are over optimistic about how PJSIP's internals work and how
>> easy it is to integrate it with another project.
>
> Note I've stated many times that everything I said should be applied as
> criteria for *picking* a stack. If PJSIP can't be made to work like this
> then I wholeheartedly believe that it shouldn't be used.
>

PJSIP is a great library, don't get me wrong, but it does a lot of 
things that Asterisk doesn't need. And because it's modular Asterisk can 
pick what it needs. This "picking" may imply forking the project, 
removing the unneeded parts and sticking with the needed ones, plus some 
patches that I'm sure that will be needed.


Regards,

-- 
Saúl Ibarra Corretgé
http://saghul.net/blog | http://about.me/saghul



More information about the asterisk-dev mailing list