[asterisk-bugs] [JIRA] (ASTERISK-25966) Database based hints empty during AMI reload or startup

George Joseph (JIRA) noreply at issues.asterisk.org
Tue May 3 11:33:56 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230475#comment-230475 ] 

George Joseph commented on ASTERISK-25966:
------------------------------------------

"dialplan reload" over AMI is considered "dangerous" and is disabled by default:

>From asterisk.conf.sample:

{code}
;live_dangerously = no		; Enable the execution of 'dangerous' dialplan
				; functions from external sources (AMI,
				; etc.) These functions (such as SHELL) are
				; considered dangerous because they can allow
				; privilege escalation.
				; Default no

{code}

If you set {{live_dangerously = yes}} it should work.

Not seeing the update on reload is due to func_db not being loaded before the dialplan.  I'm looking into this.


> Database based hints empty during AMI reload or startup
> -------------------------------------------------------
>
>                 Key: ASTERISK-25966
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25966
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 11.21.2, 13.8.1, 13.8.2
>            Reporter: Andrew Nagy
>            Assignee: George Joseph
>
> In asterisk set a DB value:
> {code}
> asterisk -rx 'database put AMPUSER/1000 voicemail default'
> {code}
> Now add a hint with a context that references that database value (valid)
> {code}
> [xrobau]
> exten => *999,hint,derp_${DB(AMPUSER/1000/voicemail)}
> {code}
> Issue a CLI based reload.
> {code}
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau         : derp_default          State:Unavailable     Presence:not_set         Watchers  0
> {code}
> That is correct!
> Now issue a reload over AMI only (https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_Reload)
> {code}
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau         : derp_                 State:Unavailable     Presence:not_set         Watchers  0
> {code}
> This is bad. Seems like it couldn't find the database value after a simple AMI reload.
> Ok now restart Asterisk. It should pick it up right?
> {code}
> [root at freepbxdev1 voicemail]# service asterisk restart
> Stopping safe_asterisk:                                    [  OK  ]
> Shutting down asterisk:                                    [  OK  ]
> Starting asterisk:                                         [  OK  ]
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau         : derp_                 State:Unavailable     Presence:not_set         Watchers  0
> {code}
> Still bad. The only way to fix it at this point is issue a CLI reload
> {code}
> [root at freepbxdev1 voicemail]# asterisk -rx "core reload"
> [root at freepbxdev1 voicemail]# asterisk -rx 'core show hints' | grep -i derp
> *999 at xrobau         : derp_default          State:Unavailable     Presence:not_set         Watchers  0
> {code}
> In Asterisk 13 the issue surfaces during Startup AND AMI Reload
> In Asterisk 11 the issue surfaces only during Startup



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



More information about the asterisk-bugs mailing list