[Home]

Summary:ASTERISK-16189: [patch] priexclusive in chan_dahdi.conf ignored when reloading dahdi module
Reporter:Morten Tryfoss (mtryfoss)Labels:
Date Opened:2010-06-02 03:06:56Date Closed:2010-07-16 15:35:35
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_dahdi_20100602.patch
( 1) issue17441_trunk.patch
( 2) issue17441_v1.4.patch
( 3) issue17441_v1.6.2.patch
Description:Set priexclusive=yes i chan_dahdi.conf.

Steps:
1: restart asterisk
2: make call. Is placed with "Exclusive" in SETUP message
3: reload module (or "reload" in older versions)
4: make new call. Is placed with "Preferred" in SETUP message

This prooves that it should be possible to change that parameter on regular reload instead for full restart? :-)
Comments:By: Morten Tryfoss (mtryfoss) 2010-06-02 04:31:34

The submitted patch fixes the problem for me.

By: Richard Mudgett (rmudgett) 2010-07-06 17:37:19

I do not see how the supplied patch fixes anything.  The if test is checking the value of "exclusive" which is initialized by the very code put in the conditional clause.

By: Morten Tryfoss (mtryfoss) 2010-07-07 00:20:45

yeah, but when you're reloading asterisk, the priexclusive parameter is ignored when reading the config file. Without my code, the exclusive var is always set to 0 regardless of what your config file says.

So, you have to options:

1) Make the config file reader always take priexclusive into consideration when reloading
or
2) Don't change the value of exclusive if it's already set (my patch)

By: Richard Mudgett (rmudgett) 2010-07-07 09:49:23

The value of exclusive is undefined.  It is a local variable that must be initialized every time dahdi_call() is called.  The patch tests the random value of exclusive for zero before initializing the variable.  The patch only works for you because the value of exclusive is not likely to be zero, thus requesting the channel to be exclusive.

I now see what is going on and will have a patch later today.

By: Richard Mudgett (rmudgett) 2010-07-07 14:53:12

The chan_dahdi priexclusive and outsignaling/outsignalling config parameters were always reset to default on a reload.

The various issue17441_xxx.patch files should fix this problem for the indicated branches.

By: Richard Mudgett (rmudgett) 2010-07-07 14:53:44

Please test the patch.

By: Digium Subversion (svnbot) 2010-07-16 15:18:54

Repository: asterisk
Revision: 277419

U   branches/1.4/channels/chan_dahdi.c

------------------------------------------------------------------------
r277419 | rmudgett | 2010-07-16 15:18:53 -0500 (Fri, 16 Jul 2010) | 15 lines

priexclusive in chan_dahdi.conf ignored when reloading dahdi module

During a reload, the priexclusive and outsignalling parameters are not
read in from the config file as intended.  Unfortunately, they get set to
defaults as a result.  This patch makes sure that they do not get set to
defaults during a reload.

(closes issue ASTERISK-16189)
Reported by: mtryfoss
Patches:
     issue17441_v1.4.patch uploaded by rmudgett (license 664)
     issue17441_v1.6.2.patch uploaded by rmudgett (license 664)
     issue17441_trunk.patch uploaded by rmudgett (license 664)
Tested by: rmudgett

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=277419

By: Digium Subversion (svnbot) 2010-07-16 15:27:51

Repository: asterisk
Revision: 277467

_U  trunk/
U   trunk/channels/chan_dahdi.c

------------------------------------------------------------------------
r277467 | rmudgett | 2010-07-16 15:27:51 -0500 (Fri, 16 Jul 2010) | 22 lines

Merged revisions 277419 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r277419 | rmudgett | 2010-07-16 15:18:54 -0500 (Fri, 16 Jul 2010) | 15 lines
 
 priexclusive in chan_dahdi.conf ignored when reloading dahdi module
 
 During a reload, the priexclusive and outsignalling parameters are not
 read in from the config file as intended.  Unfortunately, they get set to
 defaults as a result.  This patch makes sure that they do not get set to
 defaults during a reload.
 
 (closes issue ASTERISK-16189)
 Reported by: mtryfoss
 Patches:
       issue17441_v1.4.patch uploaded by rmudgett (license 664)
       issue17441_v1.6.2.patch uploaded by rmudgett (license 664)
       issue17441_trunk.patch uploaded by rmudgett (license 664)
 Tested by: rmudgett
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=277467

By: Digium Subversion (svnbot) 2010-07-16 15:35:34

Repository: asterisk
Revision: 277485

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_dahdi.c

------------------------------------------------------------------------
r277485 | rmudgett | 2010-07-16 15:35:34 -0500 (Fri, 16 Jul 2010) | 29 lines

Merged revisions 277467 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r277467 | rmudgett | 2010-07-16 15:27:51 -0500 (Fri, 16 Jul 2010) | 22 lines
 
 Merged revisions 277419 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r277419 | rmudgett | 2010-07-16 15:18:54 -0500 (Fri, 16 Jul 2010) | 15 lines
   
   priexclusive in chan_dahdi.conf ignored when reloading dahdi module
   
   During a reload, the priexclusive and outsignalling parameters are not
   read in from the config file as intended.  Unfortunately, they get set to
   defaults as a result.  This patch makes sure that they do not get set to
   defaults during a reload.
   
   (closes issue ASTERISK-16189)
   Reported by: mtryfoss
   Patches:
         issue17441_v1.4.patch uploaded by rmudgett (license 664)
         issue17441_v1.6.2.patch uploaded by rmudgett (license 664)
         issue17441_trunk.patch uploaded by rmudgett (license 664)
   Tested by: rmudgett
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=277485