Commit 28571d81 authored by Wenpeng Song's avatar Wenpeng Song Committed by Yalu Zhang
Browse files

asterisk: support packet loss concealment config

parent 151f22c9
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment