December 17, 2017, 03:21:58 pm *
Welcome, Guest. Please login or register.
News:
 
   Forum Home   Search Login Register OBiTALK  
Pages: 1 2 [3]
  Print  
Author Topic: Script to record call in progress  (Read 324150 times)
infin8loop
Full Member
***
Posts: 219


My code doesn't abend, it loops to ∞


« Reply #40 on: October 03, 2014, 02:01:04 am »


At the request of DougObiFan, another script to stop a call recording in progress:

https://app.box.com/s/clcyu6z2y41oth299jtb

You could create a shortcut named "Stop OBi Recording" pointing to the vbs script.  You will need to change 2 parameters in the script for your OBi IP address and your password. I tested with an OBi110 and it seems to work.
Be aware the stop script will indicate "OBi Recording has been stopped" whether or not there was an actual recording in progress to be stopped.

As others have confirmed, on Obi2?? models (and perhaps others) a port=n parameter might to to be added.  The script will handle a 0 or 1 if passed as part of the executing command line.

I came to the conclusion that my "work" laptop has had so much security put on it that running vbscripts is no longer an option. I'm on a non-work Vista laptop now and the scripts seem to run fine. I only have access to 2 OBi110 models, so scripts may or may not work for all the new fangled boxes out there.
Logged

"This has not only been fun, it's been a major expense." - Gallagher
kommon
Newbie
*
Posts: 2


« Reply #41 on: December 05, 2014, 11:52:52 am »

Is there anyway to automate this process to record all calls by setting some entry in ddwrt router and forwarding request to destination computer?
Logged
curt00
Jr. Member
**
Posts: 30


« Reply #42 on: July 14, 2015, 10:11:55 am »

I found a way to automatically record calls on a Mac!!!


Using Phone Amego http://www.sustworks.com/sb_site/index.html
(an Amazing Application)

See the this for how I set it up.

very simple

Can you elaborate?  Where does http://10.100.101.105/record.au point to?  Is that your internal IP address for your Mac?

What about your input for "Notification URL".  Do I enter the same URL as you have?  If not, what should I enter?

Logged
curt00
Jr. Member
**
Posts: 30


« Reply #43 on: July 14, 2015, 10:58:29 am »

I understand it is possible to login to OBI management interface and record the call in progress.

How do you do this?  I've tried this by going to http://192.168.2.XX > Status > Call Status > clicked on Record.  But I cannot find the recording or recorded file.  On Call History, there is no recording to playback.
Logged
drgeoff
Hero Member & Beta Tester
*****
Posts: 2737


« Reply #44 on: July 17, 2015, 08:48:01 am »

I understand it is possible to login to OBI management interface and record the call in progress.

How do you do this?  I've tried this by going to http://192.168.2.XX > Status > Call Status > clicked on Record.  But I cannot find the recording or recorded file.  On Call History, there is no recording to playback.
The file is saved on the computer,  not the OBi.
Logged
b3ll
Newbie
*
Posts: 1


« Reply #45 on: March 19, 2016, 12:10:46 pm »

Per your request I created the attached obi-recordcallinator.vbs script.

Good luck and let me know how it works out.

infin8loop

It works perfect for me on my OBi100. Thanks so much!!!
Logged
siafu2000
Newbie
*
Posts: 1


« Reply #46 on: March 27, 2016, 01:42:05 pm »

Is there a script or instructions on how to record all calls automatically in windows?
Logged
restamp
Full Member
***
Posts: 193


« Reply #47 on: March 27, 2016, 06:18:44 pm »

I don't do Windows, but here is a script I use to record conversations on my Linux box.  Perhaps it might help give you some ideas.
Code:
#
# This script records a phone call in progress from the specified OBi device
#
USER=user
PW=/change/this/to/the/password/of/the/user/account/on/your/OBi/device
DIR=/path/to/the/directory/to/save/recorded/conversations/in
IP=192.168.0.5/user     # change this to whatever IP address is assigned to your OBi

[ X != "X$1" ] && FILE="$1" || FILE="${0##*/}-$(date +%F@%H:%M)"

cd "$DIR"

case "./$0" in
*/ph1 ) PORT=0 ;;
*/ph2 ) PORT=1 ;;
esac

exec wget --user="$USER" --password="$PW" --output-document="$FILE" \
                "http://$IP/record.au?port=$PORT"

Install this shell script in a directory searchable by your PATH variable, and link it as both "ph1" and "ph2".  When I'm on a call and decide I'd like to record it, I type "ph1" or "ph2" on a command line screen, depending on which line I am on.  The recording continues until I cancel it or hang up.  Optionally, I can specify the name of the file as an argument to the command itself; otherwise the script creates one based on the current date and time.

