Compare commits

..

9 Commits

Author SHA1 Message Date
Jakob Olsson
bd5aed0538 questd: remove uproxyd files 2019-06-04 10:59:56 +02:00
Jakob Olsson
92faca44b9 owsd: version 1.1.2 2019-06-04 10:49:19 +02:00
Jakob Olsson
a0c2a6615e owsd: only start uproxyd if ubus-x is enabled 2019-06-04 10:34:36 +02:00
Sukru Senli
97d08f94fb owsd: add uproxyd as config option 2019-06-04 08:35:01 +02:00
Jakob Olsson
5310bbc945 questd: dont install uproxyd 2019-05-29 12:08:55 +02:00
Jakob Olsson
86af5bdd28 owsd: install uproxyd from pkg_build_dir 2019-05-29 12:08:39 +02:00
Jakob Olsson
9f5b4710eb owsd: update pkg hash to point to cr branch 2019-05-29 10:53:56 +02:00
Jakob Olsson
29f0657c99 owsd: update help text for OWSD_UPROXYD 2019-05-29 10:53:17 +02:00
Jakob Olsson
ed9e36addc owsd: add support for OWSD_UPROXYD option and transfer uproxyd binaries 2019-05-29 10:47:33 +02:00
9 changed files with 187 additions and 63 deletions

View File

@@ -11,7 +11,7 @@ PKG_RELEASE:=1
PKG_VERSION:=1.3.0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5a5c94b289c79bc3a635b8d742dd9b73dcc0615f
PKG_SOURCE_VERSION:=637aa9ef231f81d195f7a1b67c70af445ade7fee
PKG_NAME:=dectmngr2

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c656cd47a9f911cfe3946e3d4a374b4ae9e5d801
PKG_SOURCE_VERSION:=9b7accf0ac4f7c8010fb06ba83df9e53264b429a
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@inteno.se>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -10,7 +10,7 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git
PKG_SOURCE_VERSION:=da5bcdbaa96d01e878d921c90c34a04bbdfca973
PKG_SOURCE_VERSION:=930db7f4af821e91f46107c8a76b60f943ec7c3b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_INSTALL:=1
@@ -61,6 +61,8 @@ define Package/owsd/install
$(INSTALL_CONF) ./files/owsd.config $(1)/etc/config/owsd
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/owsd.hotplug $(1)/etc/hotplug.d/iface/55-owsd
# $(INSTALL_DIR) $(1)/etc/uci-defaults
# $(INSTALL_BIN) ./files/owsd.uci_default $(1)/etc/uci-defaults/55-owsd-interfaces
endef
define Package/owsd-testdata

View File

