Implementing SIP for WebRTC on iOS

474 views
Skip to first unread message

ta...@utribo.com

unread,
Aug 20, 2015, 10:01:52 AM8/20/15
to discuss-webrtc

I am building an RTC iOS app client. I am using the google WebRTC iOS library. However, since WebRTC doesn't implement signalling I am searching for an easy way to implement a SIP stack at the signalling layer. I tried Pjsip but it didn't work:

  • First, I followed this Pjsip guide Integrating Third Party Media Stack into PJSUA-LIB but I didn't know how to proceed, especially that both projects have a big overlap (both implements NAT traversal and SDP). Also, the Pjsip is in C, WebRTC is in Obj-c and the whole app will be in Swift.
  • Second, I created two separate projects, one for Pjsip and one for WebRTC and both ran successfully on iOS. Then I tried to combine the two projects in one as a first step, but it turned out that both projects use libsrtp but different versions of it, the thing which caused conflicts and compiling errors.

I am not sure if Pjsip is really what I need, especially that WebRTC already has all the features I need except for SIP signalling. I would be thankful if anyone can guide me to how to proceed with Pjsip or give me another open-source easy to use SIP library.

Thanks.

itay bia

unread,
Aug 20, 2015, 2:18:27 PM8/20/15
to discuss-webrtc
i can't go into detail, but i'd suggest you separate the components: media processing, signaling and transport. webrtc and pjsip both have all 3 (pjsip with sip, and peerconnection from webrtc with jingle). you need to decide what you want from which and remove it from the other.
so, pjsip would do the sip part, webrtc will do the media (the basic webrtc library, not peerconnection), and one of them should take care of the transport. this can probably be done with either one of them by registering your code as an external transport and either forwarding the packets from pjsip to webrtc, or the transport parameters from pjsip's signaling to webrtc's peerconnection probably (though i don't know its capabilities that well).

one thing i didn't get though, webrtc is in c++, only minimal parts of it are in objective-c, no?
Reply all
Reply to author
Forward
0 new messages