Skip to content

Commit 2021a5e

Browse files
committed
RDKBACCL-344: Bringup Telco Voice Manager in RDK-B BPI R4 router
Reason for change: Adding hal changes for pjsip and extensions configuration. Test Procedure: verify that registrations and endpoints are configured properly or not. Initiate a call in between two extensions and an extension to outbound registered server. Risks: None Signed-off-by: Prabhudas Gannavarapu <[email protected]>
1 parent 9cfa292 commit 2021a5e

File tree

56 files changed

+5474
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+5474
-1
lines changed

conf/distro/include/rdk-bpi.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ DISTRO_FEATURES_append = " partner_default_ext"
3838
#Enable SDcard image as default
3939
DISTRO_FEATURES_append = " sdmmc"
4040

41+
DISTRO_FEATURE_append = " rdkb_voice_manager_dmltr104_v2"
42+
43+
DISTRO_FEATURE_append = " telco_voice_feature_enable_persist"
44+
4145
#PPP Feature
4246
#DISTRO_FEATURES_append = "ppp-enabled"
4347

conf/include/rdk-bpi-bbmasks.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ BBMASK .= "|meta-cmf/recipes-core/images/rdk-ipstb-oss-tdk-image.bb"
1010
BBMASK .= "${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', '|meta-cmf-filogic/recipes-common/mesh-agent/mesh-agent.bbappend', '', d)}"
1111
BBMASK .= "${@bb.utils.contains('DISTRO_FEATURES','EasyMesh','|openembedded-core/meta/recipes-devtools/rust/','',d)}"
1212
BBMASK .= "${@bb.utils.contains('DISTRO_FEATURES','EasyMesh','|meta-cmf-filogic/recipes-ccsp/ccsp/ccsp-one-wifi.bbappend','',d)}"
13+
BBMASK .= "|meta-rdk-ext/recipes-telephony/asterisk/asterisk_18.5.0.bb"

meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/ccsp-common-library.bbappend

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ do_install_append_class-target() {
6565
SYSTEMD_SERVICE_${PN}_remove_onewifi = " ccspwifiagent.service"
6666
SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', 'onewifi.service ', '', d)}"
6767
SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'webconfig_bin', 'webconfig.service', '', d)}"
68+
SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_wan_manager', 'RdkTelcoVoiceManager.service', '', d)}"
6869
SYSTEMD_SERVICE_${PN} += " CcspTelemetry.service"
6970
SYSTEMD_SERVICE_${PN} += " notifyComp.service"
7071
SYSTEMD_SERVICE_${PN} += "gwprovapp.service"

meta-rdk-mtk-bpir4/recipes-core/images/rdk-generic-broadband-image.bbappend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#WebPA Feature
2-
IMAGE_INSTALL_append = " parodus parodus2ccsp"
2+
IMAGE_INSTALL_append = " parodus parodus2ccsp rdktelcovoicemanager asterisk hal-voice-asterisk"
33

44
#TR069 Feature
55
IMAGE_INSTALL_append = " ccsp-tr069-pa"

meta-rdk-mtk-bpir4/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ RDEPENDS_packagegroup-rdk-ccsp-broadband_append = " \
1010
GWPROVAPP = "${@bb.utils.contains('DISTRO_FEATURES','rdkb_wan_manager','ccsp-gwprovapp', '' ,d)}"
1111

1212
RDEPENDS_packagegroup-rdk-ccsp-broadband_append = "${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_cellular_manager_mm', ' rdk-cellularmanager-mm', ' ', d)}"
13+
RDEPENDS_packagegroup-rdk-ccsp-broadband_append = " rdktelcovoicemanager"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Source: backport
2+
Subject: RDKBACCL-344: Bringup Telco Voice Manager in RDK-B BPI R4 router
3+
=================================================================
4+
Upstream-Status: Pending
5+
6+
Subject: [PATCH 2/2] Use pkgconfig to find libxml2
7+
Organization: O.S. Systems Software LTDA.
8+
9+
Signed-off-by: Fabio Berton <[email protected]>
10+
---
11+
configure.ac | 12 +-----------
12+
menuselect/configure.ac | 11 +++--------
13+
2 files changed, 4 insertions(+), 19 deletions(-)
14+
15+
Index: git/menuselect/configure.ac
16+
===================================================================
17+
--- git.orig/menuselect/configure.ac
18+
+++ git/menuselect/configure.ac
19+
@@ -43,6 +43,7 @@ AH_BOTTOM([#endif])
20+
21+
# Checks for programs.
22+
AC_PROG_CC
23+
+AC_PROG_SED
24+
AST_CHECK_GNU_MAKE
25+
26+
PKG_PROG_PKG_CONFIG
27+
@@ -91,6 +92,7 @@ else
28+
AST_EXT_LIB_CHECK([TINFO], [tinfo], [keypad], [curses.h])
29+
fi
30+
31+
+PKG_PROG_PKG_CONFIG()
32+
AST_PKG_CONFIG_CHECK([LIBXML2], [libxml-2.0])
33+
AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
34+
[#include <libxml/tree.h>
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
DESCRIPTION = "Asterisk is an Open Source PBX and telephony toolkit."
2+
LICENSE = "GPLv2"
3+
4+
S = "${WORKDIR}/git"
5+
6+
DEPENDS += "util-linux libxml2-native ncurses-native"
7+
8+
inherit autotools-brokensep pkgconfig useradd systemd
9+
10+
EXTRA_AUTORECONF += "\
11+
-I ${S}/third-party/jansson \
12+
-I ${S}/third-party/pjproject \
13+
"
14+
15+
PACKAGECONFIG ?= "\
16+
${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
17+
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
18+
${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
19+
libxml2 \
20+
jansson \
21+
sqlite3 \
22+
libedit \
23+
pjproject \
24+
\
25+
timerfd \
26+
zlib \
27+
ncurses \
28+
asteriskssl openssl crypto \
29+
gsm \
30+
"
31+
# Optional features
32+
PACKAGECONFIG[jansson] = "--with-jansson,--without-jansson,jansson"
33+
PACKAGECONFIG[sqlite3] = "--with-sqlite3,--without-sqlite3,sqlite3"
34+
PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
35+
PACKAGECONFIG[dev-mode] = "--enable-dev-mode,--disable-dev-mode"
36+
PACKAGECONFIG[coverage] = "--enable-coverage,--disable-coverage"
37+
PACKAGECONFIG[xmldoc] = "--enable-xmldoc,--disable-xmldoc"
38+
PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile"
39+
PACKAGECONFIG[internal-poll] = "--enable-internal-poll,--disable-internal-poll"
40+
PACKAGECONFIG[asteriskssl] = "--enable-asteriskssl,--disable-asteriskssl,openssl"
41+
PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath"
42+
# Optional packages
43+
PACKAGECONFIG[bfd] = "--with-bfd,--without-bfd"
44+
PACKAGECONFIG[bluetooth] = "--with-bluetooth,--without-bluetooth,bluez5"
45+
PACKAGECONFIG[backtrace] = "--with-execinfo,--without-execinfo"
46+
PACKAGECONFIG[cap] = "--with-cap,--without-cap,libcap"
47+
PACKAGECONFIG[corosync] = "--with-cpg,--without-cpg,corosync"
48+
PACKAGECONFIG[curses] = "--with-curses,--without-curses,ncurses"
49+
PACKAGECONFIG[crypt] = "--with-crypt,--without-crypt"
50+
PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto"
51+
PACKAGECONFIG[dahdi] = "--with-dahdi,--without-dahdi,dahdi-tools"
52+
# To enable FFMPEG add LICENSE_FLAGS_WHITELIST = "commercial" to your local.conf
53+
PACKAGECONFIG[ffmpeg] = "--with-avcodec,--without-avcodec,libav"
54+
PACKAGECONFIG[gsm] = "--with-gsm,--without-gsm,libgsm"
55+
PACKAGECONFIG[ilbc] = "--with-ilbc,--without-ilbc"
56+
PACKAGECONFIG[gtk2] = "--with-gtk2,--without-gtk2,gtk+"
57+
PACKAGECONFIG[gmime] = "--with-gmime,--without-gmime"
58+
PACKAGECONFIG[openh323] = "--with-h323,--without-h323"
59+
PACKAGECONFIG[hoard] = "--with-hoard,--without-hoard"
60+
PACKAGECONFIG[ical] = "--with-ical,--without-ical"
61+
PACKAGECONFIG[iconv] = "--with-iconv,--without-iconv,libiconv"
62+
PACKAGECONFIG[iksemel] = "--with-iksemel,--without-iksemel,iksemel"
63+
PACKAGECONFIG[imap_tk] = "--with-imap,--without-imap,uw-imap"
64+
PACKAGECONFIG[inotify] = "--with-inotify,--without-inotify"
65+
PACKAGECONFIG[iodbc] = "--with-iodbc,--without-iodbc"
66+
PACKAGECONFIG[isdnnet] = "--with-isdnnet,--without-isdnnet"
67+
# Jack depends on kqeueu
68+
PACKAGECONFIG[jack] = "--with-jack,--without-jack,jack"
69+
PACKAGECONFIG[uriparser] = "--with-uriparser,--without-uriparser"
70+
PACKAGECONFIG[kqueue] = "--with-kqueue,--without-kqueue"
71+
PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
72+
PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl"
73+
PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2"
74+
PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt"
75+
PACKAGECONFIG[ltdl] = "--with-ltdl,--without-ltdl,libtool"
76+
PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua"
77+
PACKAGECONFIG[misdn] = "--with-misdn,--without-misdn,misdn-utils"
78+
PACKAGECONFIG[mysqlclient] = "--with-mysqlclient,--without-mysqlclient,mariadb"
79+
PACKAGECONFIG[nbs] = "--with-nbs,--without-nbs"
80+
PACKAGECONFIG[ncurses] = "--with-curses,--without-curses,ncurses"
81+
PACKAGECONFIG[neon] = "--with-neon,--without-neon,neon"
82+
PACKAGECONFIG[netsnmp] = "--with-netsnmp,--without-netsnmp,net-snmp"
83+
PACKAGECONFIG[newt] = "--with-newt,--without-newt,libnewt"
84+
PACKAGECONFIG[ogg] = "--with-ogg,--without-ogg,libogg"
85+
PACKAGECONFIG[openr2] = "--with-openr2,--without-openr2"
86+
PACKAGECONFIG[opus] = "--with-opus,--without-opus,libopus"
87+
PACKAGECONFIG[osptk] = "--with-osptk,--without-osptk"
88+
PACKAGECONFIG[oss] = "--with-oss,--without-oss,alsa-oss"
89+
PACKAGECONFIG[pgsql] = "--with-postgres,--without-postgres,postgresql"
90+
PACKAGECONFIG[pjproject] = "--with-pjproject --with-pjproject-bundled=no,--without-pjproject,pjproject"
91+
PACKAGECONFIG[popt] = "--with-popt,--without-popt,popt"
92+
PACKAGECONFIG[portaudio] = "--with-portaudio,--without-portaudio,portaudio-v19"
93+
PACKAGECONFIG[pri] = "--with-pri,--without-pri,misdn-utils"
94+
PACKAGECONFIG[pwlib] = "--with-pwlib,--without-pwlib,pwlib"
95+
PACKAGECONFIG[radius] = "--with-radius,--without-radius,radiusclient-ng"
96+
PACKAGECONFIG[resample] = "--with-resample,--without-resample,ncurses"
97+
# Need to enable sdl_images to use sdl
98+
PACKAGECONFIG[sdl] = "--with-sdl,--without-sdl,libsdl"
99+
PACKAGECONFIG[sdl_image] = "--with-SDL_image,--without-SDL_image,libsdl-image"
100+
PACKAGECONFIG[sounds-cache] = "--with-sounds-cache,--without-sounds-cache"
101+
PACKAGECONFIG[spandsp] = "--with-spandsp,--without-spandsp"
102+
PACKAGECONFIG[ss7] = "--with-ss7,--without-ss7"
103+
PACKAGECONFIG[speex] = "--with-speex,--without-speex,speex"
104+
PACKAGECONFIG[speexdsp] = "--with-speexdsp,--without-speexdsp,speexdsp"
105+
PACKAGECONFIG[srtp] = "--with-srtp,--without-srtp"
106+
PACKAGECONFIG[openssl] = "--with-ssl,--without-ssl,openssl"
107+
PACKAGECONFIG[suppserv] = "--with-suppserv,--without-suppserv,misdn-utils"
108+
PACKAGECONFIG[freetds] = "--with-tds,--without-tds"
109+
PACKAGECONFIG[termcap] = "--with-termcap,--without-termcap,libcap"
110+
PACKAGECONFIG[timerfd] = "--with-timerfd,--without-timerfd"
111+
PACKAGECONFIG[tinfo] = "--with-tinfo,--without-tinfo,ncurses"
112+
PACKAGECONFIG[tonezone] = "--with-tonezone,--without-tonezone"
113+
PACKAGECONFIG[unixodbc] = "--with-unixodbc,--without-unixodbc,libodbc"
114+
PACKAGECONFIG[vorbis] = "--with-vorbis,--without-vorbis,libvorbis"
115+
PACKAGECONFIG[vpb] = "--with-vpb,--without-vpb"
116+
PACKAGECONFIG[x11] = "--with-x11,--without-x11,libx11"
117+
PACKAGECONFIG[zlib] = "--with-z,--without-z,zlib"
118+
PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
119+
120+
EXTRA_OECONF += "\
121+
ac_cv_file_bridges_bridge_softmix_include_hrirs_h=no \
122+
"
123+
124+
MENUSELECT_OECONF = "\
125+
CC='${BUILD_CC}' \
126+
CXX='${BUILD_CXX}' \
127+
CFLAGS='${BUILD_CFLAGS}' \
128+
CXXFLAGS='${BUILD_CXXFLAGS}' \
129+
LDFLAGS='${BUILD_LDFLAGS}' \
130+
"
131+
132+
do_configure_menuselect[dirs] = "${B}/menuselect"
133+
do_configure_menuselect() {
134+
./configure ${MENUSELECT_OECONF}
135+
}
136+
addtask do_configure_menuselect after do_configure before do_compile
137+
138+
do_install:append() {
139+
install -D -p -m 0644 ${WORKDIR}/asterisk.tmpfiles ${D}${libdir}/tmpfiles.d/asterisk.conf
140+
install -D -p -m 0644 ${WORKDIR}/asterisk.socket ${D}${systemd_system_unitdir}/asterisk.socket
141+
install -D -p -m 0644 ${WORKDIR}/asterisk.service ${D}${systemd_system_unitdir}/asterisk.service
142+
143+
rm -rf ${D}/var/run
144+
rm -rf ${D}/var/log
145+
rm -rf ${D}/tmp
146+
}
147+
148+
FILES:${PN} += "\
149+
${systemd_system_unitdir}/asterisk*.* \
150+
${libdir}/tmpfiles.d/asterisk.conf \
151+
"
152+
RDEPENDS:${PN} += "bash"
153+
154+
USERADD_PACKAGES = "${PN}"
155+
USERADD_PARAM:${PN} = "--system --home-dir /var/lib/asterisk -g asterisk --shell /bin/false asterisk"
156+
GROUPADD_PARAM:${PN} = "--system asterisk"
157+
158+
SYSTEMD_SERVICE:${PN} = "${PN}.service"
159+
160+
PACKAGES =+ "${PN}-sounds-en"
161+
FILES:${PN}-sounds-en = "${datadir}/asterisk/sounds/en"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-18:"
2+
3+
LIC_FILES_CHKSUM = "\
4+
file://COPYING;md5=3c6764ffcbe996d1d8f919b393ccdd67 \
5+
file://LICENSE;md5=e8f2ac12f40125052f5a09c009f2f11a \
6+
"
7+
8+
GITREF = ";nobranch=1"
9+
10+
SND_BASE_URI = "http://downloads.asterisk.org/pub/telephony/sounds/releases"
11+
12+
SRC_URI = "\
13+
git://github.com/asterisk/asterisk.git;protocol=https${GITREF} \
14+
${SND_BASE_URI}/asterisk-moh-opsound-wav-2.03.tar.gz;unpack=0;name=moh-sounds;subdir=${S}/sounds \
15+
${SND_BASE_URI}/asterisk-core-sounds-en-gsm-1.6.1.tar.gz;unpack=0;name=core-sounds-en-gsm;subdir=${S}/sounds \
16+
file://0002-Use-pkgconfig-to-find-libxml2.patch \
17+
file://recursive-autoconf.patch \
18+
file://paths.patch \
19+
file://asterisk.tmpfiles \
20+
file://asterisk.service \
21+
file://asterisk.socket \
22+
"
23+
PV = "18.15.1"
24+
SRCREV = "226868d1139af566c481265ef9657a1b33aa065e"
25+
26+
SRC_URI[moh-sounds.sha256sum] = "449fb810d16502c3052fedf02f7e77b36206ac5a145f3dacf4177843a2fcb538"
27+
SRC_URI[core-sounds-en-gsm.sha256sum] = "d79c3d2044d41da8f363c447dfccc140be86b4fcc41b1ca5a60a80da52f24f2d"
28+
29+
require asterisk.inc
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[Unit]
2+
Description=Asterisk PBX and telephony daemon.
3+
After=network.target
4+
After=network-online.target
5+
After=nss-lookup.target
6+
7+
[Service]
8+
Type=notify
9+
Environment=HOME=/var/lib/asterisk
10+
WorkingDirectory=/var/lib/asterisk
11+
User=asterisk
12+
Group=asterisk
13+
#ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf
14+
#ExecReload=/usr/sbin/asterisk -rx 'core reload'
15+
16+
Nice=-4
17+
#UMask=0002
18+
LimitCORE=0
19+
#LimitNOFILE=
20+
Restart=always
21+
RestartSec=4
22+
23+
# Prevent duplication of logs with color codes to /var/log/messages
24+
#StandardOutput=null
25+
26+
PrivateTmp=true
27+
PrivateDevices=true
28+
29+
[Install]
30+
WantedBy=multi-user.target
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[Unit]
2+
Description=Asterisk Sockets
3+
4+
[Socket]
5+
FreeBind=true
6+
SocketUser=asterisk
7+
SocketGroup=asterisk
8+
SocketMode=0660
9+
10+
# CLI
11+
ListenStream=/run/asterisk/asterisk.ctl
12+
# AMI
13+
ListenStream=0.0.0.0:5038
14+
# AMIS
15+
ListenStream=0.0.0.0:5039
16+
# HTTP
17+
ListenStream=127.0.0.1:8088
18+
# HTTPS
19+
ListenStream=127.0.0.1:8089
20+
# chan_sip TCP
21+
ListenStream=0.0.0.0:5060
22+
# chan_sip TLS
23+
ListenStream=0.0.0.0:5061
24+
25+
[Install]
26+
WantedBy=sockets.target

0 commit comments

Comments
 (0)