[asterisk-users] Call Recording and Posting

Elliot Otchet elliot.otchet at callingcircles.com
Tue Oct 13 10:51:25 CDT 2009


Steve's spot on about wanting to move the calls when they're available.  We're the instant gratification society.

Anytime I've linked multiple independent systems together I've always had to plan for one system being offline - either for maintenance, upgrades, etc. so please consider that in your solution.  Your successor will thank you for that too!  If you were only posting per call via AGI, then you might have some issues if the receiving server was unavailable.  Ivan's solution handles that cleanly (it would simply try moving the file again when the script is invoked again).  What to do?...Combine approaches!!

You could add some error checking to Ivan's script that tests if the file system is mounted (or another copy of the script is running) before invoking the other commands and exit if it is (e.g. look at the exit status code of curlftpfs, maybe?).

Doing so gives you three major benefits:
Prevents multiple copies of the script from running and trying to process the same file (low probability, but theoretical)
Lets you call the script more frequently without having to worry about multiple processes running simultaneously (the need to manage your concurrency).
Gives you a way to safely call this on a per call basis from the dialplan (right after the h,1,System(move the file to the upload directory)) to get the trigger for instant gratification.

To Steve's other point, you could put all of this into an AGI program/script, but you'll still also need a fallback mechanism to actually copy the files to the remote server in the event that it is unavailable/unreachable.  To me, having two lines in the dialplan versus one is no big deal.  Just make sure you add comments for it so your successors know the logic behind the code.

Just some more thoughts.

-Elliot

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ivan Stepaniuk
Sent: Tuesday, October 13, 2009 3:01 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Call Recording and Posting

Steve Edwards wrote:
> On Tue, 13 Oct 2009, Dan Journo wrote:
>
>
>> To avoid the problem of deleting/copying calls that are still being
>> recorded, I could record the call into a temp directory. Then using the
>> dial plan, I could copy the temp recording into the ftp root directory
>> once the call has ended.
>>
>
> True, but if you need to execute a process at the end of the call, why not
> make it an AGI and hide all the ugly details and keep your dialplan nice
> and clean and shiny and maintainable?
>
> Your recordings will be "instantly" available and the correct operation of
> your system does not depend on an externally scheduled external process
> involving clear-text passwords and obscure packages. Your successor will
> thank you :)
>
This is true, doing everything from inside an AGI script would be nicer,
the ugly part comes if you are tied to an old and ugly FTP server,
specially if its from a hosting provider that limits the connection
count to 2, or so. AGI+sshfs/scp/nfs/whateverfs... would be much more
clean&shiny (tm).

--
Iván Stepaniuk
Alba Fotónica S. L.
www.albafotonica.com


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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

This message is intended only for the use of the individual (s) or entity to which it is addressed and may contain information that is privileged, confidential, and/or proprietary to Calling Circles LLC and its affiliates. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, forwarding or copying of this communication is prohibited without the express permission of the sender. If you have received this communication in error, please notify the sender immediately and delete the original message.



More information about the asterisk-users mailing list