Giter VIP home page Giter VIP logo

baresip's Introduction

baresip README

Baresip Logo

Baresip is a portable and modular SIP User-Agent with audio and video support.
Copyright (c) 2010 - 2024 Alfred E. Heggestad and Contributors
Distributed under BSD license

Build Lint OpenSSL and LibreSSL Valgrind

Features:

  • Call features:

    • Unlimited number of SIP accounts
    • Unlimited number of calls
    • Unattended call transfer
    • Auto answer
    • Call hold and resume
    • Microphone mute
    • Call waiting
    • Call recording
    • Peer to peer calls
    • Video calls
    • Instant Messaging
    • Custom ring tones
    • Repeat last call (redial)
    • Message Waiting Indication (MWI)
    • Address book with presence
    • Conferencing
  • Signaling:

    • SIP protocol support
    • SIP outbound protocol for NAT-traversal
    • SIP Re-invite
    • SIP Routes
    • SIP early media support
    • DNS NAPTR/SRV support
    • Multiple accounts support
    • DTMF support (RTP, SIP INFO)
    • Multicast sending & receiving
  • Security:

    • Signalling encryption (TLS)
    • Audio and video encryption (Secure RTP)
    • DTLS-SRTP key exchange protocol
    • ZRTP key exchange protocol
    • SDES key exchange protocol
  • Audio:

    • Low latency audio pipeline
    • High definition audio codecs
    • Audio device configuration
    • Audio filter plugins
    • Internal audio resampler for fixed sampling rates
    • Linear 16 bit wave format support for ringtones
    • Packet loss concealment (PLC)
    • Configurable ringtone playback device
    • Automatic gain control (AGC) and Noise reducation
    • Acoustic echo control (AEC)
    • Configurable audio sample format (Signed 16-bit, 24-bit, Float etc)
    • EBU ACIP (Audio Contribution over IP) Profile
  • Audio-codecs:

    • AAC
    • aptX
    • AMR narrowband, AMR wideband
    • Codec2
    • G.711
    • G.722
    • G.726
    • L16
    • MPA
    • Opus
  • Audio-drivers:

    • Advanced Linux Sound Architecture (ALSA) audio-driver
    • PulseAudio POSIX OSes audio-driver
    • Android OpenSLES audio-driver
    • Gstreamer playbin input audio-driver
    • JACK Audio Connection Kit audio-driver
    • MacOSX/iOS coreaudio/audiounit audio-driver
    • Portaudio audio-driver
    • Windows winwave audio-driver
  • Video:

    • Support for H.264, H.265, VP8, VP9, AV1 Video
    • Configurable resolution/framerate/bitrate
    • Configurable video input/output
    • Support for asymmetric video
    • Configurable video pixel format
    • Hardware acceleration for video encoder/decoder
  • Video-codecs:

    • AV1
    • H.264
    • H.265
    • VP8
    • VP9
  • Video-drivers:

    • iOS avcapture video-source
    • FFmpeg/libav libavformat/avdevice input
    • Direct Show video-source
    • MacOSX AVCapture video-source
    • Linux V4L/V4L2 video-source
    • X11 grabber video-source
    • DirectFB video-output
    • SDL2 video-output
    • X11 video-output
  • NAT-traversal:

    • STUN support
    • TURN server support
    • ICE support
    • NATPMP support
    • PCP (Port Control Protocol) support
  • Networking:

    • multihoming, IPv4/IPv6
    • automatic network roaming
  • Management:

    • Embedded web-server with HTTP interface
    • Command-line console over UDP/TCP
    • Command line interface (CLI)
    • Simple configuration files
    • MQTT (Message Queue Telemetry Transport) module
  • Profiles:

    • EBU ACIP (Audio Contribution over IP) Profile

Building

baresip is using CMake, and the following packages must be installed before building:

See Wiki: Install Stable Release or Wiki: Install GIT Version for a full guide.

Build with debug enabled

$ cmake -B build
$ cmake --build build -j
$ cmake --install build

Build with release

$ cmake -B build -DCMAKE_BUILD_TYPE=Release 
$ cmake --build build -j

Build with selected modules

$ cmake -B build -DMODULES="menu;account;g711"
$ cmake --build build -j

Build with custom app modules

$ cmake -B build -DAPP_MODULES_DIR=../baresip-apps/modules -DAPP_MODULES="auloop;vidloop"
$ cmake --build build -j

Build with clang compiler

$ cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
$ cmake --build build -j

Build static

$ cmake -B build -DSTATIC=ON
$ cmake --build build -j

Modules will be built if external dependencies are installed. After building you can start baresip like this:

$ build/baresip

The config files in $HOME/.baresip are automatically generated the first time you run baresip.

Build documentation

The API documentation can be build using doxygen.

$ doxygen mk/Doxyfile

By default the documentation is written to ../baresip-dox, if you want to change the destination directory you can change the OUTPUT_DIRECTORY in mk/Doxyfile.

Examples

  • Configuration examples are available in the examples directory.
  • Documentation on configuring baresip can be found in the Wiki.

License

The baresip project is using the 3-clause BSD license.

Contributing

Patches can be sent via Github Pull-Requests or to the Baresip mailing-list.

Design goals:

  • Minimalistic and modular VoIP client
  • SIP, SDP, RTP/RTCP, STUN/TURN/ICE
  • IPv4 and IPv6 support
  • RFC-compliancy
  • Robust, fast, low footprint
  • Portable C99 and C11 source code

Modular Plugin Architecture:

aac           Advanced Audio Coding (AAC) audio codec
account       Account loader
alsa          ALSA audio driver
amr           Adaptive Multi-Rate (AMR) audio codec
aptx          Audio Processing Technology codec (aptX)
aubridge      Audio bridge module
auconv        Audio sample format converter
audiounit     AudioUnit audio driver for MacOSX/iOS
aufile        Audio module for using a WAV-file as audio input
auresamp      Audio resampler
ausine        Audio sine wave input module
av1           AV1 video codec
avcapture     Video source using iOS AVFoundation video capture
avcodec       Video codec using FFmpeg/libav libavcodec
avfilter      Video filter using FFmpeg libavfilter
avformat      Video source using FFmpeg/libav libavformat
codec2        Codec2 low bit rate speech codec
cons          UDP/TCP console UI driver
contact       Contacts module
coreaudio     Apple macOS Coreaudio driver
ctrl_dbus     Control interface using DBUS
ctrl_tcp      TCP control interface using JSON payload
debug_cmd     Debug commands
directfb      DirectFB video display module
dshow         Windows DirectShow video source
dtls_srtp     DTLS-SRTP end-to-end encryption
ebuacip       EBU ACIP (Audio Contribution over IP) Profile
echo          Echo server module
evdev         Linux input driver
fakevideo     Fake video input/output driver
g711          G.711 audio codec
g722          G.722 audio codec
g7221         G.722.1 audio codec
g726          G.726 audio codec
gst           Gstreamer audio source
gtk           GTK+ 3 menu-based UI
gzrtp         ZRTP module using GNU ZRTP C++ library
httpd         HTTP webserver UI-module
httpreq       HTTP request module
ice           ICE protocol for NAT Traversal
jack          JACK Audio Connection Kit audio-driver
l16           L16 audio codec
menu          Interactive menu
mixausrc      Mixes another audio source into audio stream
mixminus      Mixes N-1 audio streams for conferencing
mpa           MPA Speech and Audio Codec
mqtt          MQTT (Message Queue Telemetry Transport) module
multicast     Multicast RTP send and receive
mwi           Message Waiting Indication
natpmp        NAT Port Mapping Protocol (NAT-PMP) module
netroam       Detects and applies changes of the local network addresses
opensles      OpenSLES audio driver
opus          OPUS Interactive audio codec
opus_multistream    OPUS multistream audio codec
pcp           Port Control Protocol (PCP) module
plc           Packet Loss Concealment (PLC) using spandsp
portaudio     Portaudio driver
pulse         Pulseaudio driver
presence      Presence module
rtcpsummary   RTCP summary module
sdl           Simple DirectMedia Layer 2.0 (SDL) video output driver
selfview      Video selfview module
serreg        Serial registration
snapshot      Save video-stream as PNG images
sndfile       Audio dumper using libsndfile
sndio         Audio driver for OpenBSD
srtp          Secure RTP encryption (SDES) using libre SRTP-stack
stdio         Standard input/output UI driver
stun          Session Traversal Utilities for NAT (STUN) module
swscale       Video scaling using libswscale
syslog        Syslog module
turn          Obtaining Relay Addresses from STUN (TURN) module
uuid          UUID generator and loader
v4l2          Video4Linux2 video source
vidbridge     Video bridge module
vidinfo       Video info overlay module
vp8           VP8 video codec
vp9           VP9 video codec
vumeter       Display audio levels in console
webrtc_aec    Acoustic Echo Cancellation (AEC) using WebRTC SDK
webrtc_aecm   Acoustic Echo Cancellation (AEC) mobile using WebRTC SDK
wincons       Console input driver for Windows
winwave       Audio driver for Windows
x11           X11 video output driver

