[asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Thomas Perron
Do you see any syntax errors?
Positive comments welcomed.

The short version of the logic is as follows:

create a file based on the NUMBER
create a an audio file
move to a new extension (label) and play the results

exten = 621,1,Answer()
exten = 621,n,Read(NUMBER,enteryournumberstartingwithaone,12,,5)
 ; create a variable from a DTMF entry / 12 characters long
exten = 621,n,System{(/tmp touch($NUMBER)}
; create the file based on the variable entered
exten = 621,n,Set(audioscript=$[${NUMBER} + 1])
 ; set a channel variable in advance of recording to it
exten = 621,n,SayDigits(${NUMBER})
  ; say the NUMBER that was entered
exten = 621,n,System{/tmp touch($(audioscript)}
; create a file
exten = 621,n,Record(${audioscript})
   ; record a file based on the NUMBER + 1
exten = 621,n,Playback(audioscript)
  ; listen to the recording - it changes for each
Demo
exten = 621,n,System(mv audioscript /var/lib/asterisk/sounds/en)
  ; move the recording to the sounds directory
exten = 621,n,Goto(${audioscript},1)
; goto the label/alias to hear it all together
exten = audioscript,1,Answer()
   ; Nothing
exten = audioscript,n,Playback(audioscript)
   ; plays audioscript
exten = audioscript,n,Playback(staticIVR_sample)
; adds some boring IVR lingo
exten = audioscript,n,Hangup()
   ; drops the call

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Steve Edwards
On Mon, 8 Feb 2010, Thomas Perron wrote:

 Do you see any syntax errors?

Yes. Lots. Can I please have the last 5 minutes of my life back?

 Positive comments welcomed.

Please don't bother the list to syntax check your code if you are too 
lazy to type it into your dialplan and see if Asterisk likes it.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Danny Nicholas
Steve, if he had that kind of power, he wouldn't have made the OP. BTW, I
doubt it took you 5 min to actually figure out that the syntax wasn't
correct.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Monday, February 08, 2010 11:20 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

On Mon, 8 Feb 2010, Thomas Perron wrote:

 Do you see any syntax errors?

Yes. Lots. Can I please have the last 5 minutes of my life back?

 Positive comments welcomed.

Please don't bother the list to syntax check your code if you are too 
lazy to type it into your dialplan and see if Asterisk likes it.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Thomas Perron
what is OP please?
can you just simply comment on the technical work please?


On Mon, Feb 8, 2010 at 12:24 PM, Danny Nicholas da...@debsinc.com wrote:
 Steve, if he had that kind of power, he wouldn't have made the OP. BTW, I
 doubt it took you 5 min to actually figure out that the syntax wasn't
 correct.

 -Original Message-
 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
 Sent: Monday, February 08, 2010 11:20 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

 On Mon, 8 Feb 2010, Thomas Perron wrote:

 Do you see any syntax errors?

 Yes. Lots. Can I please have the last 5 minutes of my life back?

 Positive comments welcomed.

 Please don't bother the list to syntax check your code if you are too
 lazy to type it into your dialplan and see if Asterisk likes it.

 --
 Thanks in advance,
 -
 Steve Edwards       sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
 Newline                                              Fax: +1-760-731-3000

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Danny Nicholas
Thomas, you are the OP - Original Poster - that is technical lingo; as for
the script you submitted, here are a few of the problems;
exten = 621,1,Answer()
exten = 621,n,Read(NUMBER,enteryournumberstartingwithaone,12,,5)
** the above name is very wordy and could be replaced with the standard
enter-phone-number10 (in quotes because of outlook)
; create a variable from a DTMF entry / 12 characters long
exten = 621,n,System{(/tmp touch($NUMBER)}
** you don't need to create the file, Record will do that **
; create the file based on the variable entered
exten = 621,n,Set(audioscript=$[${NUMBER} + 1])
; set a channel variable in advance of recording to it
exten = 621,n,SayDigits(${NUMBER})
; say the NUMBER that was entered
exten = 621,n,System{/tmp touch($(audioscript)}
** See error #2 **
; create a file
exten = 621,n,Record(${audioscript})
** this would have to be
exten = 621,n,Record(${audioscript}.gsm)
**
; record a file based on the NUMBER + 1
exten = 621,n,Playback(audioscript)
** audioscript would be a fixed name like
/var/lib/asterisk/sounds/audioscript.gsm - correct would be
exten = 621,n,Playback(${audioscript}) **
; listen to the recording - it changes for each Demo
exten = 621,n,System(mv audioscript /var/lib/asterisk/sounds/en)
** same error as above - correct is 
exten = 621,n,System(mv ${audioscript}.gsm /var/lib/asterisk/sounds/en)
**
; move the recording to the sounds directory
exten = 621,n,Goto(${audioscript},1)
** the below should be googled for a correct solution - perhaps
voip-info.org ?? **
; goto the label/alias to hear it all together
exten = audioscript,1,Answer()
; Nothing
exten = audioscript,n,Playback(audioscript)
; plays audioscript
exten = audioscript,n,Playback(staticIVR_sample)
; adds some boring IVR lingo
exten = audioscript,n,Hangup()
; drops the call
--
Danny Nicholas
--

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Thomas Perron
Sent: Monday, February 08, 2010 11:04 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] IVR Demo / Create file / Move file / Demo all

Do you see any syntax errors?
Positive comments welcomed.

The short version of the logic is as follows:

create a file based on the NUMBER
create a an audio file
move to a new extension (label) and play the results

exten = 621,1,Answer()
exten = 621,n,Read(NUMBER,enteryournumberstartingwithaone,12,,5)
 ; create a variable from a DTMF entry / 12 characters long
exten = 621,n,System{(/tmp touch($NUMBER)}
; create the file based on the variable entered
exten = 621,n,Set(audioscript=$[${NUMBER} + 1])
 ; set a channel variable in advance of recording to it
exten = 621,n,SayDigits(${NUMBER})
  ; say the NUMBER that was entered
exten = 621,n,System{/tmp touch($(audioscript)}
; create a file
exten = 621,n,Record(${audioscript})
   ; record a file based on the NUMBER + 1
exten = 621,n,Playback(audioscript)
  ; listen to the recording - it changes for each
Demo
exten = 621,n,System(mv audioscript /var/lib/asterisk/sounds/en)
  ; move the recording to the sounds directory
exten = 621,n,Goto(${audioscript},1)
; goto the label/alias to hear it all together
exten = audioscript,1,Answer()
   ; Nothing
exten = audioscript,n,Playback(audioscript)
   ; plays audioscript
exten = audioscript,n,Playback(staticIVR_sample)
; adds some boring IVR lingo
exten = audioscript,n,Hangup()
   ; drops the call

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Steve Edwards
Un-top-posting...

 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Thomas Perron

 Do you see any syntax errors?

[snip]

On Mon, 8 Feb 2010, Danny Nicholas wrote:

 exten = 621,n,Read(NUMBER,enteryournumberstartingwithaone,12,,5)
 ; create a variable from a DTMF entry / 12 characters long
 ** the above name is very wordy and could be replaced with the standard
 enter-phone-number10 (in quotes because of outlook)

I would suggest creating your prompts outside of Asterisk's directory
for organization and to avoid potential name conflicts. I store my
prompts in a subdirectory of .../sounds/ based on project or client so
I can reference them easily.

 exten = 621,n,System{(/tmp touch($NUMBER)}

 ** you don't need to create the file, Record will do that **
 ; create the file based on the variable entered

You missed a bunch here:

1) Application parameters belong in parentheses, not curly-braces.

2) Variables are de-referenced by curly-braces, not parentheses.

3) The $ identifying a variable reference belongs outside of the 
curly-braces, not inside.

4) The parameter to the system() application is a command line. Maybe you 
meant touch /tmp/${NUMBER}.

 Positive comments welcomed.

And most importantly, do you (Thomas) really value the time of members of 
this list so little that you waste it with issues you obviously have put 
close to zero effort into?

On Sun, 7 Feb 2010, Thomas Perron wrote:

 works like magic.  thank you.  I love this list.  when you get stumped
 you can always (almost!) count on some great input!

I guess we have different definitions of stumped.

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Tzafrir Cohen
On Mon, Feb 08, 2010 at 12:36:18PM -0500, Thomas Perron wrote:
 what is OP please?
 can you just simply comment on the technical work please?

Original Poster. The one who started the thread. In this case it's you.

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IVR Demo / Create file / Move file / Demo all

2010-02-08 Thread Thomas Perron
this solution works.  thanks for the helpful comments.

exten = 621,n,Read(NUMBER,snowday,12,,10)
  ; create a variable from a DTMF entry / 12 characters long
;exten = 621,n,System{(/tmp touch($NUMBER)}
  ; create the file based on the variable entered
exten = 621,n,Set(audioscript=$[${NUMBER} + 1])
 ; set a channel variable in advance of recording to it
exten = 621,n,SayDigits(${NUMBER})
 ; say the NUMBER that was entered
exten = 621,n,SendDTMF(${NUMBER})
;exten = 621,n,System{/tmp touch($(audioscript)}
  ; create a file
exten = 621,n,Record(${audioscript}.gsm)
 ; record a file based on the NUMBER + 1
exten = 621,n,Playback(${audioscript})
; listen to the recording , etc.
exten = 621,n,System(mv ${audioscript}.gsm
/var/lib/asterisk/sounds/en)   ; move the recording to the
sounds directory
exten = 621,n,Playback(dir-welcome)
exten = 621,n,Playback(${audioscript})
exten = 621,n,Playback(snowday2)
exten = 621,n,Goto(s,1)

On Mon, Feb 8, 2010 at 2:00 PM, Tzafrir Cohen tzafrir.co...@xorcom.com wrote:
 On Mon, Feb 08, 2010 at 12:36:18PM -0500, Thomas Perron wrote:
 what is OP please?
 can you just simply comment on the technical work please?

 Original Poster. The one who started the thread. In this case it's you.

 --
               Tzafrir Cohen
 icq#16849755              jabber:tzafrir.co...@xorcom.com
 +972-50-7952406           mailto:tzafrir.co...@xorcom.com
 http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users