Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Setting channel musicclass from AGI


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
jlamanna at gmail.com
Guest





PostPosted: Sun Oct 05, 2014 6:41 pm    Post subject: [asterisk-users] Setting channel musicclass from AGI Reply with quote

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.


Thanks.


-- James
Back to top
mjordan at digium.com
Guest





PostPosted: Sun Oct 05, 2014 7:05 pm    Post subject: [asterisk-users] Setting channel musicclass from AGI Reply with quote

On Sun, Oct 5, 2014 at 6:40 PM, James Lamanna <jlamanna@gmail.com> wrote:
Quote:
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jlamanna at gmail.com
Guest





PostPosted: Mon Oct 06, 2014 11:15 am    Post subject: [asterisk-users] Setting channel musicclass from AGI Reply with quote

Hi Matt,So this actually works (haven't had a chance to try it)?


SET VARIABLE CHANNEL(musicclass) default


Because musicclass is piece of channel information.
Referencing ${musicclass} is not the same thing.


Thanks.


-- James


On Sun, Oct 5, 2014 at 8:05 PM, Matthew Jordan <mjordan@digium.com (mjordan@digium.com)> wrote:
Quote:
On Sun, Oct 5, 2014 at 6:40 PM, James Lamanna <jlamanna@gmail.com (jlamanna@gmail.com)> wrote:
Quote:
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jcolp at digium.com
Guest





PostPosted: Tue Oct 07, 2014 8:56 am    Post subject: [asterisk-users] Setting channel musicclass from AGI Reply with quote

James Lamanna wrote:
Quote:
Hi Matt,
So this actually works (haven't had a chance to try it)?

SET VARIABLE CHANNEL(musicclass) default

Because musicclass is piece of channel information.
Referencing ${musicclass} is not the same thing.

It should indeed work, yes.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services