IETF RFC/I-Ds:

  • RFC 2250 RTP Payload Format for the mpa Speech and Audio Codec

  • RFC 3016 RTP Payload Format for MPEG-4 Audio/Visual Streams

  • RFC 3262 Reliability of Provisional Responses for SIP

  • RFC 3311 SIP UPDATE Method

  • RFC 3428 SIP Extension for Instant Messaging

  • RFC 3711 The Secure Real-time Transport Protocol (SRTP)

  • RFC 3640 RTP Payload Format for Transport of MPEG-4 Elementary Streams

  • RFC 3856 A Presence Event Package for SIP

  • RFC 3863 Presence Information Data Format (PIDF)

  • RFC 3891 The SIP "Replaces" Header

  • RFC 4145 TCP-Based Media Transport in SDP

  • RFC 4240 Basic Network Media Services with SIP (partly)

  • RFC 4347 Datagram Transport Layer Security

  • RFC 4568 SDP Security Descriptions for Media Streams

  • RFC 4572 Connection-Oriented Media Transport over TLS Protocol in SDP

  • RFC 4574 The SDP Label Attribute

  • RFC 4585 Extended RTP Profile for RTCP-Based Feedback (RTP/AVPF)

  • RFC 4587 RTP Payload Format for H.261 Video Streams

  • RFC 4796 The SDP Content Attribute

  • RFC 4867 RTP Payload Format for the AMR and AMR-WB Audio Codecs

  • RFC 4961 Symmetric RTP / RTP Control Protocol (RTCP)

  • RFC 5285 A General Mechanism for RTP Header Extensions

  • RFC 5373 Requesting Answering Modes for SIP

  • RFC 5506 Support for Reduced-Size RTCP

  • RFC 5576 Source-Specific Media Attributes in SDP

  • RFC 5577 RTP Payload Format for ITU-T Recommendation G.722.1

  • RFC 5626 Managing Client-Initiated Connections in SIP

  • RFC 5627 Obtaining and Using GRUUs in SIP

  • RFC 5761 Multiplexing RTP Data and Control Packets on a Single Port

  • RFC 5763 Framework for Establishing a SRTP Security Context Using DTLS

  • RFC 5764 DTLS Extension to Establish Keys for SRTP

  • RFC 5888 The SDP Grouping Framework

  • RFC 6157 IPv6 Transition in SIP

  • RFC 6184 RTP Payload Format for H.264 Video

  • RFC 6263 App. Mechanism for Keeping Alive NAT Associated with RTP / RTCP

  • RFC 6416 RTP Payload Format for MPEG-4 Audio/Visual Streams

  • RFC 6464 A RTP Header Extension for Client-to-Mixer Audio Level Indication

  • RFC 6716 Definition of the Opus Audio Codec

  • RFC 6886 NAT Port Mapping Protocol (NAT-PMP)

  • RFC 7064 URI Scheme for STUN Protocol

  • RFC 7065 TURN Uniform Resource Identifiers

  • RFC 7310 RTP Payload Format for Standard apt-X and Enhanced apt-X Codecs

  • RFC 7587 RTP Payload Format for the Opus Speech and Audio Codec

  • RFC 7741 RTP Payload Format for VP8 Video

  • RFC 7742 WebRTC Video Processing and Codec Requirements

  • RFC 7798 RTP Payload Format for High Efficiency Video Coding (HEVC)

  • RFC 8285 A General Mechanism for RTP Header Extensions

  • RFC 8843 Negotiating Media Multiplexing Using SDP

  • draft-ietf-payload-vp9-16

Supported platforms:

  • Android (6.0 or later)
  • Apple macOS (10.12+)
  • Apple iOS 9.0 or later
  • Linux (kernel 3.0 or later, and glibc 2.5.x or later)
  • OpenBSD
  • Windows 10 or later (mingw and VS2019)

Supported versions of C Standard library

  • Android bionic
  • BSD libc
  • GNU C Library (glibc)
  • Musl
  • Windows C Run-Time Libraries (CRT)
  • uClibc

Supported compilers:

  • gcc 4.9 or later
  • MSVC 2019
  • clang 3.x or later

Supported versions of OpenSSL

  • OpenSSL version 1.1.1
  • OpenSSL version 3.x.x
  • LibreSSL version 3.x

Related projects

References

baresip's People

Contributors

alfredh avatar chubercoffee avatar clehner avatar cspiel1 avatar czarkoff avatar djhenley avatar geoffstewart avatar gggo avatar glenvt18 avatar hoene avatar janh avatar jmillan avatar jobo-zt avatar juha-h avatar kuleshov-aleksei avatar lmangani avatar maximilianfridrich avatar mbattista avatar nicotyze avatar premultiply avatar robert-scheck avatar robertmi21 avatar sreimers avatar strfry avatar trampster avatar tverlaan avatar viordash avatar viric avatar webstean avatar weili-jiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

baresip's Issues

Audio on USB Headset/speaker is delayed by almost 30 seconds

With 0.13 version (as well as from GIT) i see that Audio seems to be broken for almost 30 seconds when the Default device from ALSA is set to USB headset/speaker. This issue was not seen in version 0.4.6 but is seen in 0.4.11 onwards.

I use Pulseaudio (latest from ubuntu from 15.04) and wrap around ALSA with it. Let me know if you need any more information. This issue is very easy to recreate, if you need any more information, do let me know.

Here is the Audio portion of the config file i am using -

Audio

audio_player alsa,default
audio_source alsa,default
audio_alert alsa,default
audio_srate 8000-48000
audio_channels 1-2

ausrc_srate 48000

auplay_srate 48000

ausrc_channels 0

auplay_channels 0

[discontent] bad names

there are structure and function and variable names that make me confused. i think it would be better if you name them more exact. i can't see any difference between names like "cfg","conf","config","configure" which you used them all inside the project
thanks.

Switch audio-device

I used this feature to switch device on call in other software, so it will be good to have this in baresip

And it will be great if you show me where to looks for this in the code.

Compiling issues

Hello, I am trying to compile baresip on Ubuntu.

Installed libre and librem without any problems from traviscross github. Also have libraries installed: openssl, libssl-dev, x264, libx264-dev

  1. Building baresip I get:

    LD [M] evdev.so
    CC [M] build-i686/modules/avcodec/avcodec.o
    modules/avcodec/avcodec.c: In function ‘avcodec_resolve_codecid’:
    modules/avcodec/avcodec.c:20:10: error: ‘CODEC_ID_H263’ undeclared (first use in this function)
    return CODEC_ID_H263;
    ^
    modules/avcodec/avcodec.c:20:10: note: each undeclared identifier is reported only once for each function it appears in
    modules/avcodec/avcodec.c:22:10: error: ‘CODEC_ID_H264’ undeclared (first use in this function)
    return CODEC_ID_H264;
    ^
    modules/avcodec/avcodec.c:24:10: error: ‘CODEC_ID_MPEG4’ undeclared (first use in this function)
    return CODEC_ID_MPEG4;
    ^
    modules/avcodec/avcodec.c:26:10: error: ‘CODEC_ID_NONE’ undeclared (first use in this function)
    return CODEC_ID_NONE;
    ^

  2. After I disable video with USE_VIDEO := 0 I get:

CC [M] build-i686/modules/srtp/srtp.o
modules/srtp/srtp.c:101:13: warning: ISO C forbids forward references to ‘enum’ types [-Wpedantic]
static enum srtp_suite resolve_suite(const char *suite)
^
modules/srtp/srtp.c:101:24: error: return type is an incomplete type
static enum srtp_suite resolve_suite(const char *suite)
^
modules/srtp/srtp.c: In function ‘resolve_suite’:
modules/srtp/srtp.c:104:10: error: ‘SRTP_AES_CM_128_HMAC_SHA1_32’ undeclared (first use in this function)
return SRTP_AES_CM_128_HMAC_SHA1_32;
^
modules/srtp/srtp.c:104:10: note: each undeclared identifier is reported only once for each function it appears in
modules/srtp/srtp.c:104:3: warning: ‘return’ with a value, in function returning void [enabled by default]
return SRTP_AES_CM_128_HMAC_SHA1_32;
^
modules/srtp/srtp.c:106:10: error: ‘SRTP_AES_CM_128_HMAC_SHA1_80’ undeclared (first use in this function)
return SRTP_AES_CM_128_HMAC_SHA1_80;

