Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Feed
openwrt-telephony
Commits
28571d81
Commit
28571d81
authored
Oct 18, 2021
by
Wenpeng Song
Committed by
Yalu Zhang
Oct 18, 2021
Browse files
asterisk: support packet loss concealment config
parent
151f22c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
net/asterisk/files/iopsys/lib/voice/config_asterisk.sh
View file @
28571d81
...
...
@@ -1297,6 +1297,7 @@ configure_tel_options() {
local
minimumnumberdigits
local
terminationdigit
local
max_sessions_per_line
local
packet_loss_concealment
config_get jbenable tel_options jbenable
config_get jbforce tel_options jbforce
...
...
@@ -1313,6 +1314,7 @@ configure_tel_options() {
config_get minimumnumberdigits numberingplan minimumnumberdigits
config_get terminationdigit numberingplan terminationdigit
config_get max_sessions_per_line tel_options maxsessionsperline
config_get packet_loss_concealment tel_options packet_loss_concealment
channel_fac
=
"
$channel_fac
$fac
"
# Convert whitespace to commas
...
...
@@ -1363,6 +1365,12 @@ configure_tel_options() {
[
-z
"
$tel_event_pt
"
]
&&
tel_event_pt
=
101
sed
-i
"s/|PT_DYNAMIC|/
$tel_event_pt
/"
$WORK_DIR
/asterisk.conf
if
[
-n
"
$packet_loss_concealment
"
-a
"
$packet_loss_concealment
"
=
"0"
]
;
then
sed
-i
"s/|PACKET_LOSS_CONCEALMENT|/no/"
$WORK_DIR
/codecs.conf
else
sed
-i
"s/|PACKET_LOSS_CONCEALMENT|/yes/"
$WORK_DIR
/codecs.conf
fi
}
# Configure settings for individual line in chan_telephony.conf
...
...
@@ -1655,7 +1663,7 @@ create_temp_files() {
file
=
$WORK_DIR
/codecs.conf
echo
"[plc]"
>
$file
echo
"genericplc =
yes
;Enables packet loss concealment [yes/no]"
>>
$file
echo
"genericplc =
|PACKET_LOSS_CONCEALMENT|
;Enables packet loss concealment [yes/no]"
>>
$file
file
=
$WORK_DIR
/res_stun_monitor.conf
echo
"[general]"
>
$file
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment