diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-07-10 21:38:59 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-07-10 21:38:59 +0000 |
commit | ede5dc8fd21b42ecbef144e438f9a4785a1e07fb (patch) | |
tree | 818aae2dd32d32a68c54838b01fa19fd0b2fbf37 | |
parent | a6a5c89fa7b5406bbc0ad19f026fa29eae7a286e (diff) |
Support using 'hardhdlc=' instead of 'dchan=' for BRI devices.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4603 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-x | xpp/dahdi_genconf | 9 | ||||
-rw-r--r-- | xpp/genconf_parameters | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/xpp/dahdi_genconf b/xpp/dahdi_genconf index 53f6916..ecc9819 100755 --- a/xpp/dahdi_genconf +++ b/xpp/dahdi_genconf @@ -73,6 +73,7 @@ my $bri_sig_style = 'bri_ptmp'; my $brint_overlap = 'no'; my $pri_termtype = 'SPAN/* TE'; my $echo_can = 'mg2'; +my $bri_hardhdlc= 'no'; my %dahdi_default_vars = ( GENCONF_FILE => \$file, @@ -97,6 +98,7 @@ my %dahdi_default_vars = ( brint_overlap => \$brint_overlap, pri_termtype => \$pri_termtype, echo_can => \$echo_can, + bri_hardhdlc => \$bri_hardhdlc, ); sub map_dahdi_defaults { @@ -208,6 +210,11 @@ sub gen_dahdi_digital($) { my $span_yellow = $span->yellow(); $span_yellow = (defined $span_yellow) ? ",$span_yellow" : ''; + my $dchan_type = 'dchan'; + if ($span->is_bri() && ($bri_hardhdlc eq 'yes')) { + $dchan_type = 'hardhdlc'; + } + $timing = ($termtype eq 'NT') ? 0 : $bri_te_last_timing++; printf "span=%d,%d,%d,%s,%s%s%s\n", $num, @@ -220,7 +227,7 @@ sub gen_dahdi_digital($) { printf "# termtype: %s\n", lc($termtype); printf "bchan=%s\n", bchan_range($span); my $dchan = $span->dchan(); - printf "dchan=%d\n", $dchan->num(); + printf "$dchan_type=%d\n", $dchan->num(); print_echo_can(bchan_range($span)); } diff --git a/xpp/genconf_parameters b/xpp/genconf_parameters index b58823f..c4cc8e5 100644 --- a/xpp/genconf_parameters +++ b/xpp/genconf_parameters @@ -44,6 +44,12 @@ #echo_can oslec #echo_can none # to aboid echo cancellers altogether +# bri_hardhdlc: If this parameter is set to 'yes', in the entries for +# BRI cards 'hardhdlc' will be used instead of 'dchan' (an alias for +# 'fcshdlc'). +# +#bri_hardhdlc yes + # pri_types contains a list of settings: # Currently the only setting is for TE or NT (the default is TE) # |