Please let me find what I am doing wrong

Cannot call from Wifi to 3G and 3G to Wifi

hi Alfredh,

I was researching on this some days, but i can't hear the sound between 3G and Wifi. (the phone still receives call, but no sound, no video), I'm developing on iOS.

I already tried to use some stun servers by set "medianat=stun;stunserver=stun:stun.l.google.com:19302" but no luck.

I tried to make call between wifi to wifi, 3G to 3G and they work fine. And i think it only work for Lan network.
Can you teach me how to configure baresip or line of code to call different network ?

Thank you

portaudio dependencies on rasberry/raspian/debian? make-erro

hi,
got this error:
root@raspberrypi:/usr/src/baresip-master# make
CC [M] build-arm6/modules/portaudio/portaudio.o
modules/portaudio/portaudio.c:48:5: error: unknown type name ‘PaStreamCallbackTimeInfo’
modules/portaudio/portaudio.c:49:5: error: unknown type name ‘PaStreamCallbackFlags’
modules/portaudio/portaudio.c:71:6: error: unknown type name ‘PaStreamCallbackTimeInfo’
modules/portaudio/portaudio.c:72:6: error: unknown type name ‘PaStreamCallbackFlags’
modules/portaudio/portaudio.c: In function ‘read_stream_open’:
modules/portaudio/portaudio.c:95:2: error: unknown type name ‘PaStreamParameters’
modules/portaudio/portaudio.c:100:8: error: request for member ‘device’ in something not a structure or union
modules/portaudio/portaudio.c:101:8: error: request for member ‘channelCount’ in something not a structure or union
modules/portaudio/portaudio.c:102:8: error: request for member ‘sampleFormat’ in something not a structure or union
modules/portaudio/portaudio.c:103:8: error: request for member ‘suggestedLatency’ in something not a structure or union
modules/portaudio/portaudio.c:107:37: error: ‘read_callback’ undeclared (first use in this function)

what do you need for tracking down the problem?
running on rasperry (arm) with raspbian. latest hw-update, installed some portaudio libraries, but is it a bug, or is something missing?

error: ‘const struct sip_msg’ has no member named ‘ctype’

Trying to compile baresip-0.4.10 on Ubuntu 12.04 (64 bit), I get the following error:

src/call.c:965:33: error: ‘const struct sip_msg’ has no member named ‘ctype’

libre and librem were compiled and installed successfully.

Full log:

$ uname -a
Linux ubuntu 3.8.0-38-generic #56~precise1-Ubuntu SMP Thu Mar 13 16:22:48 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ make clean && make
  CC [M]  build-x86_64/modules/stun/stun.o
  LD [M]  stun.so
  CC [M]  build-x86_64/modules/turn/turn.o
  LD [M]  turn.so
  CC [M]  build-x86_64/modules/ice/ice.o
  LD [M]  ice.so
  CC [M]  build-x86_64/modules/natbd/natbd.o
  LD [M]  natbd.so
  CC [M]  build-x86_64/modules/auloop/auloop.o
  LD [M]  auloop.so
  CC [M]  build-x86_64/modules/presence/presence.o
  CC [M]  build-x86_64/modules/presence/subscriber.o
modules/presence/subscriber.c: In function ‘subscriber_init’:
modules/presence/subscriber.c:257:3: warning: implicit declaration of function ‘sip_param_decode’ [-Wimplicit-function-declaration]
modules/presence/subscriber.c:257:3: warning: nested extern declaration of ‘sip_param_decode’ [-Wnested-externs]
  CC [M]  build-x86_64/modules/presence/notifier.o
  LD [M]  presence.so
  CC [M]  build-x86_64/modules/menu/menu.o
  LD [M]  menu.so
  CC [M]  build-x86_64/modules/contact/contact.o
  LD [M]  contact.so
  CC [M]  build-x86_64/modules/vumeter/vumeter.o
  LD [M]  vumeter.so
  CC [M]  build-x86_64/modules/mwi/mwi.o
  LD [M]  mwi.so
  CC [M]  build-x86_64/modules/account/account.o
  LD [M]  account.so
  CC [M]  build-x86_64/modules/natpmp/natpmp.o
  CC [M]  build-x86_64/modules/natpmp/libnatpmp.o
  LD [M]  natpmp.so
  CC [M]  build-x86_64/modules/httpd/httpd.o
  LD [M]  httpd.so
  CC [M]  build-x86_64/modules/aubridge/aubridge.o
  CC [M]  build-x86_64/modules/aubridge/device.o
  CC [M]  build-x86_64/modules/aubridge/src.o
  CC [M]  build-x86_64/modules/aubridge/play.o
  LD [M]  aubridge.so
  CC [M]  build-x86_64/modules/vidloop/vidloop.o
  LD [M]  vidloop.so
  CC [M]  build-x86_64/modules/selfview/selfview.o
  LD [M]  selfview.so
  CC [M]  build-x86_64/modules/vidbridge/vidbridge.o
  CC [M]  build-x86_64/modules/vidbridge/src.o
  CC [M]  build-x86_64/modules/vidbridge/disp.o
  LD [M]  vidbridge.so
  CC [M]  build-x86_64/modules/cons/cons.o
  LD [M]  cons.so
  CC [M]  build-x86_64/modules/evdev/evdev.o
  CC [M]  build-x86_64/modules/evdev/print.o
  LD [M]  evdev.so
  CC [M]  build-x86_64/modules/g711/g711.o
  LD [M]  g711.so
  CC [M]  build-x86_64/modules/l16/l16.o
  LD [M]  l16.so
  CC [M]  build-x86_64/modules/oss/oss.o
  LD [M]  oss.so
  CC [M]  build-x86_64/modules/stdio/stdio.o
  LD [M]  stdio.so
  CC [M]  build-x86_64/modules/syslog/syslog.o
  LD [M]  syslog.so
  CC      build-x86_64/src/account.o
src/account.c: In function ‘param_dstr’:
src/account.c:46:2: warning: implicit declaration of function ‘sip_param_decode’ [-Wimplicit-function-declaration]
src/account.c:46:2: warning: nested extern declaration of ‘sip_param_decode’ [-Wnested-externs]
src/account.c: In function ‘audio_codecs_decode’:
src/account.c:183:2: warning: implicit declaration of function ‘sip_param_exists’ [-Wimplicit-function-declaration]
src/account.c:183:2: warning: nested extern declaration of ‘sip_param_exists’ [-Wnested-externs]
  CC      build-x86_64/src/aucodec.o
  CC      build-x86_64/src/audio.o
  CC      build-x86_64/src/aufilt.o
  CC      build-x86_64/src/auplay.o
  CC      build-x86_64/src/ausrc.o
  CC      build-x86_64/src/call.o
src/call.c: In function ‘sipsess_answer_handler’:
src/call.c:965:33: error: ‘const struct sip_msg’ has no member named ‘ctype’
src/call.c: In function ‘sipsess_info_handler’:
src/call.c:1041:25: error: ‘const struct sip_msg’ has no member named ‘ctype’
src/call.c:1074:30: error: ‘const struct sip_msg’ has no member named ‘ctype’
src/call.c: In function ‘sipsess_progr_handler’:
src/call.c:1239:37: error: ‘const struct sip_msg’ has no member named ‘ctype’
src/call.c:1252:25: error: ‘const struct sip_msg’ has no member named ‘ctype’
src/call.c:1257:37: error: ‘const struct sip_msg’ has no member named ‘ctype’
make: *** [build-x86_64/src/call.o] Error 1

medianat=ice stops baresip from calling over LAN without Internet connection

In some cases, we make calls between 2 baresips over LAN only, using addresses like [email protected].

We have an account setup including medianat=ice parameter.
If we use it, baresips no longer can call each other. The caller didn't go beyond call: connecting to 'sip:[email protected] message, and the callee never displays anything after baresip is ready line.

I might give this a shot, but am tight on deadlines. Some insight on where to look may help us create a patch ;)

dtls_srtp compile errors

On a current archlinux the dtls_srtp module has compile errors:

$ openssl version
OpenSSL 1.0.1i 6 Aug 2014
$ gcc --version
gcc (GCC) 4.9.1
  CC [M]  build-x86_64/modules/dtls_srtp/dtls_srtp.o
