[asterisk-bugs] [Asterisk 0016618]: [regression] pbx_config does not load when it should

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jan 18 13:57:27 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16618 
====================================================================== 
Reported By:                kobaz
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16618
Category:                   PBX/pbx_config
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
JIRA:                       SWP-745 
Regression:                 Yes 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 240326 
Request Review:              
====================================================================== 
Date Submitted:             2010-01-15 16:20 CST
Last Modified:              2010-01-18 13:57 CST
====================================================================== 
Summary:                    [regression] pbx_config does not load when it should
Description: 
When using extconfig for extensions.conf, pbx_config does not load to get
dialplan config.

I have an extensions.ael file in use as well as extconfig.conf for
database extensions.conf (static-realtime) 

extconfig.conf
---------------
[settings]
extensions.conf => odbc,pbx,asterisk.v_asterisk_ext_config
---------------

Asterisk is started... pbx_config.so is nowhere to be found in the startup
log. 'dialplan reload' is not available.


I can then forcefully: module load pbx_config.so
And then extensions.conf is pulled via odbc, but clobbers my
extensions.ael

'dialplan show' will still show the diaplan code from my extensions.ael,
but it's not reachable.

====================================================================== 

---------------------------------------------------------------------- 
 (0116841) kobaz (reporter) - 2010-01-18 13:57
 https://issues.asterisk.org/view.php?id=16618#c116841 
---------------------------------------------------------------------- 
modules.conf:
--------------------------------
[modules]
autoload=yes
noload => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
noload => app_intercom.so
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
noload => chan_alsa.so
noload => chan_phone.so
noload => res_jabber.so

noload => res_timing_timerfd.so

load => res_odbc.so
load => res_musiconhold.so
load => cdr_csv.so
--------------------------------


extensions.conf:
--------------------------------
[cos_internal+local+ld+intl]
exten => _!,1,Goto(services,${EXTEN},1)
--------------------------------

extensions.ael
--------------------------------
context services {
  201 => {
    Dial(SIP/201);
  }
}
--------------------------------


CLI> sip show peer 201
--------------------------------
  * Name       : 201
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : cos_internal+local+ld+intl
  Subscr.Cont. : <Not set>
--------------------------------

CLI> dialplan show
--------------------------------
[ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ]
  's' =>            1. NoOp()                                    
[app_dial]

[ Context 'services' created by 'pbx_ael' ]
  '201' (CID match '') =>  1. Dial(SIP/201)                             
[pbx_ael]

[ Context 'app_queue_gosub_virtual_context' created by 'app_queue' ]
  's' (CID match '') =>  1. NoOp()                                    
[app_queue]

[ Context 'parkedcalls' created by 'features' ]
  '2620' (CID match '') =>  1. Park()                                    
[features]

[ Context 'demo' created by 'pbx_lua' ]
  Alt. Switch =>    'Lua/'                                       
[pbx_lua]

[ Context 'cos_internal+local+ld+intl' created by 'pbx_config' ]
  '_!' =>           1. Goto(services,${EXTEN},1)                 
[pbx_config]
--------------------------------


========================
SIP/201 dials 201
*CLI>     -- Executing [201 at cos_internal+local+ld+intl:1]
Goto("SIP/201-00000000", "services,201,1") in new stack
    -- Goto (services,201,1)
[Jan 18 14:48:41] WARNING[3972]: pbx.c:4708 __ast_pbx_run: Channel
'SIP/201-00000000' sent into invalid extension '201' in context 'services',
but no invalid handler


services does indeed exist in extensions.ael, and does have priority one..
and it even shows up in 'dialplan show'


CLI> ael reload
--------------------------------
*CLI> [Jan 18 14:52:20] NOTICE[4057]: pbx_ael.c:122 pbx_load_module:
Starting AEL load process.
[Jan 18 14:52:20] NOTICE[4057]: pbx_ael.c:135 pbx_load_module: AEL load
process: parsed config file name '/etc/asterisk/extensions.ael'.
[Jan 18 14:52:20] NOTICE[4057]: pbx_ael.c:138 pbx_load_module: AEL load
process: checked config file name '/etc/asterisk/extensions.ael'.
    -- Registered extension context 'services' (0x87a9250) in local table
0x854f668; registrar: pbx_ael
    -- Added extension '201' priority 1 to services (0x87a9250)
[Jan 18 14:52:20] NOTICE[4057]: pbx_ael.c:141 pbx_load_module: AEL load
process: compiled config file name '/etc/asterisk/extensions.ael'.
    -- Registered extension context 'app_dial_gosub_virtual_context'
