mirror of https://github.com/OpenIPC/firmware.git
Update Baresip package (#1498)
parent
a38d179971
commit
0dab317cb7
|
@ -2,7 +2,7 @@ config BR2_PACKAGE_BARESIP_OPENIPC
|
|||
bool "baresip-openipc"
|
||||
help
|
||||
Baresip is a portable and modular SIP User-Agent with audio
|
||||
and video support. Copyright (c) 2010 - 2022 Alfred E. Heggestad
|
||||
and video support. Copyright (c) 2010 - 2024 Alfred E. Heggestad
|
||||
and Contributors Distributed under BSD license.
|
||||
|
||||
https://github.com/baresip/baresip
|
||||
|
|
|
@ -5,13 +5,43 @@
|
|||
#############################################################
|
||||
|
||||
BARESIP_OPENIPC_SITE = $(call github,baresip,baresip,$(BARESIP_OPENIPC_VERSION))
|
||||
BARESIP_OPENIPC_VERSION = v3.12.0
|
||||
BARESIP_OPENIPC_VERSION = v3.14.0
|
||||
|
||||
BARESIP_OPENIPC_DEPENDENCIES = libre-openipc
|
||||
BARESIP_OPENIPC_DEPENDENCIES = libre-openipc webrtc-audio-processing-openipc mosquitto
|
||||
|
||||
BARESIP_OPENIPC_CONF_OPTS = \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG -s" \
|
||||
-DUSE_MBEDTLS=ON
|
||||
-DUSE_MBEDTLS=ON \
|
||||
-DWEBRTC_AEC_INCLUDE_DIR=$(WEBRTC_AUDIO_PROCESSING_OPENIPC_DIR) \
|
||||
-DMOSQUITTO_INCLUDE_DIR=$(MOSQUITTO_DIR)
|
||||
|
||||
define BARESIP_OPENIPC_INSTALL_CONF
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d
|
||||
$(INSTALL) -m 755 -t $(TARGET_DIR)/etc/init.d $(BARESIP_OPENIPC_PKGDIR)/files/S97baresip
|
||||
|
||||
# $(INSTALL) -m 755 -d $(TARGET_DIR)/etc/baresip
|
||||
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/baresip $(BARESIP_OPENIPC_PKGDIR)/files/accounts
|
||||
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/baresip $(BARESIP_OPENIPC_PKGDIR)/files/config
|
||||
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/baresip $(BARESIP_OPENIPC_PKGDIR)/files/contacts
|
||||
|
||||
cp $(@D)/docs/examples/accounts $(TARGET_DIR)/etc/baresip/accounts.orig
|
||||
cp $(@D)/docs/examples/config $(TARGET_DIR)/etc/baresip/config.orig
|
||||
cp $(@D)/docs/examples/contacts $(TARGET_DIR)/etc/baresip/contacts.orig
|
||||
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
|
||||
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(BARESIP_OPENIPC_PKGDIR)/files/dtmf_0.sh
|
||||
ln -sf dtmf_0.sh $(TARGET_DIR)/usr/bin/dtmf_1.sh
|
||||
ln -sf dtmf_0.sh $(TARGET_DIR)/usr/bin/dtmf_2.sh
|
||||
ln -sf dtmf_0.sh $(TARGET_DIR)/usr/bin/dtmf_3.sh
|
||||
|
||||
# $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib/sounds
|
||||
# $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/sounds $(BARESIP_OPENIPC_PKGDIR)/files/ok_8k.pcm
|
||||
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/share/baresip
|
||||
cp $(@D)/share/*.wav $(TARGET_DIR)/usr/share/baresip
|
||||
endef
|
||||
|
||||
BARESIP_OPENIPC_POST_INSTALL_TARGET_HOOKS += BARESIP_OPENIPC_INSTALL_CONF
|
||||
|
||||
$(eval $(cmake-package))
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
|
||||
DAEMON="baresip"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
DAEMON_ARGS="-f /etc/baresip"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
rm -f "$PIDFILE"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
|
@ -0,0 +1,3 @@
|
|||
#
|
||||
#<sip:000001-XXX@pbx.zadarma.com;transport=udp>;auth_pass=MyPass;answermode=auto
|
||||
#
|
|
@ -0,0 +1,108 @@
|
|||
# Core
|
||||
poll_method epoll # poll, select, epoll ..
|
||||
|
||||
# SIP
|
||||
sip_listen 0.0.0.0:5060
|
||||
#sip_certificate cert.pem
|
||||
sip_cafile /etc/ssl/certs/ca-certificates.crt
|
||||
#sip_transports udp,tcp,tls,ws,wss
|
||||
#sip_trans_def udp
|
||||
#sip_verify_server yes
|
||||
sip_tos 160
|
||||
|
||||
# Call
|
||||
call_local_timeout 120
|
||||
call_max_calls 1
|
||||
call_hold_other_calls yes
|
||||
|
||||
# Audio
|
||||
#audio_path /usr/share/baresip
|
||||
#audio_player none
|
||||
#audio_source none
|
||||
#audio_alert alsa,default
|
||||
#ausrc_srate 48000
|
||||
#auplay_srate 48000
|
||||
#ausrc_channels 0
|
||||
#auplay_channels 0
|
||||
#audio_txmode poll # poll, thread
|
||||
audio_level no
|
||||
ausrc_format s16 # s16, float, ..
|
||||
auplay_format s16 # s16, float, ..
|
||||
auenc_format s16 # s16, float, ..
|
||||
audec_format s16 # s16, float, ..
|
||||
audio_buffer 20-160 # ms
|
||||
audio_telev_pt 101 # payload type for telephone-event
|
||||
|
||||
# Video
|
||||
#video_source v4l2,/dev/video0
|
||||
#video_source fakevideo,nil
|
||||
#video_display x11,nil
|
||||
video_size 640x480
|
||||
video_bitrate 1000000
|
||||
video_fps 30.00
|
||||
video_fullscreen no
|
||||
videnc_format yuv420p
|
||||
|
||||
# AVT - Audio/Video Transport
|
||||
rtp_tos 184
|
||||
rtp_video_tos 136
|
||||
#rtp_ports 10000-20000
|
||||
#rtp_bandwidth 512-1024 # [kbit/s]
|
||||
rtcp_mux no
|
||||
audio_itter_buffer_type fixed # off, fixed, adaptive
|
||||
audio_jitter_buffer_delay 5-10 # frames
|
||||
#jitter_buffer_wish 6 # frames for start
|
||||
rtp_stats no
|
||||
rtp_timeout 4
|
||||
|
||||
module_path /usr/lib/baresip/modules
|
||||
|
||||
# UI Modules
|
||||
module stdio.so
|
||||
module g711.so
|
||||
#module avformat.so
|
||||
|
||||
module_app account.so
|
||||
module_app contact.so
|
||||
module_app debug_cmd.so
|
||||
module_app syslog.so
|
||||
module_app ctrl_tcp.so
|
||||
#
|
||||
module_app menu.so
|
||||
#module_app mwi.so
|
||||
#module_app presence.so
|
||||
#module_app serreg.so
|
||||
module_app netroam.so
|
||||
|
||||
# UI Modules parameters
|
||||
cons_listen 0.0.0.0:3000 # cons - Console UI UDP/TCP sockets
|
||||
|
||||
ctrl_tcp_listen 0.0.0.0:2000 # ctrl_tcp - TCP interface JSON
|
||||
|
||||
evdev_device /dev/input/event0
|
||||
|
||||
# Opus codec parameters
|
||||
opus_bitrate 28000 # 6000-510000
|
||||
|
||||
vumeter_stderr yes
|
||||
|
||||
# Selfview
|
||||
video_selfview window # {window,pip}
|
||||
#selfview_size 64x64
|
||||
|
||||
|
||||
############################################################
|
||||
|
||||
# WebControl
|
||||
module_app httpd.so
|
||||
http_listen 0.0.0.0:5500
|
||||
|
||||
# OpenIPC integration
|
||||
module openipc_audio.so
|
||||
module openipc_video.so
|
||||
module_app relay.so
|
||||
|
||||
# Other UI Modules
|
||||
module webrtc_aec.so
|
||||
module fakevideo.so
|
||||
# module mqtt.so
|
|
@ -0,0 +1,3 @@
|
|||
#
|
||||
"OpenIPC Support" <sip:support@openipc.org>;access=allow
|
||||
#
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
# timeout 2 curl -s --data-binary @/usr/lib/sounds/dog-many_48k.pcm http://localhost/play_audio
|
||||
|
Loading…
Reference in New Issue