[asterisk-bugs] [JIRA] (ASTERISK-26226) Asterisk crash on AMI action "ShowDialplan" when there's a circular dependency between contexts

Etienne Lessard (JIRA) noreply at issues.asterisk.org
Fri Jul 22 08:53:56 CDT 2016


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

Etienne Lessard updated ASTERISK-26226:
---------------------------------------

    Attachment: backtrace.txt

I've attached a backtrace generated from an Asterisk 13.10.0, but without DONT_OPTIMIZE (I felt like in this case recompiling asterisk to enable DONT_OPTIMIZE wasn't necessary...).

> Asterisk crash on AMI action "ShowDialplan" when there's a circular dependency between contexts
> -----------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26226
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26226
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/PBX
>    Affects Versions: 13.9.1, 13.10.0
>            Reporter: Etienne Lessard
>         Attachments: backtrace.txt
>
>
> Given I have the following extensions.conf:
> {noformat}
> [C1]
> include = C2
> exten = 100,1,Hangup()
> [C2]
> include = C1
> exten = 101,1,Hangup()
> {noformat}
> Given I have the following manager.conf:
> {noformat}
> [general]
> enabled = yes
> port = 5038
> [foo]
> secret = foo
> write = all
> deny = 0.0.0.0/0.0.0.0
> permit = 127.0.0.1/255.255.255.0
> {noformat}
> When the AMI action "ShowDialplan" is requested with a Context and Extension argument, e.g.:
> {noformat}
> $ netcat 127.0.0.1 5038
> Action: Login
> Username: foo
> Secret: foo
> Action: ShowDialplan
> Context: C1
> Extension: 100
> {noformat}
> Then asterisk crash (it segfaults, caused by an "infinite" recursion)
> I know circular dependencies between contexts are far from being recommended, but sometimes they exist, and I feel like asterisk should handle the case more gracefully than just crashing.
> Note that the problem doesn't show up when doing a similar action via the CLI "dialplan show" command: instead, a warning "pbx.c:5442 show_dialplan_helper: Avoiding circular include of C2 within C1" is displayed



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



More information about the asterisk-bugs mailing list