Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374195 - net-misc/asterisk-1.6.2.19 (1.8?) - chan_dahdi failure to load setvar from users.conf
Summary: net-misc/asterisk-1.6.2.19 (1.8?) - chan_dahdi failure to load setvar from us...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 375887
  Show dependency tree
 
Reported: 2011-07-06 01:06 UTC by Jaco Kroon
Modified: 2011-09-09 16:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
chan_dahdi-users.conf_setvar.patch (chan_dahdi-users.conf_setvar.patch,1.07 KB, patch)
2011-07-06 01:21 UTC, Jaco Kroon
Details | Diff
ast-1.8.5.0-chan_dahdi-chanvars.patch (ast-1.8.5.0-chan_dahdi-chanvars.patch,1.07 KB, patch)
2011-07-22 13:03 UTC, Jaco Kroon
Details | Diff
Updated patch for 1.8.7.0-rc1 (dahdi-chanvars.patch-1.8.7.0-rc1,1.39 KB, patch)
2011-09-09 16:59 UTC, Erik Wallin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2011-07-06 01:06:34 UTC
For logistical reasons I configure my dahdi channels from users.conf and not chan_dahdi.conf (syntax in chan_dahdi.conf is unclean and messy in my opinion).

Amongst others I use setvar= and as it turns out there is explicit code added to clear the channel vars to prevent old values from remaining.  Unfortunately this code is badly placed.

I would love to log this issue on issues.asterisk.org but alas, I can't get my login working since the move to Jira.

Reproducible: Always
Comment 1 Jaco Kroon 2011-07-06 01:21:33 UTC
Created attachment 279201 [details, diff]
chan_dahdi-users.conf_setvar.patch

patch to enable setting inbound channel vars from users.conf

basically just swap the code that clears the vars from the confp structure with the code that actually sets up the dahdichan channels.

Tony - this one is rather urgent for me - got a few affected machines out there already.  Code breakage was definitely (according to diff) from 1.6.2.18 to 1.6.2.19.  Patch needs to go into asterisk.

Haven't checked whether 1.8.X is affected as well, if the patch applies cleanly it is.
Comment 2 Tony Vroon (RETIRED) gentoo-dev 2011-07-06 09:13:12 UTC
+*asterisk-1.6.2.19-r2 (06 Jul 2011)
+
+  06 Jul 2011; Tony Vroon <chainsaw@gentoo.org> +asterisk-1.6.2.19-r2.ebuild:
+  Regression fix by Jaco Kroon closes bug #374195. If you set DAHDI channel
+  variables from your dial plan and this stopped working in 1.6.2.19; this is
+  for you.
Comment 3 Jaco Kroon 2011-07-22 12:47:51 UTC
Hi, still applies to 1.8.5.0-r2, re-opening to attach an updated patch as the one for 1.6.2 doesn't apply due to too large hunk offset.
Comment 4 Jaco Kroon 2011-07-22 13:03:17 UTC
Created attachment 280609 [details, diff]
ast-1.8.5.0-chan_dahdi-chanvars.patch

This one applies to 1.8.5.0 (it's purely a case of the code has moved about 500 lines of code which is probably too much for the patch utility to pick up).
Comment 5 Tony Vroon (RETIRED) gentoo-dev 2011-07-26 13:37:02 UTC
+*asterisk-1.8.5.0-r3 (26 Jul 2011)
+
+  26 Jul 2011; Tony Vroon <chainsaw@gentoo.org> +asterisk-1.8.5.0-r3.ebuild:
+  Patch from Jaco Kroon allows setvar from users.conf to work for chan_dahdi
+  again, closes bug #374195. Patch from upstream bug #ASTERISK-18082 resolves a
+  segmentation fault or deadlock that can occur for multiple simultaneous
+  attended transfers.

I would suggest that we abandon 1.6.2 for development at this point, like upstream has done. I don't plan on applying further patches there unless you disagree fiercely.
Comment 6 Erik Wallin 2011-09-09 16:59:08 UTC
Created attachment 285989 [details, diff]
Updated patch for 1.8.7.0-rc1

Updated patch for 1.8.7.0-rc1. Code has changed upstream.