FOSDEM - 2 fvrier 2020 Sp Speaker prese sentation Speaker name: - - PowerPoint PPT Presentation

fosdem 2 f vrier 2020 sp speaker prese sentation
SMART_READER_LITE
LIVE PREVIEW

FOSDEM - 2 fvrier 2020 Sp Speaker prese sentation Speaker name: - - PowerPoint PPT Presentation

FOSDEM - 2 fvrier 2020 Sp Speaker prese sentation Speaker name: Jehan Monnier Function: Software engineer since 1999 Involved in Linphones development since 2010. Agen Ag enda Video intercom uses cases. Introduction to SIP VoIP


slide-1
SLIDE 1

FOSDEM - 2 février 2020

slide-2
SLIDE 2

Sp Speaker prese sentation

Speaker name: Jehan Monnier Function: Software engineer since 1999 Involved in Linphone’s development since 2010.

slide-3
SLIDE 3
  • Video intercom uses cases.
  • Introduction to SIP VoIP technologies.
  • Building a VoIP network on Raspberry pi using

Linphone’s softwares.

  • What’s next.

Ag Agen enda

slide-4
SLIDE 4
slide-5
SLIDE 5

Home screen Door entry camera

slide-6
SLIDE 6
slide-7
SLIDE 7

Home screen Door entry camera

???

slide-8
SLIDE 8
slide-9
SLIDE 9

Home screen Door entry camera

Internet

slide-10
SLIDE 10

Home screen Door entry camera

Internet VOIP(SIP/RTP) VOIP(SIP/RTP) VOIP(SIP/RTP) VOIP(SIP/RTP)

slide-11
SLIDE 11

Vo VoIP technologies

  • Based on 2 main IETF standards
  • Session Initiation Protocol (RFC3261)
  • Real Time Transport (rfc3550)
slide-12
SLIDE 12

SI SIP RFC3261 in sh short

  • Transaction based text protocol standardized in

early 2000 inspired by HTTP.

  • Main components are:
  • SIP user agents for client part initiating or

receiving calls.

  • SIP proxies for message routing.
slide-13
SLIDE 13

RT RTP RFC3550 in short

  • UDP based protocol to exchange media stream in

a packetized way.

slide-14
SLIDE 14

Door entry camera

SIP & RTP connection

Home screen

SIP/RTP user-agent SIP/RTP user-agent

slide-15
SLIDE 15

Ha Hardware e Req equirem emen ents

  • Door entry camera should be able to

capture video and capture/playback audio.

  • Home screen should be able to

display video and capture/playback audio.

slide-16
SLIDE 16

So Software requirements

  • Door entry camera running Linphone

SIP/RTP User Agent on Gnu/Linux.

  • Home screen running Linphone

SIP/RTP user agent on Gnu/Linux ,

slide-17
SLIDE 17

Door entry camera

SIP/RTP connection

Home screen

SIP user-agent SIP user-agent

slide-18
SLIDE 18
  • Command line front end

controlled by a Unix pipe with Ea Early Media Feature.

  • Command example:

call all si sip:home mescre screen@m @myhouse se

SIP user-agent

Door entry camera

slide-19
SLIDE 19

Early y Media ???

  • For a regular call, audio/video only start after caller

has accepted the call.

  • Early media is way to start audio and video exchange

before caller call pick up.

  • Early Media is used to send ha

half way video preview from door entry camera to an home screen.

slide-20
SLIDE 20

Linpho Linphone ne-dae daemo mon: n:

  • Source code:

https://gitlab.linphone.org/BC/public/linphone-sdk

  • Yocto packaging

https://wiki.linphone.org/xwiki/wiki/public/view/Linp hone/Building%20Linphone%20with%20Yocto/

slide-21
SLIDE 21

Linphone-daemon controlled by a Python script

#!/usr/bin/python import socket import time from gpiozero import Button def call_out(): s = socket.socket(socket.AF_UNIX) s.connect("/tmp/doorbell") s.send("call sip:homescreen@myhouse") print(s.recv(8192)) s.close() button = Button(4) button.when_pressed = call_out while True: time.sleep(1)

pi@door-entry>linphone-daemon --pipe doorbell –C &

slide-22
SLIDE 22
  • Display on + auto-answer.

Home screen

SIP user-agent

pi@home-screen> linphone-daemon -D --auto-answer &

slide-23
SLIDE 23

Home screen Door entry camera

VOIP(SIP/RTP) VOIP(SIP/RTP) VOIP(SIP/RTP)

slide-24
SLIDE 24

Flexisip embedded SIP UA SIP Proxy SIP UA

Linphone based app

SIP/RTP connection

Door entry camera Home screen

slide-25
SLIDE 25

Fl Flexi xisi sip SIP Proxy y with Early y Media Call Forki king.

  • Source code:

https://gitlab.linphone.org/BC/public/flexisip

  • Documentation:

http://www.linphone.org/technical-corner/flexisip

  • Yocto packaging

https://wiki.linphone.org/xwiki/wiki/public/view/Linp hone/Building%20Linphone%20with%20Yocto/

slide-26
SLIDE 26

Early y media call forki king ???

  • Early Media is used to send video preview from door

entry camera to the home screen.

  • Video previous should be delivered to all ringing

devices (I.E home screen and smartphone app)

  • Early media call forking is about sending video

previous packets from call initiator to all ringing devices.

slide-27
SLIDE 27

+ [module::Authentication] enabled=true auth-domains=myhouse db-implementation=file datasource=/etc/flexisip/passwd [module::Registrar] reg-domains=myhouse version:1 homescreen@myhouse clrtxt:secret ; alice@myhouse clrtxt:secret ;

  • pi@home-screen> flexisip -c /etc/flexisip/flexisip.conf
slide-28
SLIDE 28

Door entry camera Home screen SIP proxy Smartphone app Home screen

INVITE(homescreen) INVITE(homescreen) INVITE(homescreen) video RTP (send only) video RTP (send only) video RTP (send only) 183 183 183 183 REGISTER 401 REGISTER 200 REGISTER 401 REGISTER 200

slide-29
SLIDE 29

Flexisip embedded SIP user-agent

Linphone based app

SIP/RTP connection

Internet

SIP Proxy SIP UA

Door entry camera Home screen

slide-30
SLIDE 30

Fl Flexi xisi sip SIP Proxy y with Early y Media Call Forki king and Static Route.

  • Definition of a broadcast sip uri

sip:sip:everyone@myhouse targeting sip:homescreen@myhouse and sip:bob@sip.linphone.org

  • Definition of static route in /etc/flexisip/flexisip.conf

[module::Registrar] reg-domains=myhouse static-records-file=/etc/flexisip/routes.conf

  • File =/etc/flexisip/routes.conf

<sip:everyone@myhouse> <sip:homescreen@myhouse>, <sip:bob@sip.linphone,org>

slide-31
SLIDE 31

Door entry camera Home screen SIP proxy Smartphone app (bob) Home screen

INVITE(everyone) INVITE(homescreen) INVITE(bob)) 183 183 183 REGISTER 200

Public Internet SIP proxy

INVITE(bob) 183 video RTP (send only) video RTP (send only) 183 video RTP (send only) video RTP (send only)

slide-32
SLIDE 32

Security y Con Consideration

  • ns
  • Use SIP TLS/SRTP everywhere.
  • Store Flexisip users password in an hashed form.
slide-33
SLIDE 33

Wha What t els lse ?

  • Calling the door entry camera from a smartphone.
  • Possible, but strong security requirements.
  • Opening the door from a smartphone
  • Can be done using SIP messages or just DTMF.
  • Using mdns to discover homescreen
  • https://www.linphone.org/news/sip-network-

deployment-made-easy-thanks-mdns

  • Push notification to reach mobile apps
  • Flexisip SIP proxy does support both Apple and

Android push notification.

  • Interworking with existing door entry camera.
  • Many entry door camera providers do support SIP.
  • For better control, develop your own application on

top of liblinphone instead of Linphone-daemon

slide-34
SLIDE 34

Thank you !