Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[asterisk-users] Pass Sound files as Argument to Macro Asterisk 1.8


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
asterisk at suretel.co.za
Guest





PostPosted: Sat Mar 08, 2014 1:39 pm    Post subject: [asterisk-users] Pass Sound files as Argument to Macro Aster Reply with quote

Hi All,

I was wondering if it is possible to pass sound files to a macro as an
argument in Asterisk 1.8?

Thanks!

Regards,

Daniel van den Berg
SureTel
South Africa
087-944-7873

--
_____________________________________________________________________
-- 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
johnkiniston at gmail.com
Guest





PostPosted: Tue Mar 11, 2014 1:07 pm    Post subject: [asterisk-users] Pass Sound files as Argument to Macro Aster Reply with quote

It should be.


I'd write something like the below:



[macro-test]
exten => s,1,NoOp
exten => s,n,GotoIf($[${STAT(e,/var/lib/asterisk/sounds/${ARG1}.ulaw)} = 0]?NOPROMPT:PLAYBACK)
exten => s,n(NOPROMPT),Background(nothing-recorded&for&pm-prompt-number)
exten => s,n,SayPhonetic(${ARG1})
exten => s,n,Goto(EXIT)
exten => s,n(PLAYBACK),NoOP
exten => s,n,BACKGROUND(${ARG1})
exten => s,n,(EXIT)MacroExit


exten => 1234,1,Macro(macro-test,tt-monkeys)







On Sat, Mar 8, 2014 at 11:39 AM, Daniel van den Berg <asterisk@suretel.co.za (asterisk@suretel.co.za)> wrote:
Quote:
Hi All,

I was wondering if it is possible to pass sound files to a macro as an
argument in Asterisk 1.8?

Thanks!

Regards,

Daniel van den Berg
SureTel
South Africa
087-944-7873

--
_____________________________________________________________________
-- 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



--
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
---Heinlein
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