• Stars
    star
    237
  • Rank 168,852 (Top 4 %)
  • Language
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🤙Learning VoIP, RTP, pjsip and SIP

awesome voip Awesome

❤️ Support my app ❤️

❤️❤️😇😍🤘❤️❤️

Before working with Windows Phone and iOS, my life involved researching VoIP. That was to build a C library for voice over IP functionality for a very popular app, and that was how I got started in open source.

The library I was working with were Linphone and pjsip. I learn a lot of UDP and SIP protocol, how to build C library for consumption in iOS, Android and Windows Phone, how challenging it is to support C++ component and thread pool in Windows Phone 8, how to tweak entropy functionality in OpenSSL to make it compile in Windows Phone 8, how hard it was to debug C code with Android NDK. It was time when I needed to open Visual Studio, Xcode and Eclipse IDE at the same time, joined mailing list and followed gmane. Lots of good memories.

Today I find that those bookmarks I made are still available on Safari, so I think I should share here. I need to remove many articles because they are outdated or not available anymore. These are the resources that I actually read and used, not some random links. Hopefully you can find something useful.

This post focuses more about resources for pjsip on client and how to talk directly and with/without a proxy server.

First of all

Here are some of the articles and open sources made by me regarding VoIP, hope you find it useful

VoIP overview

Voice over Internet Protocol (also voice over IP, VoIP or IP telephony) is a methodology and group of technologies for the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet

  • Voice over IP Overview: introduction to VoIP concepts, H.323 and SIP protocol

  • Voice over Internet Protocol the wikipedia article contains very foundation knowledge

  • Open Source VOIP Software: this is a must read. Lots of foundation articles about client and server functionalities, SIP, TURN, RTP, and many open sources framworks

  • VOIP call bandwidth: a very key factor in VoIP application is bandwidth consumption, it’s good to not going far beyond the accepted limit

  • Routers SIP ALG: this is the most annoying, because there is NAT and many types of NAT, also router with SIP ALG

  • SIP SIMPLE Client SDK: introduction to SIP core library, but it gives an overview of how

SIP

The Session Initiation Protocol (SIP) is a communications protocol for signaling and controlling multimedia communication sessions in applications of Internet telephony for voice and video calls, in private IP telephone systems, as well as in instant messaging over Internet Protocol (IP) networks.

SIP server

  • Kamailio: this is the server that I used, and it plays well with lots of standard SIP clients, including pjsip. Debugging on this server was also a fun story

RFC

RTP, SIP clients and server need to conform to some predefined protocols to meet standard and to be able to talk with each other. You need to read RFC a lot, besides you need to read some drafts.

NAT

NAT solves the problem with lack of IP, but it causes lots of problem for SIP applications, and for me as well 😂

TCP

Learn how TCP helps SIP in initiating session and to turn in TCP mode for package sending

TLS

Learn about Transport Layer Security and SSL, especially openSSL for how to secure SIP connection. The interesting thing is to read code in pjsip about how it uses openSSL to encrypt messages

ICE

Learn about Interactive Connectivity Establishment, another way to workaround NAT

STUN and TURN

Learn about Session Traversal Utilities for NAT and Traversal Using Relays around NAT, another way to workaround NAT

ALG

