Reply
 
Thread Tools Display Modes
  #1  
Old 01-07-10, 05:10 PM
stucker stucker is offline
Member
 
Join Date: Oct 2007
Location: Milwaukee, Wisconsin
Posts: 71
Record calls script
Anyone know if of a working sciprt to record inbound calls? Any leads would be appreciated.

-stucker




Example:

--------------------------------------------
[globals]
CALLFILENAME=foo
FOO=foo

[macro-record-on]
exten => s,1,AGI(set-timestamp.agi)
exten => s,2,SetVar(CALLFILENAME=${timestamp}-${ARG2}-${ARG1})
exten => s,3,Monitor(wav,${CALLFILENAME})

[macro-record-cleanup]
exten => s,1,GotoIf($['${CALLFILENAME}' = '${FOO}']?5:2)
exten => s,2,SetVar(MONITORDIR=/var/spool/asterisk/monitor)
exten => s,3,System(/usr/bin/soxmix '${MONITORDIR}/${CALLFILENAME}-in.wav' '${MONITORDIR}/${CALLFILENAME}-out.wav' '${MONITORDIR}/${CALLFILENAME}.wav')
exten => s,4,System(/bin/rm '${MONITORDIR}/${CALLFILENAME}-in.wav' '${MONITORDIDIR}/${CALLFILENAME}-out.wav')
exten => s,5,Hangup

[default]
exten => _.,1,Macro(record-on,${EXTEN},${CALLERIDNUM})
...
exten => _.,6,Goto(default-post,${EXTEN},1)

--------------------------------------------
Reply With Quote
  #2  
Old 01-08-10, 02:32 PM
jmullinix jmullinix is offline
Guru
 
Join Date: Oct 2007
Location: Epworth, Ga. 30541
Posts: 900
Why not just use the recording capability built into Asterisk and FreePBX. You can set recording on demand or record always in the extensions setup in FreePBX.
__________________
John Mullinix
Free Dial Plan builder for FreePBX
http://cohutta.com/npanxx.php
1-706-632-3343
sip://17066323343@qth.cohutta.org
Freenum 17066323343*790
Dundi Peers wanted in Baltimore, MD and Lake Wales, FL
Reply With Quote
  #3  
Old 01-20-10, 11:51 AM
gzpxyj gzpxyj is offline
Member
 
Join Date: Oct 2009
Posts: 95
Originally Posted by jmullinix View Post
Why not just use the recording capability built into Asterisk and FreePBX. You can set recording on demand or record always in the extensions setup in FreePBX.
The record on demand is default. But what is the correct command to get in-call recorded, *1 seems not working for pbxinaflash 1.3. Have no idea how to get on demand recording started.
Reply With Quote
  #4  
Old 01-20-10, 04:21 PM
stucker stucker is offline
Member
 
Join Date: Oct 2007
Location: Milwaukee, Wisconsin
Posts: 71
Originally Posted by jmullinix View Post
Why not just use the recording capability built into Asterisk and FreePBX. You can set recording on demand or record always in the extensions setup in FreePBX.
Unfortunately, since I'm off loading the inbound call to a custom script the inbound call recording set in Freepbx is being bypassed. As such I had to find a way to pick this back up via the script. The following is what fixed my problem for those having the same problem:

exten => 99,33,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},,%Y %m%d-%H%M%S)}-${CALLERID(num)})
exten => 99,34,MixMonitor(${MONITOR_FILENAME}.wav,b)
Reply With Quote
  #5  
Old 02-08-10, 07:37 AM
lgaetz lgaetz is online now
Guru
 
Join Date: Sep 2009
Location: Nova Scotia, Canada
Posts: 152
Originally Posted by gzpxyj View Post
But what is the correct command to get in-call recorded, *1 seems not working for pbxinaflash 1.3.
I had the same problem. You have to modify "Dialing options" at the top of the screen for "General Settings". Make sure that there is a lowercase 'w' under both the incoming and outgoing "asterisk dial command options". Default PIAF install does not have this.

Lorne

Last edited by lgaetz : 02-08-10 at 07:41 AM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:05 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007-2008, Ward Mundy & Associates