[asterisk-bugs] [JIRA] (ASTERISK-26719) Only up to 127 includes in a dialplna context (AST_PBX_MAX_STACK - 1)

Tzafrir Cohen (JIRA) noreply at issues.asterisk.org
Sun Jan 15 04:13:09 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tzafrir Cohen updated ASTERISK-26719:
-------------------------------------

    Description: 
I'm not sure if this is a bug or a legitimate limitations. Looking at the code, I'm not really sure. Following some issues of a customer and some toying I noticed that whereas it's OK to have a context with arbitrary number of includes (and have its content be properly reported via 'dialplan show exten-foo at context-bar') I fail to originate a call from such an extension.

I created a script to generate a context with arbitrary number of includes. It will be attached to the bug report. For example, here is the output of the script for two extensions:
{code}
[context-no-1]
exten => exten-no-1,1,Answer()

[context-no-2]
exten => exten-no-2,1,Answer()

[context-all]
include => context-no-1
include => context-no-2
{code}

I #include-d the output of that script into extensions.conf, reloaded the dialplan, and tried:
{code}
asterisk -rx 'dialplan originate Local/exten-no-NN at context-all application Wait'
{code}
If I generated a context larger than 127 extensions, I started getting the error message:
{code}
WARNING[15164][C-0000000a]: pbx.c:2461 pbx_find_extension: Maximum PBX stack exceeded
{code}
one for each include beyond 127. Furthermore, if the number (NN) I try is beyond 127, I fail to originate the channel.

Looking at the code, I'm not completely sure if this is indeed how it is supposed to work. Are all includes supposed to be on the stack?

And anyway, the error message is confusing. Maybe: "Maximum PBX stack exceeded. Too many includes while looking for $exten@$context"?

  was:
I'm not sure if this is a bug or a legitimate limitations. Looking at the code, I'm not really sure. Following some issues of a customer and some toying I noticed that whereas it's OK to have a context with arbitrary number of includes (and have its content be properly reported via 'dialplan show exten-foo at context-bar') I fail to originate a call from such an extension.

I created a script to generate a context with arbitrary number of includes. It will be attached to the bug report. For example, here is the output of the script for two extensions:
{code}
[context-no-1]
exten => exten-no-1,1,Answer()

[context-no-2]
exten => exten-no-2,1,Answer()

[context-all]
include => context-no-1
include => context-no-2
{code}

I #include-d the output of that script into extensions.conf, reloaded the dialplan, and tried:
{code}
asterisk -rx 'dialplan originate Local/exten-no-NN at context-all application Wait'

If I generated a context larger than 127 extensions, I started getting the error message:
{code}
WARNING[15164][C-0000000a]: pbx.c:2461 pbx_find_extension: Maximum PBX stack exceeded
{code}
one for each include beyond 127. Furthermore, if the number (NN) I try is beyond 127, I fail to originate the channel.

Looking at the code, I'm not completely sure if this is indeed how it is supposed to work. Are all includes supposed to be on the stack?

And anyway, the error message is confusing. Maybe: "Maximum PBX stack exceeded. Too many includes while looking for ${exten}@${context}"?


> Only up to 127 includes in a dialplna context (AST_PBX_MAX_STACK - 1)
> ---------------------------------------------------------------------
>
>                 Key: ASTERISK-26719
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26719
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.13.1
>            Reporter: Tzafrir Cohen
>            Severity: Minor
>         Attachments: gen_include
>
>
> I'm not sure if this is a bug or a legitimate limitations. Looking at the code, I'm not really sure. Following some issues of a customer and some toying I noticed that whereas it's OK to have a context with arbitrary number of includes (and have its content be properly reported via 'dialplan show exten-foo at context-bar') I fail to originate a call from such an extension.
> I created a script to generate a context with arbitrary number of includes. It will be attached to the bug report. For example, here is the output of the script for two extensions:
> {code}
> [context-no-1]
> exten => exten-no-1,1,Answer()
> [context-no-2]
> exten => exten-no-2,1,Answer()
> [context-all]
> include => context-no-1
> include => context-no-2
> {code}
> I #include-d the output of that script into extensions.conf, reloaded the dialplan, and tried:
> {code}
> asterisk -rx 'dialplan originate Local/exten-no-NN at context-all application Wait'
> {code}
> If I generated a context larger than 127 extensions, I started getting the error message:
> {code}
> WARNING[15164][C-0000000a]: pbx.c:2461 pbx_find_extension: Maximum PBX stack exceeded
> {code}
> one for each include beyond 127. Furthermore, if the number (NN) I try is beyond 127, I fail to originate the channel.
> Looking at the code, I'm not completely sure if this is indeed how it is supposed to work. Are all includes supposed to be on the stack?
> And anyway, the error message is confusing. Maybe: "Maximum PBX stack exceeded. Too many includes while looking for $exten@$context"?



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list