Skip to content
Snippets Groups Projects
Commit 1aba15f5 authored by Lukasz Kotasa's avatar Lukasz Kotasa
Browse files

config_asterisk.sh: feed FAC from prefixinfo insted of tel_options

Option 'fac' in 'tel_options' is not used.
We have list of feature codes in prefixinfo settings.
Add prefixrange value if prefix is enabled.
parent 3f7ccd4e
No related branches found
No related tags found
1 merge request!85config_asterisk.sh: feed FAC from prefixinfo insted of tel_options
......@@ -1188,6 +1188,11 @@ configure_feature_set(){
prefixnumber="${prefixnumber}$counter"
config_get facilityaction $prefixnumber facilityaction
config_get prefixrange $prefixnumber prefixrange
config_get prefixenable $prefixnumber prefixenable
if [ -n "$prefixenable" -a "$prefixenable" == "1" ]; then
channel_fac="$channel_fac $prefixrange"
fi
if [ "$facilityaction" == CFU_ACTIVATE ]; then
cfim_on="$prefixrange"
elif [ "$facilityaction" == CFU_DEACTIVATE ] ; then
......@@ -1219,6 +1224,10 @@ configure_feature_set(){
fi
counter=$((counter+1))
done
# Convert whitespace to commas
channel_fac=$(echo $channel_fac | sed -e 's/^ *//' -e 's/ *$//' | tr -s ' ' | tr ' ' ',')
sed -i "s/|FAC|/$channel_fac/" $WORK_DIR/chan_telephony.conf
fi
local cfim_on_len=${#cfim_on}
local cfbs_on_len=${#cfbs_on}
......@@ -1503,22 +1512,17 @@ configure_tel_options() {
config_get jbimpl tel_options jb_impl
config_get dtmfmode sip_options dtmf_mode
config_get dialoutmsec numberingplan interdigitstdmsec
config_get fac tel_options fac
config_get echocancel tel_options echo_cancel
config_get hold_target_before_refer tel_options hold_target_before_refer
config_get calleridtype tel_options calleridtype
config_get tel_event_pt tel_options tel_event_pt
config_get interdigitopenmsec numberingplan interdigitopenmsec
config_get minimumnumberdigits numberingplan minimumnumberdigits
config_get terminationdigit numberingplan terminationdigit
config_get interdigitopenmsec numberingplan interdigitopenmsec
config_get minimumnumberdigits numberingplan minimumnumberdigits
config_get terminationdigit numberingplan terminationdigit
config_get packet_loss_concealment tel_options packet_loss_concealment
config_get flash_spec tel_options flash_spec
config_get country tel_options country
channel_fac="$channel_fac $fac"
# Convert whitespace to commas
channel_fac=$(echo $channel_fac | sed -e 's/^ *//' -e 's/ *$//' | tr -s ' ' | tr ' ' ',')
if [ -z "$dialoutmsec" ] ; then
dialoutmsec=15000
fi
......@@ -1528,7 +1532,6 @@ configure_tel_options() {
sed -i "s/|JBMAXSIZE|/$jbmaxsize/" $WORK_DIR/chan_telephony.conf
sed -i "s/|JBIMPL|/$jbimpl/" $WORK_DIR/chan_telephony.conf
sed -i "s/|DIALOUTMSEC|/$dialoutmsec/" $WORK_DIR/chan_telephony.conf
sed -i "s/|FAC|/$channel_fac/" $WORK_DIR/chan_telephony.conf
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORK_DIR/chan_telephony.conf
sed -i "s/|ECHOCANCEL|/$echocancel/" $WORK_DIR/chan_telephony.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment