Re: [asterisk-users] vmoutcall

2007-05-28 Thread Tom Rymes

On May 24, 2007, at 3:28 PM, Doug Lytle wrote:


Paul Aviles wrote:

Hello guys,

I have been looking for a way to call a cell phone after someone  
has left a



This can easily be done with database lookups and .call files

to accomplishing this? Most analog pbx's have this feature and I  
am amazed

Asterisk does not natively.


It can be done natively; within the dial plan.

Doug


An aside, this can also be done using the externnotify option in the  
voicemail.conf file. That option allows you to specify an external  
script that will run when VoiceMailMain() exits. Watch out, because  
(as I just found out yesterday, the hard way), this script is run  
both when a voicemail message is left and when a user logs out of  
voicemail after checking their messages.


From there, create a script in your favorite language (a simple  
shell script ought to work for your purposes) and have it create a  
call file to call out to the user and drop them into a context that  
plays an announcement (You have new voicemail) and then asks them  
to confirm with a keypress (Dial 2 for voicemail). At that point,  
set the IVR up so dialing 2 drops them into Voicemail() and you are  
good to go.


Tom
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [asterisk-users] vmoutcall]

2007-05-25 Thread Paul Aviles
Doug, thanks, can you send me vm-callout.sh as I cannot find it using
google.

Regards,

Paul

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Lytle
Sent: Thursday, May 24, 2007 9:38 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] vmoutcall]

-- Perhaps someone can share how? 

First you need to give them the option of turning the feature on and off.  I
do it with the following:

[callback-activate]

; ***
; Callback activate/deactivate.  If this function ; is enabled and there is
a call file in the form ; of ${EXTEN}.call, then Asterisk will call the ;
phone number contained within the .call file 150 ; seconds after a voicemail
has been left.
; ***

exten = 80*,1,Set(CALLBACK=${DB(vmcallback/${CALLERIDNUM})})
exten = 80*,2,GotoIf($[${CALLBACK} = YES]?80*,3:80*,101) exten =
80*,3,Set(DB(vmcallback/${CALLERIDNUM})=NO)
exten = 80*,4,Playback(local/stutter)
exten = 80*,5,Playback(de-activated)
exten = 80*,6,Hangup()
exten = 80*,101,Set(DB(vmcallback/${CALLERIDNUM})=YES)
exten = 80*,102,Playback(local/stutter) exten =
80*,103,Playback(activated) exten = 80*,104,Hangup()

Then you need to do a database look up every place in your dial plan where
voice mail may be left, I do it as such:

[macro-sip.extensions]

exten = s,1,Set(CALLBACK=${DB(vmcallback/${ARG1})})
exten = s,n,SetMusicOnHold(cd)
exten = s,n,Dial(SIP/${ARG1},28,tWw)
exten = s,n,NoOP(Dial Status: ${DIALSTATUS}) exten = s,n,NoOP(Hangup
Cause: ${HANGUPCAUSE}) exten = s,n,Goto(s-${DIALSTATUS},1) exten =
s-NOANSWER,1,GotoIf($[${CALLBACK} =
YES]?s-NOANSWER,2:s-NOANSWER,3)
exten = s-NOANSWER,2,System(/usr/local/bin/vm-callout.sh ${ARG1}) exten =
s-NOANSWER,3,Voicemail([EMAIL PROTECTED])

If CALLBACK=YES, then run the script that copies the call file into the
outgoing directory.  It uses touch to set the date on the file 150 seconds
into the future.  This prevents the system calling the user while voice mail
is still being left.

The call file links into the dial plan that loops the message 4 times
waiting for acknowledgment by pressing 1 to collect voice mail.

[voice-mail-callback]

; 
; Set timeouts
; 

exten = s,1,Set(TIMEOUT(response)=6)
exten = s,2,Set(TIMEOUT(digit)=3)
exten = s,3,Wait(1)
exten = s,4,Set(COUNT=0)

; ***
; Play, your attention is required, press 1 to ; collect voice mail ;
***

exten = s,5,Background(attention-required)
exten = s,6,Background(press-1)
exten = s,7,Background(to-collect-voicemail)

; *
; If 1 is pressed, then play transfer and ; then jump to voice-mail context.
; *

exten = 1,1,Playback(pbx-transfer)
exten = 1,2,Goto(voice-mail,s,1)

; 
; Setup a variable to count the number of ; times the message has been
played, when ; $COUNT reaches  3, play you've taken ; to long to dial and
hangup.
; 

exten = t,1,Set(COUNT=$[${COUNT} + 1])
exten = t,2,NoOP(${COUNT})
exten = t,3,GotoIf($[ ${COUNT}  3 ]?103) exten =
t,4,Goto(voice-mail-callback,s,5) exten =
t,103,Playback(local/tolong-todial)
exten = t,104,Playback(goodbye)
exten = t,105,Hangup()

exten = i,1,Playback(local/sorry-invalid-choice)
exten = i,2,Set(COUNT=$[${COUNT} + 1])
exten = i,3,NoOP(${COUNT})
exten = i,4,Goto(voice-mail-callback,s,5)

exten = h,1,NoOP(Hungup)


Doug




-- 
 
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.


___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] vmoutcall]

2007-05-25 Thread Doug Lytle

Paul Aviles wrote:

Doug, thanks, can you send me vm-callout.sh as I cannot find it using
google.
  


That's just a script that I created.  Nothing special.  Attached below:

#!/bin/sh

cd /usr/local/bin
/bin/touch /usr/local/bin/$1.out.call
/bin/touch -r /usr/local/bin/$1.out.call -F 150 /usr/local/bin/$1.out.call
cp --preserve=timestamps /usr/local/bin/$1.out.call 
/var/spool/asterisk/outgoing/



Doug

--

Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety.


___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] vmoutcall

2007-05-24 Thread Paul Aviles
Hello guys,

I have been looking for a way to call a cell phone after someone has left a
voice mail and allow the user to enter the mailbox password to listen to it
and found a very old entry of vmoutcall. I tried unsuccessfully to get it to
work with 1.4 and is beyond me. Has anyone gotten this to work or has a way
to accomplishing this? Most analog pbx's have this feature and I am amazed
Asterisk does not natively.

Any thoughts on getting similar functionality into the main code too?

Regards,

Paul Aviles


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] vmoutcall

2007-05-24 Thread Doug Lytle

Paul Aviles wrote:

Hello guys,

I have been looking for a way to call a cell phone after someone has left a
  

This can easily be done with database lookups and .call files


to accomplishing this? Most analog pbx's have this feature and I am amazed
Asterisk does not natively.
  


It can be done natively; within the dial plan.

Doug

--

Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety.


___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [asterisk-users] vmoutcall

2007-05-24 Thread Paul Aviles
Perhaps someone can share how? 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Lytle
Sent: Thursday, May 24, 2007 3:29 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] vmoutcall

Paul Aviles wrote:
 Hello guys,

 I have been looking for a way to call a cell phone after someone has 
 left a
   
This can easily be done with database lookups and .call files

 to accomplishing this? Most analog pbx's have this feature and I am 
 amazed Asterisk does not natively.
   

It can be done natively; within the dial plan.

Doug

-- 
 
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.


___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] vmoutcall]

2007-05-24 Thread Doug Lytle
-- Perhaps someone can share how? 

First you need to give them the option of turning the feature on and 
off.  I do it with the following:


[callback-activate]

; ***
; Callback activate/deactivate.  If this function
; is enabled and there is a call file in the form
; of ${EXTEN}.call, then Asterisk will call the
; phone number contained within the .call file 150
; seconds after a voicemail has been left.
; ***

exten = 80*,1,Set(CALLBACK=${DB(vmcallback/${CALLERIDNUM})})
exten = 80*,2,GotoIf($[${CALLBACK} = YES]?80*,3:80*,101)
exten = 80*,3,Set(DB(vmcallback/${CALLERIDNUM})=NO)
exten = 80*,4,Playback(local/stutter)
exten = 80*,5,Playback(de-activated)
exten = 80*,6,Hangup()
exten = 80*,101,Set(DB(vmcallback/${CALLERIDNUM})=YES)
exten = 80*,102,Playback(local/stutter)
exten = 80*,103,Playback(activated)
exten = 80*,104,Hangup()

Then you need to do a database look up every place in your dial plan 
where voice mail may be left, I do it as such:


[macro-sip.extensions]

exten = s,1,Set(CALLBACK=${DB(vmcallback/${ARG1})})
exten = s,n,SetMusicOnHold(cd)
exten = s,n,Dial(SIP/${ARG1},28,tWw)
exten = s,n,NoOP(Dial Status: ${DIALSTATUS})
exten = s,n,NoOP(Hangup Cause: ${HANGUPCAUSE})
exten = s,n,Goto(s-${DIALSTATUS},1)
exten = s-NOANSWER,1,GotoIf($[${CALLBACK} = 
YES]?s-NOANSWER,2:s-NOANSWER,3)

exten = s-NOANSWER,2,System(/usr/local/bin/vm-callout.sh ${ARG1})
exten = s-NOANSWER,3,Voicemail([EMAIL PROTECTED])

If CALLBACK=YES, then run the script that copies the call file into the 
outgoing directory.  It uses touch to set the date on the file 150 
seconds into the future.  This prevents the system calling the user 
while voice mail is still being left.


The call file links into the dial plan that loops the message 4 times 
waiting for acknowledgment by pressing 1 to collect voice mail.


[voice-mail-callback]

; 
; Set timeouts
; 

exten = s,1,Set(TIMEOUT(response)=6)
exten = s,2,Set(TIMEOUT(digit)=3)
exten = s,3,Wait(1)
exten = s,4,Set(COUNT=0)

; ***
; Play, your attention is required, press 1 to
; collect voice mail
; ***

exten = s,5,Background(attention-required)
exten = s,6,Background(press-1)
exten = s,7,Background(to-collect-voicemail)

; *
; If 1 is pressed, then play transfer and
; then jump to voice-mail context.
; *

exten = 1,1,Playback(pbx-transfer)
exten = 1,2,Goto(voice-mail,s,1)

; 
; Setup a variable to count the number of
; times the message has been played, when
; $COUNT reaches  3, play you've taken
; to long to dial and hangup.
; 

exten = t,1,Set(COUNT=$[${COUNT} + 1])
exten = t,2,NoOP(${COUNT})
exten = t,3,GotoIf($[ ${COUNT}  3 ]?103)
exten = t,4,Goto(voice-mail-callback,s,5)
exten = t,103,Playback(local/tolong-todial)
exten = t,104,Playback(goodbye)
exten = t,105,Hangup()

exten = i,1,Playback(local/sorry-invalid-choice)
exten = i,2,Set(COUNT=$[${COUNT} + 1])
exten = i,3,NoOP(${COUNT})
exten = i,4,Goto(voice-mail-callback,s,5)

exten = h,1,NoOP(Hungup)


Doug




--

Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety.


___
--Bandwidth and Colocation provided by Easynews.com --

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