@@ -150,7 +150,6 @@ validate_owsd_iface() {
'origin:list(string)' \
'whitelist_interface_as_origin:bool:0' \
'whitelist_dhcp_domains:bool:0' \
'whitelist_all_origins:bool:0' \
'ipv6:bool:1' \
'ipv6only:bool:0' \
'linklocal:bool:0' \
@@ -164,7 +163,7 @@ validate_owsd_iface() {
}
parse_owsd_iface() {
local port interface whitelist_interface_as_origin whitelist_dhcp_domains whitelist_all_origins ipv6 ipv6only linklocal
local port interface whitelist_interface_as_origin whitelist_dhcp_domains ipv6 ipv6only linklocal
local cert key ca
local restrict_to_user
local ubusx_acl
@@ -192,23 +191,9 @@ parse_owsd_iface() {
}
origin_whitelist_all() {
[ "$1" = "*" ] && echo "true"
}
append_whitelists () {
config_list_foreach "$1" "origin" append_origin
whitelist=$(config_list_foreach "$1" "origin" origin_whitelist_all)
[ -n "$whitelist" ] && whitelist_all_origins=1
if [ "$whitelist_all_origins" -eq 1 ]; then
procd_append_param command -O
whitelist_dhcp_domains=1
whitelist_interface_as_origin=1
fi
if [ "$whitelist_dhcp_domains" -eq 1 ]; then
for domain in $DHCP_DOMAINS; do
append_origin_parts "${http}" "${domain}" "${port}"

View File

@@ -0,0 +1,87 @@
#!/bin/sh
. /lib/functions.sh
MGMT_INTERFACES=""
OWSD_INTERFACES=""
NOT_DEFAULT=0
mgmt_interfaces() {
local interface=$1
[ "$interface" == "loopback" ] && return
[ "$interface" == "lan" ] && return
[ "$interface" == "wan" ] && return
[ "$interface" == "wan6" ] && return
local type proto
config_get type $interface type
config_get proto $interface proto "none"
[ "$type" == "bridge" -a "$proto" == "none" ] && return
local is_lan
config_get is_lan $interface is_lan
[ "$is_lan" == "1" ] && return
local ifname
config_get ifname $interface ifname
[ "${ifname:0:1}" == "@" ] && return
MGMT_INTERFACES="$MGMT_INTERFACES $interface"
}
owsd_interfaces() {
local config=$1
local interface
config_get interface $config interface
[ "$interface" == "loopback" ] && return
[ "$interface" == "lan" ] && return
[ "$interface" == "wan" ] && return
[ "$interface" == "wan6" ] && return
OWSD_INTERFACES="$OWSD_INTERFACES $interface"
NOT_DEFAULT=1
}
not_owsd() {
local interface=$1
local there=0
for owsd in $OWSD_INTERFACES; do
if [ "$interface" == "$owsd" ]; then
there=1
break
fi
done
return $there
}
config_load network
config_foreach mgmt_interfaces interface
config_load owsd
config_foreach owsd_interfaces owsd-listen
if [ $NOT_DEFAULT -eq 0 ]; then
for mgmt in $MGMT_INTERFACES; do
if $(not_owsd $mgmt); then
uci -q set owsd.$mgmt=owsd-listen
uci -q set owsd.$mgmt.port=80
uci -q set owsd.$mgmt.interface="$mgmt"
uci -q set owsd.$mgmt.ipv6="on"
uci -q set owsd.$mgmt.whitelist_interface_as_origin="1"
uci -q set owsd.$mgmt.origin="*"
uci -q set owsd.$mgmt"_8080"=owsd-listen
uci -q set owsd.$mgmt"_8080".port=8080
uci -q set owsd.$mgmt"_8080".interface="$mgmt"
uci -q set owsd.$mgmt"_8080".ipv6="on"
uci -q set owsd.$mgmt"_8080".whitelist_interface_as_origin="1"
uci -q set owsd.$mgmt"_8080".origin="*"
uci commit owsd
fi
done
fi
exit 0

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=4.1.0
PKG_SOURCE_VERSION:=3c7c4da8cdf14e4abb75a41e3ef9f2eddc9d75ae
PKG_SOURCE_VERSION:=fdd80766b50fce51f68ff675b0e5398e0d31d3bb
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd

View File

@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uspd
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=50a4346d518fd80d22cd9694ee3c1dba336bd072
PKG_SOURCE_VERSION:=e8ee6a35751e661dd621b8b5c4cb788fe2081f58
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz

View File

@@ -17,8 +17,8 @@ START=60
USE_PROCD=1
# Some global variables
SERIAL="$(getSerial)"
BASEMAC="$(getBaseMAC)"
SERIAL=$(getSerial)
BASEMAC=$(getBaseMAC)
MODULENAME=voice
USERAGENT="Inteno_${SERIAL}_${BASEMAC}"
@@ -32,10 +32,7 @@ ASTERISKDIR=/etc/asterisk
WORKDIR=/tmp/$MODULENAME.$$
MD5SUMSFILE=/tmp/$MODULENAME-sums.$$
LINENAME="$(getLineName)"
CHANNELNAME="$(getChannelName)"
# Whitespace separated list of $CHANNELNAME feature access codes
# Whitespace separated list of $(getChannelName) feature access codes
CHANNEL_FAC=
#TODO: go through templates, check usage
@@ -85,7 +82,7 @@ TMPL_ACL=$TEMPLATEDIR/acl.conf.TEMPLATE
TMPL_CONFBRIDGE=$TEMPLATEDIR/confbridge.conf.TEMPLATE
TMPL_UDPTL=$TEMPLATEDIR/udptl.conf.TEMPLATE
TMPL_CHANNEL=$TEMPLATEDIR/$LINENAME.conf.TEMPLATE
TMPL_CHANNEL=$TEMPLATEDIR/$(getLineName).conf.TEMPLATE
TMPL_CHANNEL_LINE=$TEMPLATEDIR/tel_line.TEMPLATE
TMPL_MEETME=$TEMPLATEDIR/meetme.conf.TEMPLATE
@@ -185,7 +182,7 @@ assemble_and_copy_config()
mv $WORKDIR/sip_registrations.tmp $WORKDIR/sip_registrations.conf
mv $WORKDIR/sip_providers.tmp $WORKDIR/sip_providers.conf
mv $WORKDIR/sip_users.tmp $WORKDIR/sip_users.conf
mv $WORKDIR/$LINENAME.tmp $WORKDIR/$LINENAME.conf
mv $WORKDIR/$(getLineName).tmp $WORKDIR/$(getLineName).conf
mv $WORKDIR/extensions.tmp $WORKDIR/extensions.conf
mv $WORKDIR/codecs.tmp $WORKDIR/codecs.conf
mv $WORKDIR/rtp.tmp $WORKDIR/rtp.conf
@@ -340,7 +337,7 @@ read_lines()
for i in $call_lines ; do
case $i in
''|*[!0-9]*) lines=$lines"$i&" ;;
*) lines=$lines"$CHANNELNAME/$i&" ;;
*) lines=$lines"$(getChannelName)/$i&" ;;
esac
done
@@ -1035,9 +1032,9 @@ configure_queue()
do
local out=""
re='^[0-9]+$'
num=${member#$LINENAME}
num=${member#$(getLineName)}
if [ -z "${num##[0-9]*}" ] ; then
out="$CHANNELNAME/$num"
out="$(getChannelName)/$num"
else
local sip_user
config_get sip_user $member user
@@ -1481,7 +1478,6 @@ configure_extensions()
#
configure_extensions_provider()
{
echo COMES HERE
local enabled
local displayname
local user
@@ -1692,7 +1688,7 @@ configure_extensions_provider()
echo "exten => $user,n(norewrite),NoOp()">> $tmp
# read a list of lines that should be dialled on incoming calls
incoming_lines="$(read_lines $1)"
incoming_lines=$(read_lines $1)
config_get call_queue $1 call_queue
config_get call_ivr $1 call_ivr
if [ -n "$incoming_lines" ]; then
@@ -1741,7 +1737,7 @@ configure_tel_line_extension()
local cbbs_retrytime
local cbbs_waittime
local mailbox
local line_name=$LINENAME
local line_name=$(getLineName)
line=${1:${#line_name}}
config_get extension $1 extension
@@ -1846,11 +1842,11 @@ configure_codecs()
}
#
# Configure default settings for $LINENAME.conf
# Configure default settings for $(getLineName).conf
#
configure_tel()
{
echo "Configuring $CHANNELNAME"
echo "Configuring $(getChannelName)"
local jbenable
local jbforce
local jbmaxsize
@@ -1877,29 +1873,29 @@ configure_tel()
dialoutmsec=4000
fi
sed -i "s/|JBENABLE|/$jbenable/" $WORKDIR/$LINENAME.tmp
sed -i "s/|JBFORCE|/$jbforce/" $WORKDIR/$LINENAME.tmp
sed -i "s/|JBMAXSIZE|/$jbmaxsize/" $WORKDIR/$LINENAME.tmp
sed -i "s/|JBIMPL|/$jbimpl/" $WORKDIR/$LINENAME.tmp
sed -i "s/|DIALOUTMSEC|/$dialoutmsec/" $WORKDIR/$LINENAME.tmp
sed -i "s/|FAC|/$CHANNEL_FAC/" $WORKDIR/$LINENAME.tmp
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORKDIR/$LINENAME.tmp
sed -i "s/|ECHOCANCEL|/$(getEchoCancellingValue $echocancel)/" $WORKDIR/$LINENAME.tmp
sed -i "s/|JBENABLE|/$jbenable/" $WORKDIR/$(getLineName).tmp
sed -i "s/|JBFORCE|/$jbforce/" $WORKDIR/$(getLineName).tmp
sed -i "s/|JBMAXSIZE|/$jbmaxsize/" $WORKDIR/$(getLineName).tmp
sed -i "s/|JBIMPL|/$jbimpl/" $WORKDIR/$(getLineName).tmp
sed -i "s/|DIALOUTMSEC|/$dialoutmsec/" $WORKDIR/$(getLineName).tmp
sed -i "s/|FAC|/$CHANNEL_FAC/" $WORKDIR/$(getLineName).tmp
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORKDIR/$(getLineName).tmp
sed -i "s/|ECHOCANCEL|/$(getEchoCancellingValue $echocancel)/" $WORKDIR/$(getLineName).tmp
if [ "$dtmfmode" == "compatibility" ] ; then
dtmfcompatibility="1"
else
dtmfcompatibility="0"
fi
sed -i "s/|DTMFCOMPATIBILITY|/$dtmfcompatibility/" $WORKDIR/$LINENAME.tmp
sed -i "s/|DTMFCOMPATIBILITY|/$dtmfcompatibility/" $WORKDIR/$(getLineName).tmp
}
#
# Configure settings for individual line in $LINENAME.conf
# Configure settings for individual line in $(getLineName).conf
#
configure_tel_line()
{
echo "Configuring $CHANNELNAME line $1"
echo "Configuring $(getChannelName) line $1"
local extension
local sip_provider
local codecs
@@ -1921,9 +1917,11 @@ configure_tel_line()
config_get clir $1 clir
#If line is configured with no sip_provider, or sip_provider is disabled, use local_extensions context
config_get sip_provider_user $sip_provider user
config_get sip_provider_enabled $sip_provider enabled
if [ "$sip_provider" == "-" -o -z "$sip_provider_enabled" -o "$sip_provider_enabled" == "0" -o -z "$sip_provider_user" ] ; then
[ -n "$sip_provider" ] && {
config_get sip_provider_user $sip_provider user
config_get sip_provider_enabled $sip_provider enabled
}
if [ -z "$sip_provider" -o "$sip_provider" == "-" -o -z "$sip_provider_enabled" -o "$sip_provider_enabled" == "0" -o -z "$sip_provider_user" ] ; then
sip_provider="local_extensions"
fi
@@ -1956,7 +1954,7 @@ configure_tel_line()
sed -i "s/|DTMFRELAY|/$dtmfmode/" $WORKDIR/tel_line.tmp
sed -i "s/|CALLWAITING|/$callwaiting/" $WORKDIR/tel_line.tmp
sed -i "s/|CLIR|/$clir/" $WORKDIR/tel_line.tmp
sed -i "s/|LINE_NAME|/$LINENAME/" $WORKDIR/tel_line.tmp
sed -i "s/|LINE_NAME|/$(getLineName)/" $WORKDIR/tel_line.tmp
#Configure CHANNEL line with codecs according to the SIP line settings
# local is_fax
@@ -1967,7 +1965,7 @@ configure_tel_line()
# sed -i "s/|ALLOW|/$(read_codecs $sip_provider)/" $WORKDIR/tel_line.tmp
# fi
cat $WORKDIR/tel_line.tmp >> $WORKDIR/$LINENAME.tmp
cat $WORKDIR/tel_line.tmp >> $WORKDIR/$(getLineName).tmp
rm -f $WORKDIR/tel_line.tmp
}
@@ -2066,15 +2064,57 @@ pbx_fix_ownership()
chown $ASTUSER:$ASTGROUP -R $ASTDIRSRECURSIVE
}
# Set voice_client.LINE_x.sip_account correctly as per "voice_client.sipX.call_lines"
set_line_sip_account()
{
local tel_line=$1
local old_sip_account=
local new_sip_account=
local line_name=$(getLineName)
local line_name_len=${#line_name}
local lnum=${tel_line:${line_name_len}}
local chan_name=$(getChannelName)
local ___type="sip_service_provider"
local section cfgtype call_lines chan_num
config_get old_sip_account $tel_line sip_account
# Note: On Intel platform, tel_line's section name starts with 0, e.g. tapi0.
# But channel index in voice_client.sipX.call_lines starts with 1, e.g. TAPI/1
if [ "$line_name" == "tapi" ]; then
chan_num=$((lnum+1))
else
chan_num=$lnum
fi
for section in ${CONFIG_SECTIONS}; do
config_get cfgtype "$section" TYPE
[ -n "$___type" -a "x$cfgtype" != "x$___type" ] && continue
config_get call_lines "$section" call_lines
# Note: tel_line's section name starts with 0, e.g. tapi0 or brcm0.
# But channel index in voice_client.sipX.call_lines starts with 1, e.g. TAPI/1
[ -n "$call_lines" ] && echo "$call_lines" | grep -q "$chan_name/$chan_num" && {
# Append this sip_acount to the tel line
if [ -z "$new_sip_account" ]; then
new_sip_account="$section"
else
new_sip_account="$new_sip_account $section"
fi
}
done
[ "$old_sip_account" != "$new_sip_account" ] && uci_set voice_client $tel_line sip_account "$new_sip_account"
}
#
# Calculate a name for each $LINENAME line, depending on port type
# Calculate a name for each $(getLineName) line, depending on port type
# and number. The name is used to make UI look better.
#
set_line_name()
{
local maxlinenum=$2
local curname name_ix ix item lnum
local line_name=$LINENAME
local line_name=$(getLineName)
local line_name_len=${#line_name}
local tel_line=$1
@@ -2162,6 +2202,12 @@ start_service() {
# Load config file
config_load voice_client
########################################################
# Set line sip_account according to sip accounts'
# settings
########################################################
config_foreach set_line_sip_account tel_line
########################################################
# Set line names according to board parameters
# and delete non-existing lines from voice_client config
@@ -2170,6 +2216,9 @@ start_service() {
config_foreach set_line_name tel_line $maxlinenum
uci_commit voice_client
# Reload the config since it has changed
config_load voice_client
#######################################
# Create temporary files from templates
#######################################
@@ -2180,7 +2229,7 @@ start_service() {
cp $TMPL_SIP $WORKDIR/sip.tmp
cp $TMPL_RTP $WORKDIR/rtp.tmp
cp $TMPL_STUN $WORKDIR/res_stun_monitor.tmp
cp $TMPL_CHANNEL $WORKDIR/$LINENAME.tmp
cp $TMPL_CHANNEL $WORKDIR/$(getLineName).tmp
cp $TMPL_CODECS $WORKDIR/codecs.tmp
cp $TMPL_VOICEMAIL $WORKDIR/voicemail.tmp
cp $TMPL_DNSMGR $WORKDIR/dnsmgr.tmp
@@ -2295,16 +2344,17 @@ stop_service() {
reload_service() {
start
#stop
# turn off voice led; asterisk will turn it on
# if there is a registered account
# turn off voice led; asterisk will turn it on if there is a registered account
ubus call led.voice1 set '{"state":"off"}'
# FXS channel module must be reloaded before sip module. Otherwise some attributes like
# line's registration state which is updated by SIP module through callback might be
# reset.
asterisk -rx "$(getChipVendor) reload"
asterisk -rx "config reload $ASTERISKDIR/sip.conf"
sleep 1
asterisk -rx "core reload"
asterisk -rx "dialplan reload"
asterisk -rx "$(getChipVendor) reload"
}
service_triggers() {

View File

@@ -8,7 +8,7 @@ PKG_NAME:=wifimngr
PKG_VERSION:=1.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5ab0a61b2d8dc34be0e0053670a13876e648f94b
PKG_SOURCE_VERSION:=8fe360e39fa71dbf5f7618afaba4b05da804981e
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>