[asterisk-users] Setting channel musicclass from AGI
Matthew Jordan
mjordan at digium.com
Sun Oct 5 19:05:05 CDT 2014
On Sun, Oct 5, 2014 at 6:40 PM, James Lamanna <jlamanna at gmail.com> wrote:
> Hi,
> Since SetMusicOnHold() is being deprecated, how do we set the channel
> musicclass from an AGI script?
> Last time I checked you can't call dialplan functions from AGI.
>
Actually, you can. Any time you can evaluate or set a channel
variable, you can also evaluate or set a dialplan function. Hence, you
can use both 'get variable' [1] or 'set variable' [2]. You could also
use 'exec' and call the Set dialplan application directly.
[1] https://wiki.asterisk.org/wiki/display/AST/AGICommand_get+variable
[2] https://wiki.asterisk.org/wiki/display/AST/AGICommand_set+variable
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-users
mailing list