Re: [asterisk-users] monitor application, file name change on attended transfer
2012/10/22 Binan AL Halabi binanalhal...@yahoo.com Hi, You are using b flag in monitor command. This means don't begin recording untill call is bridged. So what you get if you delete this flag ? If I dont use the b flag then I get two separate files just like in the case when B waits till C answers before transfering call, but this is obvious because without b flag the monitor is started right away and when the time of transfer the second monitor is already stopped. It seems that when the channels are bridged after transfer the variables get mixed somehow and it affects the filename from monitor application. I think that when using b option I should not get any files from the second monitor application since that call is never answered. -- z poważaniem Grzegorz Pycia Administrator systemów contact center Thulium sp. z o.o. Na Skarpie 24 lok. 15, 31-910 Kraków tel. 123975301 www.thulium.pl -- _ -- 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
Re: [asterisk-users] monitor application, file name change on attended transfer
Grzegorz Pycia wrote: Hi I have some problem with monitor application when call i transferred in attended mode and the transfer occurs before call is answered. Here is how it looks: A calls B(let's assume ${UNIQUEUEID}=1) exten = _,1,NoOp seme = n,Set(MONITOR_FILENAME=call-${UNIQUEID}) same = n,monitor(alaw,/var/spool/asterisk/monitor/${MONITOR_FILENAME},bm) When B answers the call, files call-1-in* and call1-out* are created. During The call, B tries to make attended transfer A is put on hold and B calls C using the same dialplan logic: B calls C(let's assume ${UNIQUEUEID}=2) At the time off invoking monitor application none off the call-2 channels are monitored so the monitor application starts without errors, if B waits till C answers, everything is OK monitor starts recording and files call-2-in* and call-2-out* are created, When B transfers the call call-2 monitor is stopped. And call-2 files contain only the call between B and C. But there is problem when B does not wait until C answers the call, if transfer is done before C answers the call, the call-2* are not created and the call is still recorded to the call-1* files, but when the transferred call between A and C ends, the call-1* files get renamed to call-2* and the MONITOR_EXEC application is called with call-2* file names as parameters. This makes it impossible to locate the call record since the file names get changed, can someone tell if I should file a BUG report or is it intended to act like this? Regards Are you using Asterisk 1.8 or higher? A good way to mitigate this would be to use MixMonitor. It applies as an audiohook which should persist through transfers like the one you described, so you would just need to set AUDIOHOOK_INHERIT for MixMonitor in order to use it that way. One difference with this approach though would be that MixMonitor will automatically mix audio from both ends of the call into a single recording. That behavior can be worked around starting with Asterisk 10 by using the r and t options. I guess it's worth noting that if you aren't using 1.8 or higher there isn't really any point in filing a bug report since earlier versions aren't supported anymore. -- Jonathan R. Rose Digium, Inc. | Software Engineer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US direct +1 256 428 6139 Check us out at: http://digium.com http://asterisk.org -- _ -- 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
Re: [asterisk-users] monitor application, file name change on attended transfer
I'm using latest 1.8, althought I did check and this behaviour is the same since 1.6.2.11. I will file a bug report about it in 1.8.17.0. Auto Mixing would not bother me, i will check the Mix monitor. Regards. 22 paź 2012 17:22, Jonathan Rose jr...@digium.com napisał(a): Grzegorz Pycia wrote: Hi I have some problem with monitor application when call i transferred in attended mode and the transfer occurs before call is answered. Here is how it looks: A calls B(let's assume ${UNIQUEUEID}=1) exten = _,1,NoOp seme = n,Set(MONITOR_FILENAME=call-${UNIQUEID}) same = n,monitor(alaw,/var/spool/asterisk/monitor/${MONITOR_FILENAME},bm) When B answers the call, files call-1-in* and call1-out* are created. During The call, B tries to make attended transfer A is put on hold and B calls C using the same dialplan logic: B calls C(let's assume ${UNIQUEUEID}=2) At the time off invoking monitor application none off the call-2 channels are monitored so the monitor application starts without errors, if B waits till C answers, everything is OK monitor starts recording and files call-2-in* and call-2-out* are created, When B transfers the call call-2 monitor is stopped. And call-2 files contain only the call between B and C. But there is problem when B does not wait until C answers the call, if transfer is done before C answers the call, the call-2* are not created and the call is still recorded to the call-1* files, but when the transferred call between A and C ends, the call-1* files get renamed to call-2* and the MONITOR_EXEC application is called with call-2* file names as parameters. This makes it impossible to locate the call record since the file names get changed, can someone tell if I should file a BUG report or is it intended to act like this? Regards Are you using Asterisk 1.8 or higher? A good way to mitigate this would be to use MixMonitor. It applies as an audiohook which should persist through transfers like the one you described, so you would just need to set AUDIOHOOK_INHERIT for MixMonitor in order to use it that way. One difference with this approach though would be that MixMonitor will automatically mix audio from both ends of the call into a single recording. That behavior can be worked around starting with Asterisk 10 by using the r and t options. I guess it's worth noting that if you aren't using 1.8 or higher there isn't really any point in filing a bug report since earlier versions aren't supported anymore. -- Jonathan R. Rose Digium, Inc. | Software Engineer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US direct +1 256 428 6139 Check us out at: http://digium.com http://asterisk.org -- _ -- 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 -- _ -- 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
Re: [asterisk-users] monitor application, file name change on attended transfer
Hi, You are using b flag in monitor command. This means don't begin recording untill call is bridged. So what you get if you delete this flag ? // Binan Från: Grzegorz Pycia grzegorz.py...@thulium.pl Till: asterisk-users@lists.digium.com Skickat: lördag, 20 oktober 2012 23:49 Ämne: [asterisk-users] monitor application, file name change on attended transfer Hi I have some problem with monitor application when call i transferred in attended mode and the transfer occurs before call is answered. Here is how it looks: A calls B(let's assume ${UNIQUEUEID}=1) exten = _,1,NoOp seme = n,Set(MONITOR_FILENAME=call-${UNIQUEID}) same = n,monitor(alaw,/var/spool/asterisk/monitor/${MONITOR_FILENAME},bm) When B answers the call, files call-1-in* and call1-out* are created. During The call, B tries to make attended transfer A is put on hold and B calls C using the same dialplan logic: B calls C(let's assume ${UNIQUEUEID}=2) At the time off invoking monitor application none off the call-2 channels are monitored so the monitor application starts without errors, if B waits till C answers, everything is OK monitor starts recording and files call-2-in* and call-2-out* are created, When B transfers the call call-2 monitor is stopped. And call-2 files contain only the call between B and C. But there is problem when B does not wait until C answers the call, if transfer is done before C answers the call, the call-2* are not created and the call is still recorded to the call-1* files, but when the transferred call between A and C ends, the call-1* files get renamed to call-2* and the MONITOR_EXEC application is called with call-2* file names as parameters. This makes it impossible to locate the call record since the file names get changed, can someone tell if I should file a BUG report or is it intended to act like this? Regards -- _ -- 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-- _ -- 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
RE: [asterisk-users] Monitor application inestability and high load
Thanks for the answer Matthew. I'm having high load, choppy sound and slow responsives with an asterisk server (version 1.2.12.1) that make a peak of 90 channels (around 60 phones calling at max, isn't necessary to reach this peak to get the problem). All the traffic is SIP, with recording for every call. What codecs are you using? Are you performing any transcoding? What format are you using for the recordings? From sip show channels I use ulaw as codec for calls (both to sip phones and to PBX). I record with wav49 format in Monitor. The problems are detected in the high count of asterisk processes and sh wrappers to soxmix which could be as old as 1 hour in the server without a reason to stay idle, but for some unknow reason this sh don't die fast. This is when the dialplan calls Monitor obviously. I already tried to switch to MixMonitor but yesterday users reported that in some calls the recording isn't complete. Which is similar to a bug that is mentioned in mantis but for versions prior to 1.2.7. The asterisk logs don't show any particular message in verbose level 3. Apart from the recording, I have a high use of Manager and the mysql is used for some bussines logic but I think that nothing to high load, indeed mysql never is the most important part in processor, memmory and disk access statistics. What do your disk access statistics look like? In my experience, your call quality will begin to seriously deteriorate as you approach 60 simultaneous recordings. This is because the Monitor() code places a disk write in the code path that bridges channels. If it's possible to disable recordings for a while, you can confirm whether or not this is the source of your problem. The real problem was found. The configuration of this server had a recording path as /var/spool/asterisk/monitor/ for every call, so the size of monitor (the directory) keeps growing at 2000 files per day. Its peek was around 36MB, just containing the addresses of the files, I just changed the filename variable for Monitor to store in a path like /var/spool/asterisk/monitor/2007/05/29/. With this change the maximum size of a directory is 700k. To find this I used strace and saw an incredible amount of a system call that get the next entry of a directory (don't remember the name, sorry). Maybe is common sense don't do what we did here but now I can say why is bad :). That is the reason why sh (the rm command) was alive after soxmix had ended. Any knows a solution to this problem? or has an explanation for it? In general, you should try to offload as many processes from the Asterisk server as possible. MySQL is a good candidate for that, but the big one is soxmix. Transcoding audio files is CPU intensive and I wouldn't be surprised if it impacted your call quality. I've overcome the Monitor() problem by writing to a RAM disk. At the end of each call, the recordings are moved from the RAM disk to a remote machine via NFS where they are mixed and indexed for retrieval. My documentation of this process is available here: http://thread.gmane.org/gmane.comp.telephony.pbx.asterisk.user/118497 and here: http://lists.digium.com/pipermail/asterisk-users/2005- October/120930.html Note that we are overconfigured for RAM. You could probably get away with a 2 GB RAM disk. I've also made some refinements to the setup that increased reliability. If you choose to go down this path, I'll be happy to discuss them with you. Yes for some previous problems I read your threads about it, indeed I use it as reference for everything I try here. And for the RAM, I have a 600M of files at the end of the day, so I was thinking exactly in that 2GB to use as ramdisk. I have your way to do it as an option, the difference here is that people want more lines in one server, I actually have 2 servers doing this job (exactly same configuration in both) so changing to a storage/mixing backend in one and calls in others don't give us a real advantage in that point (the connection to others sites makes impossible to send more calls to that servers), but if the quality becomes an issue I'll have this as an option. Regards, Edgar Luna ___ --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] Monitor application inestability and high load
On Tue, 29 May 2007, Edgar A. Luna Diaz wrote: The real problem was found. The configuration of this server had a recording path as /var/spool/asterisk/monitor/ for every call, so the size of monitor (the directory) keeps growing at 2000 files per day. Its peek was around 36MB, just containing the addresses of the files, I just changed the filename variable for Monitor to store in a path like /var/spool/asterisk/monitor/2007/05/29/. With this change the maximum size of a directory is 700k. That's a common problem with many filesystems - there is a limit to the number of files it's sensible to put in one directory - it's really a SysAdmin issue, but it's going to be easy for others to enter this trap. It really does depend on the filesystem though - Linux ext3 is fair to middling at handling large numbers of files - with the dir_index option set, but without it, it's really bad. There are other filesystems which are better (and worse!) Ext3 has an option at create time - dir_index which you can set to make it use a more efficient way to store filenames. It's usually too late to change at production time unless you can take the server offline for a bit. (The defaults also depend on your Linux distribution too!) Your system of a new directory per day is a solution similar to many others adopted by other systems though! (eg. email spools, home directorys, squid cache files, etc.) Gordon ___ --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] Monitor application inestability and high load
Edgar A. Luna Diaz wrote: I'm having high load, choppy sound and slow responsives with an asterisk server (version 1.2.12.1) that make a peak of 90 channels (around 60 phones calling at max, isn't necessary to reach this peak to get the problem). All the traffic is SIP, with recording for every call. What codecs are you using? Are you performing any transcoding? What format are you using for the recordings? The problems are detected in the high count of asterisk processes and sh wrappers to soxmix which could be as old as 1 hour in the server without a reason to stay idle, but for some unknow reason this sh don't die fast. This is when the dialplan calls Monitor obviously. I already tried to switch to MixMonitor but yesterday users reported that in some calls the recording isn't complete. Which is similar to a bug that is mentioned in mantis but for versions prior to 1.2.7. The asterisk logs don't show any particular message in verbose level 3. Apart from the recording, I have a high use of Manager and the mysql is used for some bussines logic but I think that nothing to high load, indeed mysql never is the most important part in processor, memmory and disk access statistics. What do your disk access statistics look like? In my experience, your call quality will begin to seriously deteriorate as you approach 60 simultaneous recordings. This is because the Monitor() code places a disk write in the code path that bridges channels. If it's possible to disable recordings for a while, you can confirm whether or not this is the source of your problem. Any knows a solution to this problem? or has an explanation for it? In general, you should try to offload as many processes from the Asterisk server as possible. MySQL is a good candidate for that, but the big one is soxmix. Transcoding audio files is CPU intensive and I wouldn't be surprised if it impacted your call quality. I've overcome the Monitor() problem by writing to a RAM disk. At the end of each call, the recordings are moved from the RAM disk to a remote machine via NFS where they are mixed and indexed for retrieval. My documentation of this process is available here: http://thread.gmane.org/gmane.comp.telephony.pbx.asterisk.user/118497 and here: http://lists.digium.com/pipermail/asterisk-users/2005-October/120930.html Note that we are overconfigured for RAM. You could probably get away with a 2 GB RAM disk. I've also made some refinements to the setup that increased reliability. If you choose to go down this path, I'll be happy to discuss them with you. Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer ___ --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] Monitor application and e-mailing attachment
Attilla De Groot wrote: Hi all, exten = h,1,System(/etc/asterisk/mail.sh ${CALLFILENAME}) But this just doesn't work. Check the execute permissions on the script. If that doesn't work, then echo the output of the script to a log and review the log to find the error. 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] Monitor application and e-mailing attachment
On Jun 4, 2006, at 2:16 PM, Doug Lytle wrote: Check the execute permissions on the script. If that doesn't work, then echo the output of the script to a log and review the log to find the error. Doug Hi Doug, Well the permissions are set ok, but I just found out that the problem is that I give an argument in the system application. Because I say System(script.sh ${var}), but if I do that variable static in my script and then run it without argument, it's working without any problems. Regards, Attilla ___ --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] Monitor application and e-mailing attachment
Attilla De Groot wrote: Hi Doug, Well the permissions are set ok, but I just found out that the problem is that I give an argument in the system application. Because I say System(script.sh ${var}), but if I do that variable static in my script and then run it without argument, it's working without any problems. I pass variables to my scripts all the time. When I first started using scripts with variables, I was having issues with the scripts running, but producing no results. Echoing the variables to a log, I was able to track down why they weren't working. You may want to do the same. 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] Monitor application and e-mailing attachment
On Jun 4, 2006, at 5:29 PM, Doug Lytle wrote: I pass variables to my scripts all the time. When I first started using scripts with variables, I was having issues with the scripts running, but producing no results. Echoing the variables to a log, I was able to track down why they weren't working. You may want to do the same. Doug Can you show me an example from you ? Because if I echo everything works fine, but it just won't work. This doesn't work, while the echo is ok: exten = h,1,System(/bin/sh /etc/asterisk/mail.sh ${CALLFILENAME}) This does work: exten = h,1,System(/bin/sh /etc/asterisk/mail.sh CALL-008000200570-20060604-181756) Call me stupid, but thats exactly the same. Attilla ___ --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] Monitor application and e-mailing attachment
On 6/4/06, Attilla De Groot [EMAIL PROTECTED] wrote: Hi all, I'm trying to make a context that will monitor a call and when it's completed it would e-mail the wav to a specified mail adres. So I made a standard context that records a call, like this: exten = _*31*00[1-9].,1,Setvar(CALLFILENAME=CALL-${EXTEN:4}-$ {TIMESTAMP}) exten = _*31*00[1-9].,2,Monitor(wav,${CALLFILENAME},m}) [..snip..] Not sure if this is the problem or if you made a typo when sending the list email, but you seem to have put an extra } by accident: exten = _*31*00[1-9].,2,Monitor(wav,${CALLFILENAME},m}) .. should be: exten = _*31*00[1-9].,2,Monitor(wav,${CALLFILENAME},m) Regards, Gonzalo ___ --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] Monitor application and e-mailing attachment
Attilla De Groot wrote: On Jun 4, 2006, at 5:29 PM, Doug Lytle wrote: I pass variables to my scripts all the time. When I first started using scripts with variables, I was having issues with the scripts running, but producing no results. Echoing the variables to a log, I was able to track down why they weren't working. You may want to do the same. Doug Can you show me an example from you ? Because if I echo everything works fine, but it just won't work. Okay, I decided that I would give it a try, I ended up having the same issues as you. I got it figured out though. When using the monitor application, it splits the wave files into incoming and outgoing legs. Once the call has been completed, it mixes them into the final file. The problem is, it doesn't consider the h extension as the call completed. It waits until the h extension has terminated before merging. I proved this point by adding a sleep 20 in my script and the incoming/outgoing waves sat there for 20 seconds. My fix was to ad an ampersand at the end of the System script entry. As so: exten = h,1,System(/usr/local/bin/monitor.sh ${CALLFILENAME} ) This will cause the script to detach from the current shell. 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] Monitor application and e-mailing attachment
On Jun 4, 2006, at 8:11 PM, Doug Lytle wrote: Okay, I decided that I would give it a try, I ended up having the same issues as you. I got it figured out though. When using the monitor application, it splits the wave files into incoming and outgoing legs. Once the call has been completed, it mixes them into the final file. The problem is, it doesn't consider the h extension as the call completed. It waits until the h extension has terminated before merging. I proved this point by adding a sleep 20 in my script and the incoming/outgoing waves sat there for 20 seconds. My fix was to ad an ampersand at the end of the System script entry. As so: exten = h,1,System(/usr/local/bin/monitor.sh ${CALLFILENAME} ) This will cause the script to detach from the current shell. Doug Your a real life saver. Thank you. Attilla ___ --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] Monitor application and e-mailing attachment
Attilla De Groot wrote: On Jun 4, 2006, at 8:11 PM, Doug Lytle wrote: Okay, Your a real life saver. Thank you. Something you may want to keep an eye on though. I'm not sure if after the script completes, if it closes that shell. Maybe an exit in the script for safety? 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] Monitor application temporary hack
On 18 Aug 2003 15:07:12 -0600, Jared Smith wrote On Mon, 2003-08-18 at 14:59, Brian West wrote: Maybe we can pester kram to make that an option. monitor.conf anyone? bkw Well, while we're in the let's pester Mark mood... why not have him fix res_monitor so it writes to just one file! That would sure make me a lot happier... Jared Smith on a somewhat related subject, is there a possibility to eavesdrop on an existing connection? like dialling extension XX to eavesdrop on connection initiated by user YY (the mapping can be static if that would be a problem)? the connections would be between gnophone and pstn (i4l driver) and the eavesdropping client would most probably be x-lite if that matters. i need it as the supervisor needs to control and instruct newbie workers ;) tia grzegorz nosek Not with current code that I know of (anyone could prove me wrong, though.) There is the ability to turn Monitoring on and off via the Manager interface, though, and maybe you could look at that code and figure out how to write a whisper channel interface via the same hooks. JT ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
Depends. I don't recall any requirement for any beeps. Just a disclaimer that their call may be recorded. In Oklahoma state you don't have to let the other party know. Single party state. How great is that! :P Or you can use a ghetto beep.. just press a button on the phone every now and then! :P bkw PS: The worse that can happen is it can't be used in court. On Mon, 18 Aug 2003, John Brown wrote: So how does one emit the legally required ( in some locales) 10 to 30 sec soft beep, letting people know they are being recorded ?? very cool trick using the end point as the anchor for mixing the sounds :) :wq On Sun, Aug 17, 2003 at 10:48:25PM -0700, John Todd wrote: [apologies for no line wrap; config lines at bottom] I have mentioned on several threads here that the Monitor application doesn't do exactly what one would expect: the originating and answering legs of a call are unsynchronized by the duration of the interval that it takes for the answering leg to pick up the phone. This can be very distracting in a final mixed version of the file. Brian West ([EMAIL PROTECTED]) came up with a clever solution to this. Since we know the ENDING times to both channel recording files, if we started the final mixing process and worked from the rear of the file forward, we'd have a (usually) synchronized conversation that could be distilled into a single file. So, he suggested that the reverse feature of sox be run against each channel file, then the file gets mixed, and then the single output file was reversed again. I am happy to say this trick appears to work like a charm. I've enclosed snippets of my config files that reference Monitor below, including the reversal application. I've added some comments so that this can be made mostly portable. Note: I use soxmix to mix the channels, which is a part of more recent versions of sox. wxmix will also work if you're storing things as inefficient .wav files. Note2: From my testing, it seems that 1 minute of two-leg gsm soundfile equals almost exactly 100k of diskspace. Note3: DTMF, unless you are using in-band, of course is not recorded. Note4: Recording volume is a little quiet; you may need headphones to hear things well. You may twiddle with some of the features in sox to change this. JT ; -- start -- [globals] ; These variables are to avoid the irritating problem ; with inability to use regexp's on strings that have ; not been defined. ; ; These are used in [macro-record-on] and ; in [macro-record-cleanup] ; CALLFILENAME=foo FOO=foo [macro-record-on] ; ; This routine is called as a macro before a Dial statement, in order ; to record a call into a set of files. It is used hand-in-hand with ; the macro-record-cleanup routine. ; I use an AGI to get the base filenames, which are created using the ; date in form MMDD-HHMMSS which is then added to the ${EXTEN} and ; ${CALLERIDNUM} strings to form the complete filename. ; ; Call this routine with Macro(record-on,${EXTEN},${CALLERIDNUM}) ; ; 2003-06-15 This macro has limited usefulness. Currently, there is ; no synchronization between channels, and the second channel starts ; recording on answer received. In other words, there is a gap of ; N seconds between the voice of the caller and the voice of the ; called party where N is the number of seconds it took to answer ; the phone. Packet loss will further corrupt timing between the ; two channels. Mahmut and Mark have discussed possible solutions, ; but no pending patch yet. See the hack in the record-cleanup macro ; that handles things for the time being by mixing files starting ; from rear to front. ; ; ; Note that I set CALLERIDNUM=foo up in my [globals] section, due ; to the inability of Asterisk to compare against the null case. ; Long story, but you really should have that variable set up in ; [globals] if you use this. ; ; Note: Legality of call recording varies by nation and state. Consult ; a very good lawyer before turning this on, or preface all your in/out ; calls with 'This call may be recorded.' to give yourself some minimal ; grounds to stand on (though that may not be enough.) It is almost ; certainly illegal in any US state to record a party without their ; knowledge, and may even be a federal crime. ; ; GSM files, after mixing 2 channels into 1, equate to about 100kb for ; every 1 minute of spoken conversation. ; ; Contents of the file /var/lib/asterisk/agi-bin/set-timestamp.agi: ; ; #!/bin/sh ; longtime=`/bin/date +%Y%m%d-%H%M%S` ; echo SET VARIABLE timestamp $longtime ; ; I could just use the built in ${DATETIME} to create a timestamp, ; but I really hate the date format used (DDMM) since it is ; silly. (least specific to most specific, left to right is the ; best way to create timestamps,
Re: [Asterisk-Users] Monitor application temporary hack
New Mexico is also a single party state :) The financial service providers have a requirement for beeps on the line. Some states (don't remember which, but will research again) require that you have a beep on the line. That may have changed since the last time I really had to deal with this. On Mon, Aug 18, 2003 at 11:05:35AM -0500, Brian West wrote: Depends. I don't recall any requirement for any beeps. Just a disclaimer that their call may be recorded. In Oklahoma state you don't have to let the other party know. Single party state. How great is that! :P Or you can use a ghetto beep.. just press a button on the phone every now and then! :P bkw PS: The worse that can happen is it can't be used in court. On Mon, 18 Aug 2003, John Brown wrote: So how does one emit the legally required ( in some locales) 10 to 30 sec soft beep, letting people know they are being recorded ?? very cool trick using the end point as the anchor for mixing the sounds :) :wq On Sun, Aug 17, 2003 at 10:48:25PM -0700, John Todd wrote: [apologies for no line wrap; config lines at bottom] I have mentioned on several threads here that the Monitor application doesn't do exactly what one would expect: the originating and answering legs of a call are unsynchronized by the duration of the interval that it takes for the answering leg to pick up the phone. This can be very distracting in a final mixed version of the file. Brian West ([EMAIL PROTECTED]) came up with a clever solution to this. Since we know the ENDING times to both channel recording files, if we started the final mixing process and worked from the rear of the file forward, we'd have a (usually) synchronized conversation that could be distilled into a single file. So, he suggested that the reverse feature of sox be run against each channel file, then the file gets mixed, and then the single output file was reversed again. I am happy to say this trick appears to work like a charm. I've enclosed snippets of my config files that reference Monitor below, including the reversal application. I've added some comments so that this can be made mostly portable. Note: I use soxmix to mix the channels, which is a part of more recent versions of sox. wxmix will also work if you're storing things as inefficient .wav files. Note2: From my testing, it seems that 1 minute of two-leg gsm soundfile equals almost exactly 100k of diskspace. Note3: DTMF, unless you are using in-band, of course is not recorded. Note4: Recording volume is a little quiet; you may need headphones to hear things well. You may twiddle with some of the features in sox to change this. JT ; -- start -- [globals] ; These variables are to avoid the irritating problem ; with inability to use regexp's on strings that have ; not been defined. ; ; These are used in [macro-record-on] and ; in [macro-record-cleanup] ; CALLFILENAME=foo FOO=foo [macro-record-on] ; ; This routine is called as a macro before a Dial statement, in order ; to record a call into a set of files. It is used hand-in-hand with ; the macro-record-cleanup routine. ; I use an AGI to get the base filenames, which are created using the ; date in form MMDD-HHMMSS which is then added to the ${EXTEN} and ; ${CALLERIDNUM} strings to form the complete filename. ; ; Call this routine with Macro(record-on,${EXTEN},${CALLERIDNUM}) ; ; 2003-06-15 This macro has limited usefulness. Currently, there is ; no synchronization between channels, and the second channel starts ; recording on answer received. In other words, there is a gap of ; N seconds between the voice of the caller and the voice of the ; called party where N is the number of seconds it took to answer ; the phone. Packet loss will further corrupt timing between the ; two channels. Mahmut and Mark have discussed possible solutions, ; but no pending patch yet. See the hack in the record-cleanup macro ; that handles things for the time being by mixing files starting ; from rear to front. ; ; ; Note that I set CALLERIDNUM=foo up in my [globals] section, due ; to the inability of Asterisk to compare against the null case. ; Long story, but you really should have that variable set up in ; [globals] if you use this. ; ; Note: Legality of call recording varies by nation and state. Consult ; a very good lawyer before turning this on, or preface all your in/out ; calls with 'This call may be recorded.' to give yourself some minimal ; grounds to stand on (though that may not be enough.) It is almost ; certainly illegal in any US state to record a party without their ; knowledge, and may even be a federal crime. ; ; GSM files, after mixing 2 channels into 1, equate to about
Re: [Asterisk-Users] Monitor application temporary hack
So how does one emit the legally required ( in some locales) 10 to 30 sec soft beep, letting people know they are being recorded ?? very cool trick using the end point as the anchor for mixing the sounds :) :wq [snip] There is currently no way of which I am aware to insert audio on a connected channel, which is unfortunate because there are quite a few reasons that one would wish to do so. JT ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
Maybe we can pester kram to make that an option. monitor.conf anyone? bkw On Mon, 18 Aug 2003, John Todd wrote: So how does one emit the legally required ( in some locales) 10 to 30 sec soft beep, letting people know they are being recorded ?? very cool trick using the end point as the anchor for mixing the sounds :) :wq [snip] There is currently no way of which I am aware to insert audio on a connected channel, which is unfortunate because there are quite a few reasons that one would wish to do so. JT ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
On Mon, 2003-08-18 at 14:59, Brian West wrote: Maybe we can pester kram to make that an option. monitor.conf anyone? bkw Well, while we're in the let's pester Mark mood... why not have him fix res_monitor so it writes to just one file! That would sure make me a lot happier... Jared Smith ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
hahahaha while we are at it.. he has to fix a few issues. And since Mark didn't write res_monitor i'm sure its going to be a task that will take a little bit of time. http://bugs.digium.com/bug_view_page.php?bug_id=120 bkw On Mon, 18 Aug 2003, Jared Smith wrote: On Mon, 2003-08-18 at 14:59, Brian West wrote: Maybe we can pester kram to make that an option. monitor.conf anyone? bkw Well, while we're in the let's pester Mark mood... why not have him fix res_monitor so it writes to just one file! That would sure make me a lot happier... Jared Smith ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
On Mon, 2003-08-18 at 14:59, Brian West wrote: Maybe we can pester kram to make that an option. monitor.conf anyone? bkw Well, while we're in the let's pester Mark mood... why not have him fix res_monitor so it writes to just one file! That would sure make me a lot happier... Jared Smith Don't jump to that conclusion so quickly - there are reasons one might want multiple files. As an example, I have found it useful in at least one case to mix two call legs such that each leg is a different channel in a stereo final recording (easier to hear who said what, especially on conference calls) I think the proper bug to fix solution synopsis is: make Monitor start filling the second channel leg sound file with silence even before the second leg is picked up. Fill all gaps (if caused by IP packet loss on either leg) with silence. JT ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
I agree with jtodd on that one it would make life simpler.. I don't care if the files are seperate or not.. thats an easy solution to overcome. bkw On Mon, 18 Aug 2003, John Todd wrote: On Mon, 2003-08-18 at 14:59, Brian West wrote: Maybe we can pester kram to make that an option. monitor.conf anyone? bkw Well, while we're in the let's pester Mark mood... why not have him fix res_monitor so it writes to just one file! That would sure make me a lot happier... Jared Smith Don't jump to that conclusion so quickly - there are reasons one might want multiple files. As an example, I have found it useful in at least one case to mix two call legs such that each leg is a different channel in a stereo final recording (easier to hear who said what, especially on conference calls) I think the proper bug to fix solution synopsis is: make Monitor start filling the second channel leg sound file with silence even before the second leg is picked up. Fill all gaps (if caused by IP packet loss on either leg) with silence. JT ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
On Mon, 2003-08-18 at 15:45, John Todd wrote: Don't jump to that conclusion so quickly - there are reasons one might want multiple files. As an example, I have found it useful in at least one case to mix two call legs such that each leg is a different channel in a stereo final recording (easier to hear who said what, especially on conference calls) I don't mind having one person on the left channel and the other on the right... (In fact, that's a pretty good idea!) I'd just rather not have to mix the two files afterwords. (And yes, I've actually thought about what I just said... it would mean creating the file in a different format that supports stereo channels.) I think the proper bug to fix solution synopsis is: make Monitor start filling the second channel leg sound file with silence even before the second leg is picked up. Fill all gaps (if caused by IP packet loss on either leg) with silence. This is certainly the right thing to do, whether or not we combine the two channels inside of res_monitor. Maybe we should make it a configuration option? Or maybe I should just shut my trap and go back to manually mixing the files?!? Jared Smith ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
On 18 Aug 2003 15:07:12 -0600, Jared Smith wrote On Mon, 2003-08-18 at 14:59, Brian West wrote: Maybe we can pester kram to make that an option. monitor.conf anyone? bkw Well, while we're in the let's pester Mark mood... why not have him fix res_monitor so it writes to just one file! That would sure make me a lot happier... Jared Smith on a somewhat related subject, is there a possibility to eavesdrop on an existing connection? like dialling extension XX to eavesdrop on connection initiated by user YY (the mapping can be static if that would be a problem)? the connections would be between gnophone and pstn (i4l driver) and the eavesdropping client would most probably be x-lite if that matters. i need it as the supervisor needs to control and instruct newbie workers ;) tia grzegorz nosek ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application temporary hack
Well a feature like that would requrire some sort of auth so joe blow employee doesn't go picking up the phone when the boss is talkin to his mistress. :P But then again joe blow would be getting a raise shortly there after! bkw On Mon, 18 Aug 2003, Grzegorz Nosek wrote: On 18 Aug 2003 15:07:12 -0600, Jared Smith wrote On Mon, 2003-08-18 at 14:59, Brian West wrote: Maybe we can pester kram to make that an option. monitor.conf anyone? bkw Well, while we're in the let's pester Mark mood... why not have him fix res_monitor so it writes to just one file! That would sure make me a lot happier... Jared Smith on a somewhat related subject, is there a possibility to eavesdrop on an existing connection? like dialling extension XX to eavesdrop on connection initiated by user YY (the mapping can be static if that would be a problem)? the connections would be between gnophone and pstn (i4l driver) and the eavesdropping client would most probably be x-lite if that matters. i need it as the supervisor needs to control and instruct newbie workers ;) tia grzegorz nosek ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application
Actually the easy way would be to use the seek functionality with absolute time relative to when the recording began, combining Steven Critchfield's work with Mahmut's. That way even if there is silence in the middle where there are no packets, we seek to the right place in time to record. Mark On Thu, 12 Jun 2003, John Todd wrote: As has been mentioned before, the Monitor application and my macro have one significant problem: the recordings are un-synchronized to each other. The first channel starts recording when the Dial is executed. The second channel starts on Asterisk receiving an Answer from whatever channel driver is being connected. This means that there may be a several second delay between when you complete dialing and when the person answers - normally this delay is when the caller hears ringing tones. When the two files are merged together, this ring delay makes for a very confusing gap between the channels. What needs to be done is that either: a) Both channels need to start recording on the execution of the Dial statement, and silence needs to be recorded on whatever channel has not answered yet. b) A less elegant method could be to start the recording on both channels at the time of the Answer on the second channel. The clever person who came up with Monitor (Mahmut Fettahlioglu) had mentioned looking at this more sometime when he had a chance... JT At 1:35 PM +0300 6/12/03, Pertti Pikkarainen wrote: Check http://www.loligo.com/asterisk/current/extensions.conf and find macro called macro-record-on There is at least one way described ( author is John Todd ). --Pertti Andy Powell wrote: Hi, I've had a search through the archives and didn't find much. Is anyone using the Monitor application? I have it working but there is a really big drawback. The files are always called the same thing, which means if I make 2 calls one after the other the first recording is lost. I half expected Monitor to use something like ZAP-2-1-mmddhhmmss-in/out.wav for it's filenames but it just uses the channel eg Zap-2-1-in.wav Zap-2-1-out.wav has anyone found a solution to this? Thanks Andy ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Monitor application
Ahh, wonderful thanks... Andy On 12/06/2003 at 13:35 Pertti Pikkarainen wrote: Check http://www.loligo.com/asterisk/current/extensions.conf and find macro called macro-record-on There is at least one way described ( author is John Todd ). --Pertti ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Monitor application
Sorry about the delay for synchronised monitoring guys. It is actually quite easy to implement, no major risks that I can see; the time is the only issue at the moment. The project I was working on being just finished, I am planning to catch up with non-work stuff such as this patch pretty soon. -Original Message- From: John Todd [mailto:[EMAIL PROTECTED] Sent: Friday, 13 June 2003 6:49 To: [EMAIL PROTECTED] Cc: Fettahlioglu, Mahmut Subject: Re: [Asterisk-Users] Monitor application As has been mentioned before, the Monitor application and my macro have one significant problem: the recordings are un-synchronized to each other. The first channel starts recording when the Dial is executed. The second channel starts on Asterisk receiving an Answer from whatever channel driver is being connected. This means that there may be a several second delay between when you complete dialing and when the person answers - normally this delay is when the caller hears ringing tones. When the two files are merged together, this ring delay makes for a very confusing gap between the channels. What needs to be done is that either: a) Both channels need to start recording on the execution of the Dial statement, and silence needs to be recorded on whatever channel has not answered yet. b) A less elegant method could be to start the recording on both channels at the time of the Answer on the second channel. The clever person who came up with Monitor (Mahmut Fettahlioglu) had mentioned looking at this more sometime when he had a chance... JT At 1:35 PM +0300 6/12/03, Pertti Pikkarainen wrote: Check http://www.loligo.com/asterisk/current/extensions.conf and find macro called macro-record-on There is at least one way described ( author is John Todd ). --Pertti Andy Powell wrote: Hi, I've had a search through the archives and didn't find much. Is anyone using the Monitor application? I have it working but there is a really big drawback. The files are always called the same thing, which means if I make 2 calls one after the other the first recording is lost. I half expected Monitor to use something like ZAP-2-1-mmddhhmmss-in/out.wav for it's filenames but it just uses the channel eg Zap-2-1-in.wav Zap-2-1-out.wav has anyone found a solution to this? Thanks Andy ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users