Re: [asterisk-users] Automon -> Voicemail
Steve Johnson wrote: > Thanks. One more feature/automon question: > > Is there some way to provide audible feedback (play a specific sound > >> exten => s,n,Playback(local/stutter) >> That's what the above does. The stutter sound effect was a file I recorded from our Avaya PBX. 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 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] Automon -> Voicemail
Thanks. One more feature/automon question: Is there some way to provide audible feedback (play a specific sound file) to the initiator that a feature has been activated -- in this case that recording has started (like "bee-yup") and stopped ("bee-dah"), when you enter in the *1? On Mon, Dec 7, 2009 at 2:58 PM, Doug Lytle wrote: > Steve Johnson wrote: >> Hi all, >> >> What's the best method to send automon call recordings (*1) to the >> voicemail box of the Asterisk user? >> >> > > I've picked up the following off the list a while ago. Works pretty > good. I do a mysql lookup to see if the user has the ability or not: > > __features.conf:__ > > > [applicationmap] > > recordtovm => *8,self,Macro,recordtovm > > > __Dial plan entry:__ > > ; > ; Call recording, initiated by *8 > ; after hangup, send recording to > ; callers voice mail box > ; > > [macro-recordtovm] > > exten => s,1,MYSQL(Connect connid localhost username 'supersecret' > call_recording) > exten => s,n,GosubIf($["${MYSQL_STATUS}" = "-1"]?mysql_failed,s,6) > exten => s,n,MYSQL(Query resultid ${connid} SELECT allowed FROM > Indianapolis WHERE extension = ${CALLERID(number)}) > exten => s,n,MYSQL(Fetch fetchid ${resultid} results) > exten => s,n,MYSQL(Disconnect ${connid}) > exten => s,n,MYSQL(Clear ${resultid}) > exten => s,n,Set(RECORDING.OK=${results}) > exten => s,n,GotoIf($["${results}" = "Y"]?9:15) > exten => > s,n,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CALLERID(num)}) > exten => s,n,Set(ORIG_DATE=${STRFTIME(${EPOCH},,%c)}) > exten => s,n,Set(ORIG_TIME=${STRFTIME(${EPOCH},,%s)}) > exten => s,n,Set(ORIG_CID=${ARG2}) > exten => s,n,Playback(local/stutter) > exten => > s,n,MixMonitor(${MONITOR_FILENAME}.wav,b,/usr/local/bin/recordtovm.pl > ${CALLERID(num)} ${MONITOR_FILENAME}.wav "${ORIG_DATE}" "${ORIG_TIME}" > "${ORIG_CID}") > exten => s,n,NoOP(User allowed to record calls? ${results}) > > > > __Perl script__ > > cd /usr/local/bin > > cat recordtovm.pl > > #!/usr/bin/perl -w > # > use strict; > > my $monitordir="/var/spool/asterisk/monitor/"; > my $vmdir="/var/spool/asterisk/voicemail/sip/"; > my $vmfolder="INBOX"; > my $vmbox=$ARGV[0]; > my $vmpath=$vmdir."$vmbox/"."$vmfolder"; > my $monitorfilename=$ARGV[1]; > my $orig_date=$ARGV[2]; > my $orig_time=$ARGV[3]; > my $orig_cid=$ARGV[4]; > > opendir (DIR, $vmpath); > my @files = grep(/\.txt$/,readdir(DIR)); > closedir(DIR); > my @sortedfiles = sort {$b cmp $a} @files; > my $vmid; > if ($sortedfiles[0] =~ /^(msg)(\d\d\d\d)(.txt)/) > { > $vmid=$2; > $vmid++; > } > else > { > $vmid=""; > }; > > open VMFILE,"> $vmpath/msg$vmid.txt"; > print VMFILE ";\n"; > print VMFILE "; Message Information file\n"; > print VMFILE ";\n"; > print VMFILE "[message]\n"; > print VMFILE "origmailbox=$vmbox\n"; > print VMFILE "context=\n"; > print VMFILE "macrocontext=\n"; > print VMFILE "exten=s\n"; > print VMFILE "priority=\n"; > print VMFILE "callerchan=\n"; > print VMFILE "callerid=$orig_cid\n"; > print VMFILE "origdate=$orig_date\n"; > print VMFILE "origtime=$orig_time\n"; > print VMFILE "category=\n"; > print VMFILE "duration=\n"; > close VMFILE; > > if ($ARGV[1]) > { > system("mv $monitordir"."$monitorfilename $vmpath/msg$vmid.wav"); > }; > > > -- > > 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 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] Automon -> Voicemail
Steve Johnson wrote: > Hi all, > > What's the best method to send automon call recordings (*1) to the > voicemail box of the Asterisk user? > > I've picked up the following off the list a while ago. Works pretty good. I do a mysql lookup to see if the user has the ability or not: __features.conf:__ [applicationmap] recordtovm => *8,self,Macro,recordtovm __Dial plan entry:__ ; ; Call recording, initiated by *8 ; after hangup, send recording to ; callers voice mail box ; [macro-recordtovm] exten => s,1,MYSQL(Connect connid localhost username 'supersecret' call_recording) exten => s,n,GosubIf($["${MYSQL_STATUS}" = "-1"]?mysql_failed,s,6) exten => s,n,MYSQL(Query resultid ${connid} SELECT allowed FROM Indianapolis WHERE extension = ${CALLERID(number)}) exten => s,n,MYSQL(Fetch fetchid ${resultid} results) exten => s,n,MYSQL(Disconnect ${connid}) exten => s,n,MYSQL(Clear ${resultid}) exten => s,n,Set(RECORDING.OK=${results}) exten => s,n,GotoIf($["${results}" = "Y"]?9:15) exten => s,n,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${CALLERID(num)}) exten => s,n,Set(ORIG_DATE=${STRFTIME(${EPOCH},,%c)}) exten => s,n,Set(ORIG_TIME=${STRFTIME(${EPOCH},,%s)}) exten => s,n,Set(ORIG_CID=${ARG2}) exten => s,n,Playback(local/stutter) exten => s,n,MixMonitor(${MONITOR_FILENAME}.wav,b,/usr/local/bin/recordtovm.pl ${CALLERID(num)} ${MONITOR_FILENAME}.wav "${ORIG_DATE}" "${ORIG_TIME}" "${ORIG_CID}") exten => s,n,NoOP(User allowed to record calls? ${results}) __Perl script__ cd /usr/local/bin cat recordtovm.pl #!/usr/bin/perl -w # use strict; my $monitordir="/var/spool/asterisk/monitor/"; my $vmdir="/var/spool/asterisk/voicemail/sip/"; my $vmfolder="INBOX"; my $vmbox=$ARGV[0]; my $vmpath=$vmdir."$vmbox/"."$vmfolder"; my $monitorfilename=$ARGV[1]; my $orig_date=$ARGV[2]; my $orig_time=$ARGV[3]; my $orig_cid=$ARGV[4]; opendir (DIR, $vmpath); my @files = grep(/\.txt$/,readdir(DIR)); closedir(DIR); my @sortedfiles = sort {$b cmp $a} @files; my $vmid; if ($sortedfiles[0] =~ /^(msg)(\d\d\d\d)(.txt)/) { $vmid=$2; $vmid++; } else { $vmid=""; }; open VMFILE,"> $vmpath/msg$vmid.txt"; print VMFILE ";\n"; print VMFILE "; Message Information file\n"; print VMFILE ";\n"; print VMFILE "[message]\n"; print VMFILE "origmailbox=$vmbox\n"; print VMFILE "context=\n"; print VMFILE "macrocontext=\n"; print VMFILE "exten=s\n"; print VMFILE "priority=\n"; print VMFILE "callerchan=\n"; print VMFILE "callerid=$orig_cid\n"; print VMFILE "origdate=$orig_date\n"; print VMFILE "origtime=$orig_time\n"; print VMFILE "category=\n"; print VMFILE "duration=\n"; close VMFILE; if ($ARGV[1]) { system("mv $monitordir"."$monitorfilename $vmpath/msg$vmid.wav"); }; -- 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 http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Automon -> Voicemail
Hi all, What's the best method to send automon call recordings (*1) to the voicemail box of the Asterisk user? Do you have to trap hangups, etc, or is there some global variable that can be set? Thanks! S. ___ -- 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