[Asterisk-Dev] bug or feature ? extension not found...

Luigi Rizzo rizzo at icir.org
Wed Dec 14 05:25:59 MST 2005


in the configuration below, my asterisk (svn 7467, but it did the same with 7380)
does not seem to recognise an extension created by sip with 'regexten'
and 'regcontext'.
It does work if i manually add the extension, but obviously this is not
how it should work.
I am trying to debug the thing (not finished yet) and it seems that
pbx.c:pbx_find_extension() stops scanning the 'local-users' context
after finding the first instance (created by 'pbx_config') and then
not finding a match moves forward to the next context, outgoing-toll.

If you remove the [ Context 'local-users' created by 'pbx_config' ]
then the extension is found (in the context created by SIP),
obviously dial fails after the NooP() but that is expected.

I do not see any obvious recent change to this part of the code, but
then i am not sure whether this behaviour just started recently or it
was always there.

Could anyone try to figure out what is going on ? The example should be
reasonably simple to reproduce, 551 and 552 are two phones which
register through sip. It is important that there are two instances
of the 'local-user' context, i believe. No idea how the recursion
depth influences the process.

	thanks
	luigi


*CLI> show dialplan console
[ Context 'console' created by 'pbx_config' ]
  Include =>        'outgoing-free'                               [pbx_config]
  Include =>        'outgoing-toll'                               [pbx_config]

-= 0 extensions (0 priorities) in 1 context. =-
*CLI> show dialplan outgoing-free
[ Context 'outgoing-free' created by 'pbx_config' ]
  '_2.' =>          1. Dial(SIP/${EXTEN}@asterisk.unipi.it)       [pbx_config]
  '_69.' =>         1. Dial(SIP/${EXTEN}@voip.vira.it)            [pbx_config]
  Include =>        'local-users'                                 [pbx_config]

-= 2 extensions (2 priorities) in 1 context. =-
*CLI> show dialplan local-users
[ Context 'local-users' created by 'pbx_config' ]
  '681' =>          1. PlayBack(S-mentale)                        [pbx_config]
  '682' =>          1. PlayBack(screen-callee-options)            [pbx_config]
  '_5.' =>          2. Dial(SIP/${EXTEN})                         [pbx_config]

[ Context 'local-users' created by 'SIP' ]
  '551' =>          1. Noop(551)                                  [SIP]
  '552' =>          1. Noop(552)                                  [SIP]

-= 5 extensions (5 priorities) in 2 contexts. =-
*CLI>  dial 551
No such extension '551' in context 'console'
*CLI> dial 551 at outgoing-free
No such extension '551' in context 'outgoing-free'
*CLI> dial 551 at local-users
No such extension '551' in context 'local-users'
*CLI> 

----- End forwarded message -----



More information about the asterisk-dev mailing list