[Home]

Summary:ASTERISK-13443: [patch] Config file layout
Reporter:dea (dea)Labels:
Date Opened:2009-01-24 18:03:39.000-0600Date Closed:2009-01-27 13:24:01.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_skinny
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) skinny.conf.sample-trunk.txt
Description:Now that chan skinny uses seperate configuration sections for
lines and devices, it is important to have the [lines] section
before the [devices]

I noticed after updating trunk that while my skinny device was working,
line specific values had not been loaded, such as caller-id, line lable
or voicemail box.

****** ADDITIONAL INFORMATION ******

This could also be fixed by refactoring the code-
  1.  Load the config
  2.  Parse the config
  3.  Iterate over the devices and link the lines


Even with the refactored code this small change to the config
layout will not hurt, and until the code can be changed it would
be a good idea to provide a sample that will work.
Comments:By: Digium Subversion (svnbot) 2009-01-25 08:35:15.000-0600

Repository: asterisk
Revision: 171043

U   trunk/configs/skinny.conf.sample

------------------------------------------------------------------------
r171043 | mvanbaak | 2009-01-25 08:35:15 -0600 (Sun, 25 Jan 2009) | 7 lines

Make the sample skinny.conf work

(closes issue ASTERISK-13443)
Reported by: DEA
Patches:
     skinny.conf.sample-trunk.txt uploaded by DEA (license 3)

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

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

By: Digium Subversion (svnbot) 2009-01-25 08:36:34.000-0600

Repository: asterisk
Revision: 171044

_U  branches/1.6.0/

------------------------------------------------------------------------
r171044 | mvanbaak | 2009-01-25 08:36:33 -0600 (Sun, 25 Jan 2009) | 13 lines

Blocked revisions 171043 via svnmerge

........
 r171043 | mvanbaak | 2009-01-25 15:35:17 +0100 (Sun, 25 Jan 2009) | 7 lines
 
 Make the sample skinny.conf work
 
 (closes issue ASTERISK-13443)
 Reported by: DEA
 Patches:
       skinny.conf.sample-trunk.txt uploaded by DEA (license 3)
........

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

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

By: Digium Subversion (svnbot) 2009-01-25 08:37:34.000-0600

Repository: asterisk
Revision: 171045

_U  branches/1.6.1/

------------------------------------------------------------------------
r171045 | mvanbaak | 2009-01-25 08:37:34 -0600 (Sun, 25 Jan 2009) | 13 lines

Blocked revisions 171043 via svnmerge

........
 r171043 | mvanbaak | 2009-01-25 15:35:17 +0100 (Sun, 25 Jan 2009) | 7 lines
 
 Make the sample skinny.conf work
 
 (closes issue ASTERISK-13443)
 Reported by: DEA
 Patches:
       skinny.conf.sample-trunk.txt uploaded by DEA (license 3)
........

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

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

By: Michiel van Baak (mvanbaak) 2009-01-26 14:06:35.000-0600

The patch that went in is not really ok because it's a quick-n-dirty. We should fix the underlying issue.

By: Damien Wedhorn (wedhorn) 2009-01-26 14:21:59.000-0600

DEA, I was away for a few days so didn't get to have a look at this one before it was committed. The reload stuff (rev:171081) loads the lines section (line 6681) and then the devices section (line 6691).

I can't see how your patch would have helped which seems to indicate that there is an issue in the code that we should probably fix. The configuring of lines and devices is logged into 'messages' which should indicate that the lines are being loaded first.

As your patch has the effect of obscuring an issue in the code (it is already meant to do lines section first), could you please provide some more info so this can be fixed.

By: dea (dea) 2009-01-26 14:32:31.000-0600

I gave the new config parsing code a look, and agree it should not matter.

I upgraded my home system this past weekend, which has a whopping 1 skinny
phone to support.  I had upgraded by development system at work a about
six weeks ago, so I knew I needed to restructure my config.

After the upgrade I noticed the messages button no longer worked on my 7940.
'skinny show lines' listed my 1 line, but every value I had assigned was
missing.  'skinny show device <my-device>' showed the device with the proper
line assigned.

So before digging into the code, I move the 6 lines of config covering my 1
line to before the devices section, then restarted *.  Now my line had the
correct settings, both in 'skinny show line ...' and in usage.

The patch was not meant to be the final solution, just enough to let people
upgrade to trunk and test chan_skinny without encountering this problem.
I fully agree that the real problem still needs to be found and fixed.

By: Damien Wedhorn (wedhorn) 2009-01-26 14:41:32.000-0600

My config file (devices then lines) seems to work fine. I don't have a lot of line vars set, but callerid is set and skinny show line x reports the correct callerid. I assume that this didn't work for you?

Any chance in having a look at your skinny.conf that didn't work?

By: dea (dea) 2009-01-26 14:46:33.000-0600

[general]
port = 2000                     ; Port to bind to, default tcp/2000
bindaddr = <wiped>              ; Address to bind to
dateFormat = M-D-YA             ; M,D,Y in any order (5 chars max)
keepAlive = 60
vmexten = 8500


[lines]
[1019]
nat=0
callerid="Dan Austin" <1019>
mailbox=1019@home
context=home

[devices]
; Typical config for a 7940 / ATA
[Home]
device=SEP0012D9EDE7A4
context=home
line => 1019

The above is the current config.  The first rewrite after the upgrade
had the same six lines of the [lines] section at the bottom

By: Damien Wedhorn (wedhorn) 2009-01-26 14:53:55.000-0600

okay, I'm confused. I just grabbed you code, moved the seven lines (starting [lines], ending blank) to the bottom, restarted skinny and everything seemed to work fine (older code than trunk, but we haven't played with that stuff for a while).

DEA, can you have a go at getting the error again.

Edit (This would make even less sense - ignore): Maybe try disconnecting the phone, starting asterisk and checking the line variables. Maybe the device register is doing something to the config.



By: dea (dea) 2009-01-26 15:13:27.000-0600

I can try the device disconnect when I get home.

I have a development 1.6.0.1 and it does not display the issue, so it
may be an issue with my home environment.  The update process used was-
1.  svn up
2.  make clean
3.  configure
4.  make install

I restarted asterisk serveral times, each time rechecking skinny.conf
looking for errors.

I just changed the order back, and it still works, so now I have not
idea what went south over the weekend.  

Feel free to revert the change and close the bug.  If I do get it to
act up again I will collect more detail about what might trigger it.

By: Damien Wedhorn (wedhorn) 2009-01-26 16:52:46.000-0600

As the committed layout better represents the method that the lines and devices are actually configured, I suggest that we leave the commit and just close this bug. Maybe just add a not to the commit that it's not a bug fix but just a general cleanup.

By: Michiel van Baak (mvanbaak) 2009-01-27 13:24:00.000-0600

not a bug, but just a clarification to show in the configfile how things are parsed.
We all agree, so let's close it