In file included from modules/dtls_srtp/dtls_srtp.c:14:0:
modules/dtls_srtp/dtls_srtp.h:48:15: error: conflicting types for 'dtls_estab_h'
 typedef void (dtls_estab_h)(int err, struct dtls_flow *tc,
               ^
In file included from /usr/include/re/re.h:56:0,
                 from modules/dtls_srtp/dtls_srtp.c:11:
/usr/include/re/re_tls.h:53:15: note: previous declaration of 'dtls_estab_h' was here
 typedef void (dtls_estab_h)(void *arg);
               ^
In file included from modules/dtls_srtp/dtls_srtp.c:14:0:
modules/dtls_srtp/dtls_srtp.h:59:12: error: 'tls_fingerprint' defined as wrong kind of tag
     struct tls_fingerprint *fp);
            ^
modules/dtls_srtp/dtls_srtp.h:59:12: warning: 'struct tls_fingerprint' declared inside parameter list
modules/dtls_srtp/dtls_srtp.h:59:12: warning: its scope is only this definition or declaration, which is probably not what you want
modules/dtls_srtp/dtls_srtp.c: In function 'verify_fingerprint':
modules/dtls_srtp/dtls_srtp.c:96:9: error: 'tls_fingerprint' defined as wrong kind of tag
  struct tls_fingerprint tls_fp;
         ^
modules/dtls_srtp/dtls_srtp.c:96:25: error: storage size of 'tls_fp' isn't known
  struct tls_fingerprint tls_fp;
                         ^
modules/dtls_srtp/dtls_srtp.c:96:25: warning: unused variable 'tls_fp' [-Wunused-variable]
mk/mod.mk:35: recipe for target 'build-x86_64/modules/dtls_srtp/dtls_srtp.o' failed

gtk module compile error on OpenBSD 5.7

building Baresip on OpenBSD 5.7 fails in gtk.so module:

modules/gtk/gtk_mod.c: In function 'notify_incoming_call':
modules/gtk/gtk_mod.c:279: warning: implicit declaration of function 'g_notification_set_priority'
modules/gtk/gtk_mod.c:279: warning: nested extern declaration of 'g_notification_set_priority'
modules/gtk/gtk_mod.c:280: error: 'G_NOTIFICATION_PRIORITY_URGENT' undeclared (first use in this function)
modules/gtk/gtk_mod.c:280: error: (Each undeclared identifier is reported only once
modules/gtk/gtk_mod.c:280: error: for each function it appears in.)
modules/gtk/gtk_mod.c: In function 'gtk_thread':
modules/gtk/gtk_mod.c:591: warning: declaration of 'error' shadows a global declaration
include/baresip.h:387: warning: shadowed declaration is here
gmake: *** [build-x86_64/modules/gtk/gtk_mod.o] Error 1

@clehner could you have a look plz ? is the usage of
G_NOTIFICATION_PRIORITY_URGENT a portable API between all libgtk
implementations? can we avoid using this api, or using another portable api?

Question re:config

Hello

There are no docs about this so asking here: how can I set the opus codec's bandwidth parameters (either absolutely or using the 'full/superwide/wide/medium/narrow' shortnames)?

Proxy Authentication can fail if there are multiple SRV records

This occurs with servers with multiple SRV records, for example _sip._udp.callcentric.com.

(1) client sends INVITE to server. SRV lookup is done, and the first SRV record is picked.
(2) server responds with 407 Proxy Authentication Required, and a nonce to be used in the next INVITE
(3) client sends INVITE with Proxy-Authorization header, using the nonce from the previous response. The next SRV record is used (instead of the same), so the INVITE might go to a different server than the original INVITE. The second server does not recognize the nonce from the first server, so it responds with 407, indicating the nonce is stale.

When the server responds with a 407, the same IP address/port as the original INVITE should be used when sending the INVITE with the Proxy-Authorization header.

HTTP API

Hello I have a question about the HTTP API;

Wonder how to answer a call?

Says press "ENTER" what is the HTTP Param?

Thanks.

ICE announce candidates from down interfaces

I've noticed that baresip ICE is announcing its candidates from interfaces which are in down state. When call established its trying using these SRC IP addresses from down interfaces (or at least that what logging says, as tcpdump doesn't confirm it).

This doesn't affect much call, but probably slowdown audio path selecting from remoteside

Tested on Ubuntu 15.04

IPv6 in SDP

When sending an OFFER with IPv6 in the SDP to a baresip that's IPv4 only, Baresip responds 200 OK with IPv4 in the SDP. We get no media - of course.

RFC 6157 speaks clearly about this (and updates 3264):
" 2. Each media description in the SDP answer MUST use the same
network type as the corresponding media description in the offer.
Thus, if the applicable "c=" line for a media description in the
offer contained a network type with the value "IP4", the
applicable "c=" line for the corresponding media description in
the answer MUST contain "IP4" as the network type. Similarly, if
the applicable "c=" line for a media description in the offer
contained a network type with the value "IP6", the applicable
"c=" line for the corresponding media description in the answer
MUST contain "IP6" as the network type.
"

Call fails because of stun protocol error

When I use in my account config medianat=stun;stunserver=stun:... and make a call, I get the following:

call: medianat 'stun' failed: Protocol error

What could be causing this? I have tried multiple stun servers. Looking at the UA debug shows that my auth_user is being used as the user for the stunserver URL, whereas I am used to using STUN servers not requiring authentication. Could it be the STUN server isn't expecting to get a username?

Using libre 0.4.12, librem 0.4.6, baresip 502385d (master), on Debian testing amd64.

un-registration at quit

When quitting baresip, make somehow sure that UAs are not unregistered before mwi and presence un-SUBSCRIBE NOTIFY requests have had change to reach the UAs.

More flexibility in gst_video

It's awesome that baresip can use gstreamer for video input, but I cannot see how to use it for frames that are already encoded.

I would like to serve video from a rtsp stream with h264 encoded video, but I don't know how.

to little documentation, config-infos, working specs ?? how-to config?

hi,
would love to run baresip. seems to have living source-code. BUT who tests some working configurations? google has bare-li infos, nothing to find in the web. who uses baresip and post working-solutions? in special:

  • cant find info/syntax about cmd-line options (baresip -e ???)
  • cant find infos/syntax about config options. ie. alsa -devices (how to find? aplay -L ? how to set this in config? alsa,hw:1,0 working? alsa,sysdefault ?? got errors
  • what are differences alsa-player,source,...?
  • how to use input-devices (evtest?)

would highly appreciate a answer, because cound not find a FAQ/WIKI.

baresip seems usable on all openwrt, but configuration to run it seems a nightmare of try'n'error...

please show some help ... thankx

Gstreamer 1.0 for gst_video?

Hi,

is there any particular restriction in baresip that requires gstreamer 0.10 for gst_video? What would be needed to port it to gstreamer 1.0?

Many thanks,
Thomas

(cedrus264) Possibility to directly pipe h264 encoded FFmpeg stream without further encoding from baresip

I am trying to use an Allwinner A20 Board with cedrus264 enabled FFmpeg hardware encoding with baresip.
Unfortunately my attempts failed so far.
I have tried to pipe FFmpeg output to a MKFIFO generated output file and use baresip with "avformat" input, which resulted in no video data.
It seemed as if baresip ignored all Parameters related to avformat.
The FFmpeg stream itself is fine. I tested it with gstreamer which accepts it without issues.
Is it possible to have some sort of packaging only audio/video input without mkfifo and sorts or some way to integrate FFmpeg encoders?

Best Regards,

xn2000

My Config:

baresip configuration

------------------------------------------------------------------------------

Core

poll_method epoll # poll, select, epoll ..

SIP

sip_trans_bsize 128
sip_listen 0.0.0.0:5060

sip_certificate cert.pem

Audio

audio_player alsa,default
audio_source alsa,default
audio_alert alsa,default
audio_srate 8000-48000
audio_channels 1-2

ausrc_srate 48000

auplay_srate 48000

ausrc_channels 0

auplay_channels 0

Video

video_source avformat,/root/out.mp4

video_source v4l2,/dev/video0

video_display x11,nil

video_size 1280x720

video_bitrate 300

video_fps 15

AVT - Audio/Video Transport

rtp_tos 184

rtp_ports 10000-20000

rtp_bandwidth 512-1024 # [kbit/s]

rtcp_enable yes
rtcp_mux no
jitter_buffer_delay 15-30 # frames
rtp_stats no

Network

dns_server 10.0.0.1:53

net_interface eth0

BFCP

bfcp_proto udp

------------------------------------------------------------------------------

Modules

module_path /usr/local/lib/baresip/modules

UI Modules

module stdio.so
module cons.so

module evdev.so

module httpd.so

Audio codec Modules (in order)

module opus.so

module silk.so

module amr.so

module g7221.so

module g722.so

module g726.so

module g711.so

module gsm.so

module l16.so

module speex.so

module bv32.so

Audio filter Modules (in encoding order)

module vumeter.so

module sndfile.so

module speex_aec.so

module speex_pp.so

module plc.so

Audio driver Modules

module alsa.so

module portaudio.so

Video codec Modules (in order)

module avcodec.so
module vpx.so

Video filter Modules (in encoding order)

module selfview.so

Video source modules

module v4l.so

module v4l2.so

module x11grab.so

module cairo.so

Video display modules

module x11.so

module sdl2.so

Audio/Video source modules

module rst.so

module gst.so

Media NAT modules

module stun.so
module turn.so
module ice.so

module natpmp.so

Media encryption modules

module srtp.so

module dtls_srtp.so

------------------------------------------------------------------------------

Temporary Modules (loaded then unloaded)

module_tmp uuid.so
module_tmp account.so

------------------------------------------------------------------------------

Application Modules

module_app auloop.so
module_app contact.so
module_app menu.so

module_app mwi.so

module_app natbd.so

module_app presence.so

module_app syslog.so

module_app vidloop.so

------------------------------------------------------------------------------

Module parameters

cons_listen 0.0.0.0:5555

http_listen 0.0.0.0:8000

evdev_device /dev/input/event0

Speex codec parameters

speex_quality 7 # 0-10
speex_complexity 7 # 0-10
speex_enhancement 0 # 0-1
speex_mode_nb 3 # 1-6
speex_mode_wb 6 # 1-6
speex_vbr 0 # Variable Bit Rate 0-1
speex_vad 0 # Voice Activity Detection 0-1
speex_agc_level 8000

Opus codec parameters

opus_bitrate 28000 # 6000-510000

NAT Behavior Discovery

natbd_server creytiv.com
natbd_interval 600 # in seconds

Selfview

video_selfview window # {window,pip}

selfview_size 64x64

ICE

ice_turn no
ice_debug no
ice_nomination regular # {regular,aggressive}
ice_mode full # {full,lite}

non-menu console interface

More of a feature request than a bug...

I've played around with baresip a couple times but something about the menu interface has been bothering me a lot. Not too sure what exactly, but my guess is that it's context sensitive.

Compare this to linphonec (Linphone's console app), and by extension, linphonecsh, which is context insensitive and command based. You can ask status anytime, you don't have to know what "mode" you are in, you just send a command and it'll tell you what you wanted. Or do what you wanted (or deny it with an error code).

It also makes interfacing with the SIP UA from another program much simpler (in my opinion anyway).

I haven't seen anything on the ML about this, and my C knowledge is extremely unfit for writing a command plugin that works like this... but is it possible? does anyone know how to? does anyone want to?

Baresip using gst_video

Hello Alfredh,
First of all, I want to say that you have done an amazing job with baresip. With the right pitch baresip could become very popular among new developers like myself.

So far I have managed to connect to another SIP client locally as well as through the stunserver. I have managed to establish both audio and video connection between the two remote UA. The config file for the above purpose is pasted below for others who need any reference. Now, what I am trying to do is create an appication wherein I receive video feed from the remote UA who have more than two webcam and display it on one display panel as merged.I have tried to use the gstreamer module (gst_video)to do the merge of the multiple video but I am not really able to get round it. I have the gst_video.so build successfully.(after adding lot of library dependencies )

I have a sample gstreamer code which does merging of video feed(as an example).
[code]
gst-launch -e videomixer name=mix ! ffmpegcolorspace ! xvimagesink
v4l2src device=/dev/video0 ! 'video/x-raw-yuv, framerate=24/1, width=320, height=240' !
videobox border-alpha=0 top=0 left=0 ! mix.
v4l2src device=/dev/video1 ! 'video/x-raw-yuv,width=320,height=240,framerate=30/1' !
videobox border-alpha=0 top=0 left=-320 ! mix.
[/code]

I want to use the above code in gst_video module to receive more than one cam feed from remote UA and display it on one output panel as merged(similar to ones used by security camera viewers). What I was trying to do so far was to edit the encode file (gst_video) and fit the gst-launch code(from above) into the gst_encoder_init function by replacing the appsrc part.On the config file I am using gst_video.so instead of avcodec.so Anyways, without much success with this approach I am looking for alternate solutions. I was wondering to change the rem-0.4.6/src/vidmix/vidmix.c file in some way to achieve my objective.I hope I was able to narrate my issue.

The config for establishing audio and video link

[code]

baresip configuration

------------------------------------------------------------------------------

Core

poll_method poll # poll, select

SIP

sip_trans_bsize 128
sip_listen 192.168..**:5060#Put your IP address;with the default port(5060)
sip_certificate cert.pem

Audio

audio_player alsa,default
audio_source alsa,default
audio_alert alsa,default
audio_srate 8000-48000
audio_channels 1-2

ausrc_srate 48000

auplay_srate 48000

ausrc_channels 0

auplay_channels 0

Video

video_source v4l2,/dev/video0

video_source fakevideo

video_display x11,nil
video_size 352x288
video_bitrate 500000
video_fps 25

AVT - Audio/Video Transport

rtp_tos 184

rtp_ports 10000-20000

rtp_bandwidth 512-1024 # [kbit/s]

rtcp_enable yes
rtcp_mux no
jitter_buffer_delay 5-10 # frames
rtp_stats no

Network

dns_server 10.0.0.1:53

net_interface eth0

BFCP

bfcp_proto udp

------------------------------------------------------------------------------

Modules

module_path .

UI Modules

module stdio.so

module cons.so

module evdev.so

module httpd.so

Audio codec Modules (in order)

module opus.so

module silk.so

module amr.so

module g7221.so

module g722.so

module g726.so

module g711.so

module gsm.so

module l16.so

module speex.so

module bv32.so

Audio filter Modules (in encoding order)

module vumeter.so

module sndfile.so

module speex_aec.so

module speex_pp.so

module plc.so

Audio driver Modules

module alsa.so

module portaudio.so

Video codec Modules (in order)

module gst_video.so

module avcodec.so

module vpx.so

Video filter Modules (in encoding order)

module selfview.so

Video source modules

module v4l.so

module v4l2.so

module avformat.so

module fakevideo.so

module x11grab.so

module cairo.so

Video display modules

module x11.so

module sdl2.so

Audio/Video source modules

module rst.so

module gst.so

Media NAT modules

module stun.so
module turn.so
module ice.so

module natpmp.so

Media encryption modules

module srtp.so

module dtls_srtp.so

------------------------------------------------------------------------------

Temporary Modules (loaded then unloaded)

module_tmp uuid.so
module_tmp account.so

------------------------------------------------------------------------------

Application Modules

module_app auloop.so
module_app contact.so
module_app menu.so

module_app mwi.so

module_app natbd.so

module_app presence.so

module_app syslog.so

module_app vidloop.so

------------------------------------------------------------------------------

Module parameters

cons_listen 0.0.0.0:5555

http_listen 0.0.0.0:8000

evdev_device /dev/input/event0

Speex codec parameters

speex_quality 7 # 0-10
speex_complexity 7 # 0-10
speex_enhancement 0 # 0-1
speex_vbr 0 # Variable Bit Rate 0-1
speex_vad 0 # Voice Activity Detection 0-1
speex_agc_level 8000

NAT Behavior Discovery

natbd_server creytiv.com
natbd_interval 600 # in seconds

Selfview

video_selfview window # {window,pip}
selfview_size 64x64

ICE

ice_turn no
ice_debug no
ice_nomination regular # {regular,aggressive}
ice_mode full # {full,lite}

[/code]

Security Voice call/ Video call

Hi Alfred,

I deployed your Restund server with my host, it run successfully and i can make video call, audio call with any network.
But i need actually do the peer to peer connection, so does your Restund server support peer to peer ?
If not, because my app should deploy with high security so need your help to indicate alternative way or change config on Restund to make the P2P call. I'm developing on iOS app.
Btw, about Restund, the mysql-db what tables does it need? what's the main purpose of mysql configuration ?

Thank you so much

Alsa module blocks when joining thread on destruction.

Hello,

I am trying Baresip on Linux Debian Jessie. I am trying to figure out how to have working sound when dialing SIP URI. Logs when dialing say:

call: connecting to ...
call: SIP Progress: 100 Trying (/)
call: SIP Progress: 100 Trying (/)
audio: Set audio decoder: PCMU 8000Hz 1ch
audio: Set audio encoder: PCMU 8000Hz 1ch
audio tx pipeline:        alsa ---> vumeter ---> PCMU
audio rx pipeline:        alsa <--- vumeter <--- PCMU
...: Call established: ...
[0:00:03] audio=0/0 (bit/s)

The audio does not work in my case, so I quit (I type q); when doing that, the application hangs after dumping these lines:

Quit
Stopping 1 useragent.. 
...: Call with ... terminated (duration: 3 secs)

CPU takes 100% and I have to kill the process using kill -9. When running the application in gdb, the following threads are running:

(gdb) info threads
  Id   Target Id         Frame 
  5    Thread 0x7fffea338700 (LWP 980) "baresip" (running)
  4    Thread 0x7fffeab89700 (LWP 979) "threaded-ml" (running)
  3    Thread 0x7fffeb3da700 (LWP 978) "baresip" (running)
  2    Thread 0x7fffebc2b700 (LWP 977) "threaded-ml" (running)
* 1    Thread 0x7ffff7fbe700 (LWP 973) "baresip" 0x00007ffff6e664db in pthread_join (threadid=140737122633472, thread_return=0x0) at pthread_join.c:92

And the backtrace of the current thread is:

(gdb) bt
#0  0x00007ffff6e664db in pthread_join (threadid=140737122633472, thread_return=0x0) at pthread_join.c:92
#1  0x00007ffff53504b6 in ausrc_destructor (arg=0x68fa00) at modules/alsa/alsa_src.c:40
#2  0x00007ffff7bbd584 in mem_deref (data=0x68fa00) at src/mem/mem.c:318
#3  0x000000000040a594 in stop_tx (tx=0x65fab8, a=0x65fab0) at src/audio.c:179
#4  0x000000000040c59c in audio_stop (a=0x65fab0) at src/audio.c:1125
#5  0x000000000040d929 in call_stream_stop (call=0x6606b0) at src/call.c:184
#6  0x000000000040dee4 in call_destructor (arg=0x6606b0) at src/call.c:345
#7  0x00007ffff7bbd584 in mem_deref (data=0x6606b0) at src/mem/mem.c:318
#8  0x00007ffff7bb59ab in list_flush (list=0x65e8f8) at src/list/list.c:51
#9  0x0000000000419cbd in ua_destructor (arg=0x65e8b0) at src/ua.c:450
#10 0x00007ffff7bbd584 in mem_deref (data=0x65e8b0) at src/mem/mem.c:318
#11 0x00007ffff7bb59ab in list_flush (list=0x6296c8 <uag+8>) at src/list/list.c:51
#12 0x000000000041b4d3 in ua_stop_all (forced=false) at src/ua.c:1300
#13 0x000000000041b149 in cmd_quit (pf=0x7ffff5b57550 <pf_stderr>, unused=0x7fffffffdcc0) at src/ua.c:1166
#14 0x00000000004113c2 in cmd_process (ctxp=0x6299f0 <uictx>, key=113 'q', pf=0x7ffff5b57550 <pf_stderr>) at src/cmd.c:302
#15 0x000000000041bd43 in ui_handler (key=113 'q', pf=0x7ffff5b57550 <pf_stderr>) at src/ui.c:17
#16 0x000000000041be40 in ui_input_key (key=113 'q', pf=0x7ffff5b57550 <pf_stderr>) at src/ui.c:83
#17 0x00007ffff5956d0f in report_key (ui=0x655ae0, key=113 'q') at modules/stdio/stdio.c:66
#18 0x00007ffff5956d9f in ui_fd_handler (flags=1, arg=0x655ae0) at modules/stdio/stdio.c:90
#19 0x00007ffff7bbb53f in fd_handler (re=0x7ffff7ddbcc0 <global_re>, fd=0, flags=1) at src/main/main.c:246
#20 0x00007ffff7bbc4f1 in fd_poll (re=0x7ffff7ddbcc0 <global_re>) at src/main/main.c:849
#21 0x00007ffff7bbc7ee in re_main (signalh=0x41f29b <signal_handler>) at src/main/main.c:992
#22 0x000000000041f54b in main (argc=1, argv=0x7fffffffe0e8) at src/main.c:169

This may be related to the fact that I have no sound (maybe a problem regarding NAT traversal?), but in any case joining the thread blocks the application.

OSX 10.11 Coreaudio drop outs

Hi Alfred,

On the first look the play thread is running too fast and causes underruns (simple auloop test). I will investigate further and update this ticket soon. The Portaudio module on OSX works fine but has some deprecated warnings:

baresip[5847:27782] 14:08:22.315 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

This is something that has to be changed in portaudio. But maybe there are other API deprecations too.

call: no common audio codecs - rejected

Hello, dear colleagues.
Could you help me please.
I'm trying to make test call to baresip.
SIP server Asterisk 12.8.2 is running under Ubuntu 12.04.05. Have tested with sipML5 client - to -sipML5 client in Chrome - works fine. But when I'm trying to call from sipML5 to baresip - I'm getting error :
call: no common audio codecs - rejected
Is it problem with Asterisk, Ubuntu or baresip configuration? If required, can upload config files.
Thank you very much.
Have a nice day.

RFC2833/4733 DTMF does not work if payload type is not 101

If another UA calls the baresip UAC and requests a payload type of other than 101 in the SDP for RFC2833/4733 DTMF, then baresip does not recognize DTMF in the RTP steam.

For example, if the UA requests payload 102 for DTMF in the SDP of the INVITE:

a=rtpmap:102 telephone-event/8000

Baresip replies with the same payload type in the SDP of the 200 Answering response:

a=rtpmap:102 telephone-event/8000

However, if the payload type is anything other than 101, baresip does not recognize the DTMF in the RTP stream. Instead, it outputs a message about the payload type changing when the DTMF should be received.

Audio decoder changed payload 0 -> 102
Audio decoder changed payload 102 -> 0

Does Baresip/Libre run on Apple arm64?

Hi there,

I am trying to do sip registration on an iOS app using libre. I compiled the library to run on the following architectures: i386, armv7 and aarch64 (arm64). The app is built successfully on all architectures, and it does the sip registration on i386 (iphone simulator) and armv7. However, on arm64 everything runs normally until the line where the register sip packet should be sent it executes the statement but I don't see anything on wireshark and it waits for a reply but it gets nothing so an operation time out error appears. Has anyone tried running baresip or libre on an arm64 (iphone 5s, iphone 6 or iphone 6 plus)?

Thanks,
Taha

any sample how to use gstream src/enc/dec

Enable video-loop on gst_video,/dev/video0: 190 x 240
vidloop: gst_video,/dev/video0: open video source: 190 x 240 at 25 fps
vidloop: vidsrc '/dev/video0' failed: No such file or directory
vidloop: alloc: No such file or directory

AMR payload header

it looks to me like the amr codec module is missing to add a payload
header according to rfc4867 (or rfc3267). Is that correct?

In the simpler octet-aligned mode (which needs to be signaled with
fmtp octet-align=1), there needs to be one byte with 4 bits codec mode
request (CMR) and 4 bits reserved (0). In the simplest case, the CMR
could always be 15 (no codec mode request).

The bandwidth-efficient mode (default, octet-align=0) needs packing of
F/FT/Q and speech data after the 4 bits CMR.

AFAIU, the encoder used places an F/FT/Q byte at buf[0], followed by
the encoded speech frame.

baresip crash with speex codec

hi,
i have compiled baresip with speex codec, speex_aec and speex_pp module on carambola2 platform ( openwrt OS) .
when trying to run baresip 👍

baresip v0.4.11 Copyright (C) 2010 - 2014 Alfred E. Heggestad et al.
Local network address: IPv4=eth1:192.168.1.49
aucodec: speex/32000/2
aucodec: speex/16000/2
aucodec: speex/8000/2
aucodec: speex/32000/1
aucodec: speex/16000/1
aucodec: speex/8000/1
aufilt: speex_aec
aufilt: speex_pp
ausrc: oss
auplay: oss
ausrc: alsa
auplay: alsa
medianat: stun
medianat: turn
medianat: ice
Populated 1 account
Populated 1 contacts
Populated 6 audio codecs
Populated 2 audio filters
Populated 0 video codecs
Populated 0 video filters
baresip is ready.
[email protected]: {0/UDP/v4} 200 OK (FPBX-2.11.0(11.12.0)) [1 binding]
All 1 useragent registered successfully! (18 ms)

                       71105

call: connecting to 'sip:[email protected];transport=udp'..
call: SIP Progress: 100 Trying (/)
audio: Set audio decoder: speex 8000Hz 1ch
audio: Set audio encoder: speex 8000Hz 1ch
warning: Unknown nb_ctl request: 12
speex: SPEEX_SET_VBR: -1
warning: Unknown nb_ctl request: 30
speex: SPEEX_SET_VAD: -1
Segmentation fault (core dumped)

so its crashing as soon as voice activity start.

My configuration looks like this:

root@FINGI_GCC:~# cat /root/.baresip/config

baresip configuration

------------------------------------------------------------------------------

Core

poll_method epoll # poll, select, epoll ..

Input

input_device /dev/event0
input_port 5555

SIP

sip_trans_bsize 128

sip_listen 0.0.0.0:5060

sip_certificate cert.pem

Audio

audio_player alsa,default
audio_source alsa,default
audio_alert alsa,default
audio_srate 8000-48000
audio_channels 1-2

ausrc_srate 48000

auplay_srate 48000

ausrc_channels 0

auplay_channels 0

Video

video_source v4l2,/dev/video0

video_display x11,nil

video_size 352x288
video_bitrate 512000
video_fps 25

AVT - Audio/Video Transport

rtp_tos 184

rtp_ports 10000-20000

rtp_bandwidth 512-1024 # [kbit/s]

rtcp_enable yes
rtcp_mux no
jitter_buffer_delay 5-10 # frames
rtp_stats no

Network

dns_server 10.0.0.1:53

net_interface eth1

BFCP

bfcp_proto udp

------------------------------------------------------------------------------

Modules

module_path /usr/lib/baresip/modules

UI Modules

module stdio.so
module cons.so

module evdev.so

module httpd.so

Audio codec Modules (in order)

module opus.so

module silk.so

module amr.so

module g7221.so

module g722.so

module g726.so

module g711.so

module gsm.so

module l16.so

module speex.so

module bv32.so

Audio filter Modules (in encoding order)

module vumeter.so

module sndfile.so

module speex_aec.so
module speex_pp.so

module plc.so

Audio driver Modules

module oss.so
module alsa.so

module portaudio.so

Video codec Modules (in order)

module avcodec.so

module vpx.so

Video filter Modules (in encoding order)

module selfview.so

Video source modules

module v4l.so

module v4l2.so

module x11grab.so

module cairo.so

Video display modules

module x11.so

module sdl2.so

Audio/Video source modules

module rst.so

module gst.so

Media NAT modules

module stun.so
module turn.so
module ice.so

module natpmp.so

Media encryption modules

module srtp.so

module dtls_srtp.so

------------------------------------------------------------------------------

Temporary Modules (loaded then unloaded)

module_tmp uuid.so

module_tmp account.so

------------------------------------------------------------------------------

Application Modules

module_app auloop.so
module_app contact.so
module_app menu.so

module_app mwi.so

module_app natbd.so

module_app presence.so

module_app syslog.so

module_app vidloop.so

------------------------------------------------------------------------------

Module parameters

Speex codec parameters

speex_quality 7 # 0-10
speex_complexity 7 # 0-10
speex_enhancement 0 # 0-1
speex_vbr 0 # Variable Bit Rate 0-1
speex_vad 0 # Voice Activity Detection 0-1
speex_agc_level 8000

NAT Behavior Discovery

natbd_server creytiv.com
natbd_interval 600 # in seconds

Selfview

video_selfview window # {window,pip}

selfview_size 64x64

ICE

ice_turn no
ice_debug no
ice_nomination regular # {regular,aggressive}
ice_mode full # {full,lite}

gst module fail to play file

I'm trying out latest stable version 0.4.13 with gst compiled on ubuntu 15.04, but I'm unable to make it work. gst module compiled and configured via wiki doc

It always fails me with audio: start_source failed: No such file or directory but strace says it not even looking up file

baresip return on error when receive call-in...

Hello Alfredh,

following are my environmental settings:

Baresip UA 1 (call BUA1 here) : Centos 6.5 (virtual box) , public IP
Baresip UA 2 (call BUA2 here) : Centos 6.5 , behind NAT
Linphone PC UA (called LinphoneUA here) : Windows 7 , public IP

I let BUA1 and BUA2 do registration and make a call between them,
however, the callee always return 486 Busy here,
even I change the caller to LinphoneUA , the result is the same.

And if the caller remain as baresip but the callee is changed to LinphoneUA or other non-baresip UA,
it works!

Any thought about this ? :P

Tutorials or examples require

Hi,

You work is greate but have one little bit problem. Could you add more baresip examples like call and play for example.

Thanks.

baresip IOT linphone 401Wrong MESSAGE-INTEGRITY attribute in same NAT

hi any comment how to IOT baresip vs linphone with ICE/STUN

baresip v0.4.13 Copyright (C) 2010 - 2015 Alfred E. Heggestad et al.
Local network address: IPv4=en0:192.168.0.188
aucodec: PCMU/8000/1
aucodec: PCMA/8000/1
aufilt: vumeter
auplay: coreaudio
ausrc: coreaudio
vidcodec: H264
vidcodec: H263
vidcodec: MP4V-ES
vidsrc: avformat
vidisp: opengl
medianat: stun
medianat: turn
medianat: ice
using stunserver: 'stun:stun03.vccloud.quantatw.com'
[email protected]: Using sipnat: `outbound'
[email protected]: Using medianat `ice'
Populated 1 account
Populated 4 contacts
Populated 2 audio codecs
Populated 1 audio filter
Populated 3 video codecs
Populated 0 video filters
baresip is ready.
[email protected]: {1/UDP/v4} 200 OK (kamailio (3.2.3 (x86_64/linux))) [1 binding]
All 1 useragent registered successfully! (113 ms)

call: connecting to 'sip:[email protected]'..
ice: audio: Default local candidates: 114.25.62.62:35072 / 114.25.62.62:35073
ice: video: Default local candidates: 114.25.62.62:9822 / 114.25.62.62:9823
call: SIP Progress: 100 trying -- your call is important to us (/)
call: SIP Progress: 180 Ringing (/)
main: long async blocking: 186>100 ms (h=0x10b37cb20 arg=0x7f8c6ad01470)
call: SIP Progress: 180 Ringing (/)
main: long async blocking: 177>100 ms (h=0x10b37cb20 arg=0x7f8c6ad01470)
{      audio.1} Set default remote candidate: srflx:114.25.62.62:7076
{      audio.2} Set default remote candidate: srflx:114.25.62.62:7077
{      video.1} Set default remote candidate: srflx:114.25.62.62:9078
{      video.2} Set default remote candidate: srflx:114.25.62.62:9079
chklist: audio: pruned candidate pairs: 4
{      audio.1}  host <--->  host  FSM:      Frozen ===> Waiting
{      audio.1}  host <---> srflx  FSM:      Frozen ===> Waiting
{      audio. } starting connectivity checks with 4 candidate pairs
chklist: video: pruned candidate pairs: 4
{      video. } starting connectivity checks with 4 candidate pairs
audio: Set audio decoder: PCMU 8000Hz 1ch
audio: Set audio encoder: PCMU 8000Hz 1ch
audio tx pipeline:   coreaudio ---> vumeter ---> PCMU
audio rx pipeline:   coreaudio <--- vumeter <--- PCMU
Set video encoder: H264 packetization-mode=0 (500000 bit/s, 25 fps)
[email protected]: Call established: sip:[email protected]
Set video decoder: H264 packetization-mode=0
video: no video source 'avformat': No such file or directory
video: could not set encoder format to [720 x 400] No such file or directory
video tx pipeline:        src ---> H264
video rx pipeline:     opengl <--- H264
main: long async blocking: 333>100 ms (h=0x10b37cb20 arg=0x7f8c6ad01470)
{      audio.1}  host <--->  host  FSM:     Waiting ===> InProgress
{      audio.1} Tx en0:host:192.168.0.188:35072 ---> host:192.168.0.102:7076 (InProgress)
{      video.1}  host <--->  host  FSM:      Frozen ===> InProgress
{      video.1} Tx en0:host:192.168.0.188:9822 ---> host:192.168.0.102:9078 (InProgress)
{      audio.1} Rx en0:host:192.168.0.188:35072 <--- host:192.168.0.102:7076 '401 Wrong MESSAGE-INTEGRITY attribute'
connchk: {audio.1} STUN Response: 401 Wrong MESSAGE-INTEGRITY attribute
{      audio.1}  host <--->  host  FSM:  InProgress ===> Failed
{      audio.1}  host <---> srflx  FSM:     Waiting ===> InProgress
{      audio.1} Tx en0:host:192.168.0.188:35072 ---> srflx:114.25.62.62:7076 (InProgress)
{      video.1} Rx en0:host:192.168.0.188:9822 <--- host:192.168.0.102:9078 '401 Wrong MESSAGE-INTEGRITY attribute'
connchk: {video.1} STUN Response: 401 Wrong MESSAGE-INTEGRITY attribute
{      video.1}  host <--->  host  FSM:  InProgress ===> Failed
{      video.2}  host <--->  host  FSM:      Frozen ===> InProgress
{      video.2} Tx en0:host:192.168.0.188:9823 ---> host:192.168.0.102:9079 (InProgress)
{      video.2} Rx en0:host:192.168.0.188:9823 <--- host:192.168.0.102:9079 '401 Wrong MESSAGE-INTEGRITY attribute'
connchk: {video.2} STUN Response: 401 Wrong MESSAGE-INTEGRITY attribute
{      video.2}  host <--->  host  FSM:  InProgress ===> Failed
{      video.1}  host <---> srflx  FSM:      Frozen ===> InProgress
{      video.1} Tx en0:host:192.168.0.188:9822 ---> srflx:114.25.62.62:9078 (InProgress)
sip:[email protected]: session closed: Connection reset by peer            ]
sip:[email protected]: Call with sip:[email protected] terminated (duration: 7 secs)
main: long async blocking: 133>100 ms (h=0x10b37cb20 arg=0x7f8c6ad01470)
terminated by signal 2
Stopping 1 useragent..

baresip core dump with vidloop on imx6 with buildroot 2015.05 glibc 2.20

Hi,
I'm try using baresip on iMX6 with buildroot 2015.05 anybody have same experience

# baresip -v
baresip v0.4.13 Copyright (C) 2010 - 2015 Alfred E. Heggestad et al.
Local network address: IPv4=eth0:192.168.0.38
ui: stdio
aucodec: PCMU/8000/1
aucodec: PCMA/8000/1
aufilt: vumeter
ausrc: alsa
auplay: alsa
avcodec: x264 build 142
vidcodec: H264
vidcodec: H263
vidcodec: MP4V-ES
vidsrc: avformat
vidsrc: fakevideo
vidisp: fakevideo
medianat: stun
medianat: turn
medianat: ice
using stunserver: 'stun:'
[email protected]: Using sipnat: `outbound'
[email protected]: Using medianat `ice'
Populated 1 account
Populated 4 contacts
Populated 2 audio codecs
Populated 1 audio filter
Populated 3 video codecs
Populated 0 video filters
baresip is ready.
[email protected]: {1/UDP/v4} 200 OK (kamailio (3.2.3 (x86_64/linux))) [1 binding]
All 1 useragent registered successfully! (133 ms)
Enable video-loop on avformat,/tmp/foo.mp4: 190 x 240
vidloop: avformat,/tmp/foo.mp4: open video source: 190 x 240 at 25 fps
avformat: stream 1:  240 x 190   time_base=1000/1 <<<<<<<<<
vidloop: open video display (.)
Segmentation fault (core dumped)

running on ubuntu w/o such problem any comments with following lib

ffmpeg 2.6.2
+-libavcode 56
+-libavxxxx 56
x264 20140930-2245
mediastreamer-2.9.0

re make fails: Undefined symbols for architecture x86_64:

On macbook pro, OS X 10.11 El Capitan, Xcode 7.0.1 installed:
re-0.4.13 make fails with:
Undefined symbols for architecture x86_64:
"__mod_close", referenced from:
_mod_destructor in mod.o
"__mod_open", referenced from:
_mod_load in mod.o
"__mod_sym", referenced from:
_mod_load in mod.o
"_lock_alloc", referenced from:
_rtcp_sess_alloc in sess.o
"_lock_read_get", referenced from:
_rtcp_stats in sess.o
_rtcp_debug in sess.o
"_lock_rel", referenced from:
_rtcp_sess_tx_rtp in sess.o
_rtcp_stats in sess.o
_rtcp_debug in sess.o
_mk_sr in sess.o
"_lock_write_get", referenced from:
_rtcp_sess_tx_rtp in sess.o
_mk_sr in sess.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libre.dylib] Error 1