Learn about [Application Layer Gateway](http://Application Layer Gateway) and how it affects your SIP application. This component knows how to deal and modify your SIP message, so it might introduce unexpected behaviours.

Voice quality

Learn about voice quality, bandwidth and fixing delay in audio

Echo

This is a very common problem in VoIP, sometimes we hear voice from the other and also from us. Learn how echo is made, and how to effectively do echo cancellation

Dual Tone

Learn how to generate dual tone to make signal in telecommunication

pjsip

PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol (SIP) with rich multimedia framework and NAT traversal functionality into high level API that is portable and suitable for almost any type of systems ranging from desktops, embedded systems, to mobile handsets.

Threading

pjsip uses Local Thread Storage which introduces very cool behaviors

Resampling

How to work with sample rate of the media stream

Memory and Performance

Audio

Video

I learn a lot regarding video capture, ffmpeg and color space, especially YUV

CSipSimple

There are many SIP client for mobile and desktop, microSIP, Jitsi, Linphone, Doubango, … They all follow strictly SIP standard and may have their own SIP core, for example microSIP uses pjsip, Linphone uses liblinphone, …

Among that, I learn a lot from the Android client, CSipSimple, which offers very nice interface and have good functionalities. Unfortunately Google Code was closed, so I don’t know if the author has plan to do development on GitHub.

I also participated a lot on the Google forum for user and dev. Thanks for Regis, I learn a lot about open source and that made me interested in open source.

You can read What is a branded version

I don’t make any money from csipsimple at all. It’s a pure opensource and free as in speech project. I develop it on my free time and just so that it benefit users. That’s the reason why the project is released under GPL license terms. I advise you to read carefully the license (you’ll learn a lot of things on the spirit of the license and the project) : http://www.gnu.org/licenses/gpl.html To sump up, the spirit of the GPL is that users should be always allowed to see the source code of the software they use, to use it the way they want and to redistribute it.

RTP Proxy

Because of NAT or in case users want to talk via a proxy, then a RTP proxy is needed. RTPProxy follows standard and works well with Kamailio

Other related articles

IP change

IP change during call can cause problem, such as when user goes from Wifi to 4G mode

RTP and RTCP

Learn about [Realtime transport control protocol](http://Real-time Transport Protocol) and how that works with RTP

Codec

To reduce payload size, we need to encode and decode the audio and video package. We usually use Speex and Opus. Also, it’s good to understand the .wav format

Building pjsip for Windows Phone 8

Windows Phone 8 introduces C++ component , changes in threading, VoIP and audio background mode. To do this I need to find another threadpool component and tweak openSSL a bit to make it compile on Windows Phone 8. I lost the source code so can’t upload the code to GitHub 😢. Also many links broke because Nokia was not here any more

Porting OpenSSL to Windows Phone 8

Firstly, learn how to compile, use OpenSSL. How to call it from pjsip, and how to make it compile in Visual Studio for Windows Phone 8. I also learn the important of Winsock, how to port a library. I struggled a lot with porting openSSL to Windows RT, then to Windows Phone 8

A lot of links were broken 😢 so I can’t paste them all here.

C and C++

Since pjsip, rtpproxy and kamailio are all C and C++ code. I needed to have a good understanding about them, especially pointer and memory handling. We also needed to learn about compile flags for debug and release builds, how to use Make, how to make static and dynamic libraries.

More Repositories

1

awesome-ios-animation

☔ A collection of iOS animation repos
5,305
star
2

awesome-ios-architecture

🏯 Better ways to structure iOS apps
5,056
star
3

PushNotifications

🐉 A macOS, Linux, Windows app to test push notifications on iOS and Android
JavaScript
2,230
star
4

DeepDiff

🦀Amazingly incredible extraordinary lightning fast diffing in Swift
Swift
2,049
star
5

IconGenerator

🍱 A macOS app to generate app icons
JavaScript
1,403
star
6

RoughSwift

🎃 Create hand-drawn, sketchy, comic shape in Swift
Swift
1,104
star
7

FinderGo

🐢 Open terminal quickly from Finder
Swift
1,084
star
8

Snowflake

❄️ SVG in Swift
Swift
956
star
9

GifCapture

🏇 Gif capture app for macOS
Swift
916
star
10

awesome-machine-learning

🎰 A curated list of machine learning resources, preferably CoreML
794
star
11

Swiftlane

🚀 Build utilities in pure Swift
Swift
692
star
12

blog

🍁 What you don't know is what you haven't learned
666
star
13

awesome-swiftui

🌮 Awesome resources, articles, libraries about SwiftUI
642
star
14

EasyConfetti

🎊 Fancy confetti effects in Swift
Swift
561
star
15

XcodeWay

⛵ An Xcode Source Editor Extension that helps navigating to many places easier
Swift
550
star
16

Smile

😄 Emoji in Swift
Swift
512
star
17

EasyAnchor

⚓️ Declarative, extensible, powerful Auto Layout
Swift
455
star
18

EasyStash

🗳Easy data persistence in Swift
Swift
377
star
19

Scale

🎏 Unit converter in Swift
Swift
323
star
20

EasyDropdown

💧 Fantastic dropdown in Swift
Swift
309
star
21

XcodeColorSense2

🍉 An Xcode source editor extension that shows hex color info
Swift
285
star
22

Arcane

🔱 CommonCrypto in Swift, and more
Swift
283
star
23

awesome-android-animation

💦 A collection of Android animation repos
Java
253
star
24

EasyTheme

👕👚 Theme management in Swift
Swift
241
star
25

SwiftHash

🍕 MD5 in pure Swift
Swift
215
star
26

EasyClosure

🍩 Unified communication patterns with easy closure in Swift
Swift
201
star
27

Github.swift

:octocat: Unofficial GitHub API client in Swift
Swift
186
star
28

emoji

❤️ List of emojis
Swift
163
star
29

SwiftSnippets

🍮 A collection of Swift snippets to be used in Xcode
Shell
162
star
30

Wave

🌊 Declarative chainable animations in Swift
Swift
127
star
31

awesome-online-earning

💰Ways to earn extra
124
star
32

Spek

🎏 Function builder BDD testing framework in Swift
Swift
122
star
33

FontAwesomeSwiftUI

Easy to use FontAwesome 5 in SwiftUI
Swift
97
star
34

Recipes

🍣Making Recipes iOS app
Swift
91
star
35

MathSolver

⌨️Camera calculator with Vision
Swift
87
star
36

XcodeColorSense

🎈 An Xcode plugin that makes working with color easier
Swift
77
star
37

Micro

🏎Fast diffing and type safe SwiftUI style data source for UICollectionView
Swift
76
star
38

Omnia

🗿 Everything your projects need to know
Swift
62
star
39

notes

📔 Issues and solutions I found during development, mostly iOS
62
star
40

Sketch-Action

🔎 A Sketch plugin to simulate Spotlight
Objective-C
59
star
41

MainThreadGuard

💂‍♂️ Tracking UIKit access on main thread
Swift
58
star
42

EasyFake

🤹‍♀️ Fake data generation in Swift
JavaScript
57
star
43

Reindeers

❄️ XML and HTML parser in Swift
Swift
55
star
44

awesome-git-commands

🍴 Indispensable git commands for everyday use
55
star
45

RxLifeCycle

🐹 Easy life cycle observation
Swift
53
star
46

Upstream

⛲️ Adapted Data Source in Swift and a little bit more
Swift
53
star
47

BigBigNumbers

🔢Say the number out loud
Swift
49
star
48

GifMagic

💈 Gif maker and extractor in Swift
Swift
48
star
49

awesome-android-architecture

🏰 Better ways to structure Android apps
45
star
50

AppStoreConnect

🍎 Interact with AppStoreConnect
Swift
45
star
51

TestTarget

🐳 Notes on configuring test targets
Swift
44
star
52

PhotoFeed

🛵 Instagram in Swift 4
Swift
43
star
53

awesome-conference-videos

🎸 Conference videos. Visit http://learntalks.com/
40
star
54

CollectionUpdateExample

🛶 Demo batch update in UITableView and UICollectionView
Swift
38
star
55

Construction

👷 The many ways to construct and configure your entity
Swift
34
star
56

PastePal

PastePal is the best universal clipboard manager for Mac, iPhone and iPad.
31
star
57

github-extended

:octocat: A Chrome extension to discover more repositories
JavaScript
30
star
58

EasyNetworking

🛰Easy networking with async/await
Swift
28
star
59

Runtime-Headers

💿 iOS, macOS runtime headers
Objective-C
28
star
60

UsingPlayground

👶 Demo how to use Playground
Swift
26
star
61

EasySwiftUI

🍰 Extra sugar for SwiftUI
Swift
25
star
62

Farge

🎈Tell the name of hex color
Swift
24
star
63

Avengers

👾Demo how to use CoreML with IBM Watson, Azure Custom Vision, Turi Create
Swift
21
star
64

ISO8601

🎗 Super lightweight ISO8601 Date Formatter in Swift
Swift
21
star
65

SlidingMenu

🎿 Demo how to create sliding menu on Android
Java
20
star
66

Paramount

🗼 Like Flipboard FLEX, but allows custom action
Swift
20
star
67

Codelime

Codelime is a powerful code snippet manager with many dev tools for iOS development.
19
star
68

DynamicTableViewCellHeight

🍟 Demo how to use Autolayout to make varying row height
Objective-C
18
star
69

github-chat

💬 A Chrome extension to enable chat within GitHub
JavaScript
18
star
70

Resolver

🎊 A simple resolver in Swift
Swift
15
star
71

archives

🚣 Only deliberate practice will make you better
Objective-C
14
star
72

ParticlePlayground

🎊 A Swift playground to play with CAEmitterLayer
Swift
14
star
73

json_resolve

🐰Easy resolving deep json using keypath in Dart
Dart
12
star
74

Then

🏃 Promise A+ in Swift
Swift
11
star
75

LighterAppDelegate

🎣 Lighter AppDelegate by dispatching events
Swift
10
star
76

Xkcd

🦄 Simple Xkcd iOS app
Swift
8
star
77

Border

📐 Make border for all views
Swift
8
star
78

Xmas

🎅 🎄 ⛄ Xmas plugin for Xcode
Objective-C
7
star
79

github-changelogs-maker

🍻 Generate changelogs between 2 latest releases
JavaScript
7
star
80

linphone-iphone

Forked from linphone.org
Objective-C
7
star
81

EasyTracker

🕵️ Trackers in Swift
Swift
6
star
82

FantasticDisplay

🎢 Fantastic HUD and toast in Swift
Swift
6
star
83

ComputerScienceSwift

👨‍💻 Practice computer science in Swift
Swift
6
star
84

PushHero

Push Hero is a native macOS application written in pure Swift that allows us to easily test push notifications
6
star
85

onmyway133

What you don't know is what you haven't learned
5
star
86

Minion

🐝 Working with Xcode plugins
Swift
5
star
87

SketchHeaders

💿 Headers from Sketch
Objective-C
4
star
88

homebrew-formulae

🚗 Homebrew formulae
Ruby
3
star
89

DarkSide

🌌 My dark theme based on Atom One Dark
Shell
3
star
90

chat_webrtc

⌨️ Simple chat application using Node.js and WebRTC Data Channel
JavaScript
3
star
91

slackbot-yoda

💍 Slackbot Yoda
JavaScript
2
star
92

onmyway133.github.io

Showcase
HTML
2
star
93

rtpproxy

🥂 Forked from http://www.rtpproxy.org/ with IP handover support
C
2
star
94

android-architecture-components-kotlin

🥋 Samples for Android Architecture Components in Kotlin
Kotlin
2
star
95

traffic_simulator

🚗 Traffic simulator using enchant.js
JavaScript
2
star
96

Shipmunk

Search, bookmark and track keyword rating for your favorite apps
2
star
97

Dust

🚀 Unofficial, simple push notification
Swift
1
star
98

MarqueeTextBlock

🌴 How to make marquee TextBlock on Windows Phone
C#
1
star