[Home]

Summary:DAHTOOL-00055: dahdi_genconf fails to generate a configuration
Reporter:David Purdue (davidp)Labels:
Date Opened:2011-09-05 02:44:22Date Closed:2011-11-04 12:02:50
Priority:MajorRegression?
Status:Closed/CompleteComponents:Utilities
Versions:Frequency of
Occurrence
Constant
Related
Issues:
is related toDAHTOOL-00054 dahdi_genconf ignores B410P jumper settings
Environment:dahdi-linux 2.5.0 dahdi-tools 2.5.0 asterisk 1.4.42 libpri 1.4.12 Ubuntu 10.04.3 LTS Digium, Inc. Wildcard TE210P/TE212P dual-span T1/E1/J1 card 3.3V (rev 02)Attachments:( 0) 0001-dahdi_genconf-Assume-spans-with-unknown-term-types-a.patch
( 1) dahdi-channels.conf
( 2) fix-DAHTOOL-55.patch
( 3) system.conf
Description:Upgrade from dahdi-tools 2.4.1 and dahdi-linux 2.4.1.2 to dahdi-tools 2.5.0 and dahdi-linux 2.5.0.

Run dahdi_genconf to generate configs for PRI card (E1 jumper set, dahdi_hardware identifies it as "pci:0000:03:02.0     wct4xxp+     d161:0210 Wildcard TE210P (3rd Gen)".

dahdi_genconf returns this error:

{noformat}
/usr/sbin/dahdi_genconf: missing default group (termtype=UNKNOWN)
{noformat}

/etc/dahdi/system.conf has a line for each span saying "# termtype: unknown", and /etc/asterisk/dahdi-channels.conf has no configuration in it.

Downgrade to 2.4.1 again and everything works.
Comments:By: David Purdue (davidp) 2011-09-05 02:46:32.455-0500

Generated /etc/dahdi/system.conf

By: David Purdue (davidp) 2011-09-05 02:46:59.005-0500

Generated /etc/asterisk/dahdi-channels.conf

By: Peter Fern (pdf) 2011-09-05 04:08:37.652-0500

Patch attached to revert the change that produces this behaviour.

EDIT: Be nice to get Tzafrir's comments on the logic here for the review.

By: Shaun Ruffell (sruffell) 2011-09-06 10:16:49.885-0500

Tzafrir: Is this something you can take a look at?

By: Shaun Ruffell (sruffell) 2011-09-11 01:07:16.024-0500

I can confirm that this patch fixes this on my system. I'm surprised I hadn't seen it before but I generally run "$ dahdi_genconf system" to only generate the /etc/dahdi/system.conf configs.

But it isn't 100% clear to me why that return was added to that function there from the previous commit.

By: Tzafrir Cohen (tzafrir) 2011-09-11 03:19:41.083-0500

After this patch, is there still a need for is_soft_term_type() (r9979 )?

By: Peter Fern (pdf) 2011-09-11 07:26:18.129-0500

I was a little confused as to what soft_term_type was trying to achieve, which is why I was hoping you might be able to comment.  If that return was purely in error, then no - there's no need for is_soft_term_type().  I thought maybe it should have been 'return if' rather than 'return unless', but then I can't see how useful configs would be generated for those devices - are these devices meant to be handled differently for some reason?

By: Shaun Ruffell (sruffell) 2011-09-26 11:18:38.542-0500

I'm linking this to DAHTOOL-54.  When the patch on this issue is applied, the patch on that issue no longer works and generates termtypes in "TE" mode regardless of the switch settings. I'm looking into this now since I would like to roll these fixes into a DAHDI 2.5.x release here soon.

By: Shaun Ruffell (sruffell) 2011-09-26 12:33:35.004-0500

Attaching another go at this 0001-dahdi_genconf-Assume-spans-with-unknown-term-types-a.patch.  This one doesn't conflict with the change on DAHTOOL-54.

However, since I'm not a dahdi_genconf expert, hopefully we can get Tzafrir to sign off on this.

By: David Purdue (davidp) 2011-09-26 20:59:57.303-0500

Tested this. On a Dahdi 2.5.0.1 system with a Digium TE210P, I applied both 0001-dahdi_genconf-Use-dahdi_scan-to-determine-span_type-.patch (from DAHTOOL-54) and 0001-dahdi_genconf-Assume-spans-with-unknown-term-types-a.patch from here.

Ran dahdi_genconf and got correct configuration in /etc/dahdi/system.conf and /etc/asterisk/dahdi-channels.conf

By: Shaun Ruffell (sruffell) 2011-09-28 12:24:14.982-0500

David: Thanks for testing.  Care if I add a "Tested-by:" line with your name and email address to the commit message?

Tzafrir did identify one problem where the termtype needs to be preset to unknown for analog spans which will be a deviation from the patches attached here when applied.

By: David Purdue (davidp) 2011-09-28 19:31:34.866-0500

"Tested-by:" line is fine with me - please use support@noojee.com.au as the email address.

My testing could not be described as thorough, as I did test only with a Digium PRI card. Before finalising the patch we should test with Digium analogue cards as well as Xorcom digital and analogue Astribanks. I'll see if I can schedule some time with our test manager to do that.

I assume you'll attach an updated patch here that includes presetting the termtype to unknown for analogue spans?

By: Shaun Ruffell (sruffell) 2011-11-04 12:02:50.305-0500

Committed in [r10213|http://svnview.digium.com/svn/dahdi?view=revision&revision=10213].