make CC=clang produces same results. Am I doing it wrong?

No proper sound on OpenWrt with USB sound card

I am trying to run baresip on a D-Link DIR-505 running OpenWrt with a C-Media based USB sound card.

I seem to be able to register to the SIP server and make calls, but I do not get proper sound but instead some squelching noise that you can hear here: http://picosong.com/Cs64

Other audio applications work just fine on the same system. What could be going wrong here?

See below for some technical information, and please let me know if you need more.

# cat /etc/*release

DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="Bleeding Edge"
DISTRIB_REVISION="r39930"
DISTRIB_CODENAME="barrier_breaker"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker r39930"
DISTRIB_TAINTS=""

# opkg list | grep baresip

baresip - 0.4.10-2
baresip-mod-alsa - 0.4.10-2
baresip-mod-evdev - 0.4.10-2
baresip-mod-g711 - 0.4.10-2
baresip-mod-g722 - 0.4.10-2
baresip-mod-stdio - 0.4.10-2

# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

# /etc/asound.conf

defaults.dmix."USB-Audio".period_size 2048

# /root/.baresip/config

# Audio
audio_player            alsa,default
audio_source            alsa,default
audio_alert             alsa,default
audio_srate             8000-48000
audio_channels          1-2
ausrc_srate             48000
auplay_srate            48000
#ausrc_channels         0
#auplay_channels        0

# baresip -v -ed+49800XXXXXXXXXX

[email protected]: {0/UDP/v4} 200 OK (Sipwise NGCP Proxy 2.X) [3 bindings]
call: SIP Progress: 183 Session Progress (application/sdp)
[email protected]: Call in-progress: sip:[email protected]
audio: Set audio encoder: PCMU 8000Hz 1ch
audio: enable ausrc resampler: 8000Hz/1ch <-- 48000Hz/1ch
audio: Set audio decoder: PCMU 8000Hz 1ch
audio: enable auplay resampler: 8000Hz/1ch --> 48000Hz/1ch
audio tx pipeline:        alsa ---> PCMU
audio rx pipeline:        alsa <--- PCMU
[email protected]: Call established: sip:[email protected]

Add support for GRUU

Get the Public GRUU from 200 OK response to REGISTER, and save it.
If present, this GRUU will be used as Contact for sipsess/sipevent.

Baresip build on Debian Wheezy fails | GTK related

Relevant build log section:

CC [M] build-x86_64/modules/gtk/gtk_mod.o modules/gtk/gtk_mod.c: In function ‘notify_incoming_call’: modules/gtk/gtk_mod.c:271:2: error: unknown type name ‘GNotification’ modules/gtk/gtk_mod.c:278:2: warning: implicit declaration of function ‘g_notification_new’ [-Wimplicit-function-declaration] modules/gtk/gtk_mod.c:278:2: warning: nested extern declaration of ‘g_notification_new’ [-Wnested-externs] modules/gtk/gtk_mod.c:278:15: warning: assignment makes pointer from integer without a cast [enabled by default] modules/gtk/gtk_mod.c:284:2: warning: implicit declaration of function ‘g_notification_set_urgent’ [-Wimplicit-function-declaration] modules/gtk/gtk_mod.c:284:2: warning: nested extern declaration of ‘g_notification_set_urgent’ [-Wnested-externs] modules/gtk/gtk_mod.c:288:2: warning: implicit declaration of function ‘g_notification_set_body’ [-Wimplicit-function-declaration] modules/gtk/gtk_mod.c:288:2: warning: nested extern declaration of ‘g_notification_set_body’ [-Wnested-externs] modules/gtk/gtk_mod.c:289:2: warning: implicit declaration of function ‘g_notification_add_button_with_target_value’ [-Wimplicit-function-declaration] modules/gtk/gtk_mod.c:289:2: warning: nested extern declaration of ‘g_notification_add_button_with_target_value’ [-Wnested-externs] modules/gtk/gtk_mod.c:293:2: warning: implicit declaration of function ‘g_application_send_notification’ [-Wimplicit-function-declaration] modules/gtk/gtk_mod.c:293:2: warning: nested extern declaration of ‘g_application_send_notification’ [-Wnested-externs] modules/gtk/gtk_mod.c: In function ‘denotify_incoming_call’: modules/gtk/gtk_mod.c:305:2: warning: implicit declaration of function ‘g_application_withdraw_notification’ [-Wimplicit-function-declaration] modules/gtk/gtk_mod.c:305:2: warning: nested extern declaration of ‘g_application_withdraw_notification’ [-Wnested-externs] modules/gtk/gtk_mod.c: In function ‘message_handler’: modules/gtk/gtk_mod.c:442:2: error: unknown type name ‘GNotification’ modules/gtk/gtk_mod.c:455:15: warning: assignment makes pointer from integer without a cast [enabled by default]

Seems to be related to the libglib2.0-0 package, where on Debian 8 the package libglib2.44.X is beeing used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.