(0x8804468) in local table 0x854f668; registrar: app_dial
    -- merging incls/swits/igpats from old(app_dial_gosub_virtual_context)
to new(app_dial_gosub_virtual_context) context, registrar = pbx_ael
    -- Added extension 's' priority 1 (CID match '') to
app_dial_gosub_virtual_context (0x8804468)
    -- Registered extension context 'app_queue_gosub_virtual_context'
(0x88054a0) in local table 0x854f668; registrar: app_queue
    -- merging incls/swits/igpats from
old(app_queue_gosub_virtual_context) to
new(app_queue_gosub_virtual_context) context, registrar = pbx_ael
    -- Added extension 's' priority 1 (CID match '') to
app_queue_gosub_virtual_context (0x88054a0)
    -- Registered extension context 'parkedcalls' (0x880ad98) in local
table 0x854f668; registrar: features
    -- merging incls/swits/igpats from old(parkedcalls) to
new(parkedcalls) context, registrar = pbx_ael
    -- Added extension '2620' priority 1 (CID match '') to parkedcalls
(0x880ad98)
    -- Registered extension context 'demo' (0x880e9e8) in local table
0x854f668; registrar: pbx_lua
    -- merging incls/swits/igpats from old(demo) to new(demo) context,
registrar = pbx_ael
    -- Including switch 'Lua/' in context 'demo'
    -- Registered extension context 'cos_internal+local+ld+intl'
(0x88121c8) in local table 0x854f668; registrar: pbx_config
    -- merging incls/swits/igpats from old(cos_internal+local+ld+intl) to
new(cos_internal+local+ld+intl) context, registrar = pbx_ael
    -- Added extension '_!' priority 1 (CID match '') to
cos_internal+local+ld+intl (0x88121c8)
    -- Time to scan old dialplan and merge leftovers back into the new:
0.000431 sec
    -- Time to restore hints and swap in new dialplan: 0.000001 sec
    -- Time to delete the old dialplan: 0.000080 sec
    -- Total time merge_contexts_delete: 0.000512 sec
[Jan 18 14:52:20] NOTICE[4057]: pbx_ael.c:146 pbx_load_module: AEL load
process: merged config file name '/etc/asterisk/extensions.ael'.
[Jan 18 14:52:20] NOTICE[4057]: pbx_ael.c:149 pbx_load_module: AEL load
process: verified config file name '/etc/asterisk/extensions.ael'.
--------------------------------

And now we retry that SIP/201 dialing 201

[Jan 18 14:52:22] NOTICE[4074]: chan_sip.c:21052 handle_request_invite:
Call from '201' to extension '201' rejected because extension not found.

the context 'cos_internal+local+ld+intl' is now unreachable in the
dialplan.
even though we have....

CLI> dialplan show
--------------------------------
[ Context 'cos_internal+local+ld+intl' created by 'pbx_config' ]
  '_!' (CID match '') =>  1. Goto(services,${EXTEN},1)                 
[pbx_config]

[ Context 'demo' created by 'pbx_lua' ]
  Alt. Switch =>    'Lua/'                                       
[pbx_lua]

[ Context 'parkedcalls' created by 'features' ]
  '2620' (CID match '') =>  1. Park()                                    
[features]

[ Context 'app_queue_gosub_virtual_context' created by 'app_queue' ]
  's' (CID match '') =>  1. NoOp()                                    
[app_queue]

[ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ]
  's' (CID match '') =>  1. NoOp()                                    
[app_dial]

[ Context 'services' created by 'pbx_ael' ]
  '201' =>          1. Dial(SIP/201)                             
[pbx_ael]
--------------------------------


Now lets add our context to extensions.ael
--------------------------------
context cos_internal+local+ld+intl {
  201 => {
    goto services, 201, 1;
  }
}
--------------------------------

CLI> ael reload

And Now let's retry that SIP/201 dialing 201

    -- Executing [201 at cos_internal+local+ld+intl:1]
Goto("SIP/201-00000003", "services,201,1") in new stack
    -- Goto (services,201,1)
    -- Executing [201 at services:1] Dial("SIP/201-00000003", "SIP/201") in
new stack
    -- Called 201
    -- SIP/201-00000004 is ringing



So it's clear that the dialplan merge is not done correctly.  We have
either extensions.conf, or extensions.ael
In 1.6.X, ael and extensions.conf are merged into one dialplan 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-18 13:57 kobaz          Note Added: 0116841                          
======================================================================




More information about the asterisk-bugs mailing list