A few caveats:  This was tested under the Korn shell, but it uses standard shell constructs and should run correctly under any modern shell.  It's only been tested with my OBi202 which is running build 5135.  It does support recording two conversations simultaneously.  I chose to use the user account to initiate the recordings.  I did this because it is more restrictive, but you can also use the admin account if you prefer; just change the USER variable to "USER=admin", specify the admin password, and remove the "/user" from the IP address.  Since the account password is recorded in the script, you should probably restrict read access to protect your OBi's access credentials from prying eyes.  (BTW, you do know how to set the User account password, right?  It can be done under the 'System Management' -> 'Device Admin' page on the OBi.)

My Easter present to all you Linux folks reading the forum.  Enjoy!
« Last Edit: March 27, 2016, 09:48:06 pm by restamp » Logged
Ruslan
Newbie
*
Posts: 8


« Reply #48 on: September 30, 2016, 09:50:44 am »

Here's a Python script that can run on any OS (Windows, Mac, Linux etc).


Code:
ip_address = '192.168.0.55'              # IP address of the OBInet
username, password = 'user', 'user'   # username and password
local_dir = 'C:/temp/recordings'         # directory to save .au audio files

# you unlikely will need to make any changes below

import requests
from requests.auth import HTTPDigestAuth

from time import sleep, strftime

while 1 == 1:
    try:
        response = requests.get('http://%s/user/record.au' % ip_address, auth=HTTPDigestAuth(username, password))

        if response.status_code == 200 and len(response.content) > 0:

            filename = strftime(local_dir + '/rec%Y-%m-%d_%H-%M-%S.au')

            with open(filename, 'wb') as f:
                f.write(response.content)
                f.close()

            print('New file %s created' % filename)

    except Exception as e:
        print('%s: exception: %s' % (strftime("%c"), e.message))

    sleep(10)


It's also stable for any temporary network or Obinet problems - will not bail out and keep monitoring for calls.
Logged
ubergoober
Newbie
*
Posts: 10


« Reply #49 on: October 16, 2016, 09:40:21 pm »

I took a different approach.  I have Freeswitch running on a Raspberry Pi and my OBI202 SP3 registers to Freeswitch.  I added a Speed dial entry **31732.  When dialed, extension 1732 simply records any audio that is received.  While on either an incoming or outgoing call, line 1 or line 2, I am able to key the flash button on my DECT phone, followed by the speed dial entry and then flash a 2nd time and the call is recorded.  WinSCP let's me get at the recordings easily.
Logged
ubergoober
Newbie
*
Posts: 10


« Reply #50 on: November 21, 2016, 10:23:13 pm »

2nd Alternative approach?  Node-Red running on the Pi.  I directed Obi202 syslog output to udp port 1514.  Node-Red running as a service captures the syslog events, and when an off-hook message comes through, executes a wget based shell script to "press" the record button for the appropriate port.  Upon completion, the CDR callhistory.htm page is called and the caller ID is used to rename the recording with a timestamp, and if the call was received or placed, in the filename.  Completely hands free operation, while accommodating both ports.

You can find this node-red flow at the node-red library: http://flows.nodered.org

or on github:

https://gist.github.com/tomlynn/1acb62db43de9b7f8bc0750f02307d54
« Last Edit: December 06, 2016, 07:00:17 pm by ubergoober » Logged
Noodles
Newbie
*
Posts: 3


« Reply #51 on: February 19, 2017, 10:00:21 am »

Infin8loop, great script! Thank you!

Anyone know how can I append the complete phone number associated with the call to the file name in the vb script? Would like to add it at the end of the current file name scheme so I can quickly search when needed.

Thanks again!
nn

Logged
vondes
Newbie
*
Posts: 7


« Reply #52 on: April 11, 2017, 02:07:49 am »

I know exactly what an application can use to record calls and data, many use spyware of this type.
Logged
ubergoober
Newbie
*
Posts: 10


« Reply #53 on: April 11, 2017, 11:23:48 pm »

@Noodles,
You'll want to have your script wait a second or two after the recording completes and then look at the contents of http://obi-ip-address/callhistory.htm  It contains the list of call detail records.  Good luck.
Logged
AutoCallRecorder
Newbie
*
Posts: 1


« Reply #54 on: June 13, 2017, 09:42:12 pm »

Hello,

Like many of you, I got frustrated with the Obihai's seeming inability to record calls automatically. I've adapted the OP's script so that, as long as its running, it will monitor the call status page for active calls from/to numbers white-listed in the script and record those calls, producing an output file with the callers'/recipients' name. Make sure that the script starts up with Windows.


I might adapt the script so that it's easier to expand the number of filtered names and numbers (by adding an array for it to check rather than just blocks of if statements) if there's any popular demand. Additionally, if anyone requests, and time permits, I could modify the script so that it records all phone numbers and names the resulting files with the phone number included.

Enjoy!

* AutomatedCallRecorderWithFilter_Public.vbs (4.66 KB - downloaded 75 times.)
Logged
GoogleFan
Newbie
*
Posts: 3


« Reply #55 on: November 13, 2017, 10:16:51 am »

Can anyone help me?

I don't have the record button at all on my Obi1032 device. I only have it on my Obi200.
Is something wrong with my device?

Thanks
Logged
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC