December 14, 2017, 02:03:27 am *
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 322205 times)
MYOBi
Jr. Member
**
Posts: 21


« on: January 21, 2012, 12:26:33 pm »

I understand it is possible to login to OBI management interface and record the call in progress.
Is it possible to create a script, when executed from windows, it will start recording the call in progress from the PC OBI is connected to?

See this for scripting ideas: http://www.obitalk.com/forum/index.php?topic=1152.0

Or, preferably, is it possible to record the call in progress by pressing certain keys on the telephone keypad, recorded file to be saved in the connected PC?

Thanks,

Logged
infin8loop
Full Member
***
Posts: 219


My code doesn't abend, it loops to ∞²


« Reply #1 on: January 22, 2012, 02:17:04 am »

Per your request I created the attached obi-recordcallinator.vbs script.   I have done very limited testing.  It successfully recorded a couple of test calls, the longest being 1min 42secs.  I don't know for sure how it will behave on longer calls as the files get larger.

The 3 variables in the script that must be changed to your specific configuration are:

strURL = "http://192.168.0.40/record.au"
''change 192.168.0.40 above to the local IP address of your Obi

strPassword = "obipassword"
''change obipassword above to the password of your local Obi page login

strDirectoryPath = "C:\Call_Recordings"
''change C:\Call_Recordings above to the full path of the directory to save the call recordings into. The Directory must already exist.

The script does exactly what clicking the "Record" button does and the resulting recording is saved in the directory specified by strDirectoryPath with a file name in the format of obi_recording_yyyymmdd_hhmmss.au.

Good luck and let me know how it works out.

infin8loop

Updated the attached script. Added some basic error checking based on feedback. Will now display "No OBi call in progress" if there is no call in progress.

  

* obi-recordcallinator.vbs (2.01 KB - downloaded 1173 times.)
« Last Edit: January 22, 2012, 01:53:00 pm by infin8loop » Logged

"This has not only been fun, it's been a major expense." - Gallagher
MYOBi
Jr. Member
**
Posts: 21


« Reply #2 on: January 22, 2012, 08:01:28 am »

infin8loop,

I tried your script a couple of times. The first attempt was not successful, at the end of the first call, my local OBI rebooted by itself, and nothing was recorded. At the second try, the recorded massage appeared in the specified folder. I like the additions of date and time strings. Very nice!

Thanks.

Edit: I ran the script again when there was no call in progress, just to perform a stress test. It gives an error message.
"Arguments are of wrong type" at Line 27, char 1, code... source...
« Last Edit: January 22, 2012, 08:07:44 am by MYOBi » Logged
mrnaughty
Newbie
*
Posts: 10


« Reply #3 on: January 22, 2012, 01:14:18 pm »

Works good when call in progress.!
Thank you!
Logged
infin8loop
Full Member
***
Posts: 219


My code doesn't abend, it loops to ∞²


« Reply #4 on: January 22, 2012, 02:30:58 pm »

infin8loop,

I tried your script a couple of times. The first attempt was not successful, at the end of the first call, my local OBI rebooted by itself, and nothing was recorded. At the second try, the recorded massage appeared in the specified folder. I like the additions of date and time strings. Very nice!

Thanks.

Edit: I ran the script again when there was no call in progress, just to perform a stress test. It gives an error message.
"Arguments are of wrong type" at Line 27, char 1, code... source...


I'm not sure why your OBi would have rebooted.  I just checked my OBi and it's been up for 2 days (after a config change), well before I even thought of this script. If your OBi reboots immediately during or after the call recording, please check the Status -> System Status -> Product Information -> Uptime for the Reboot Reason code that's in parenthesis. This may or may not tell us something.         

I updated the script (see the updated attachment to the original post) by adding some basic error checking to handle the "Line 27, char 1" error when no call is in progress by displaying a more friendly "No OBi call in progress" message.

If anyone wants to share the longest duration of call they've successfully recorded with the script, I'd appreciate the info.

Thanks for the feedback.
Logged

"This has not only been fun, it's been a major expense." - Gallagher
Judgeless
Full Member
***
Posts: 89


« Reply #5 on: January 22, 2012, 02:55:18 pm »

Works perfect.  Thanks
Logged
MYOBi
Jr. Member
**
Posts: 21


« Reply #6 on: January 22, 2012, 05:33:27 pm »

infin8loop,

Quote
please check the Status -> System Status -> Product Information -> Uptime for the Reboot Reason code that's in parenthesis. This may or may not tell us something.   

(6) may be the reason code for reboot:
UpTime           0 Days 8:14:57 (6)

The code works perfectly. Thanks again, in case we need such a recording one day for "Quality control purposes!!"
Logged
RonR
Forum Member

Posts: 4528


« Reply #7 on: January 22, 2012, 05:39:25 pm »

Reboot Reason Codes:

6: New Profile Invoked AND Profile URL Changed
Logged
MYOBi
Jr. Member
**
Posts: 21


« Reply #8 on: January 23, 2012, 11:42:02 am »

Can you please explain what this code does? Does it change the configuration file inside the OBI so it enables the device for recording (<- I am guessing here)  and maybe that was the reason the profile was changed after first reboot?

The reason I am asking is when I was in a call today, during the converstion, both parties heard a female voice saying "This call is being recorded". We did not run this script at all during this call, and in fact the PC was OFF. We made the call from Google Voice (SP1). I am wondering if recorded announcement came from Google Voice, if not OBI itself.

When I run the script, we never heard "This call is being recorded" message before, although it is desired to hear that.

If profile is changed, what was changed in the profile to enable recording? Where can I look at in the expert mode or from the protal to find out profile enables recording if such a thing exist?

I searched and found this
https://groups.google.com/a/googleproductforums.com/forum/#!category-topic/voice/making-and-receiving-calls/Ct6NL05OgcA


Thanks,
Logged
infin8loop
Full Member
***
Posts: 219


My code doesn't abend, it loops to ∞²


« Reply #9 on: January 23, 2012, 02:59:08 pm »


I suspect the "This call is being recorded" voice you heard was from Google Voice.  Normally you would have to press "4" during the call to trigger Google Voice recording.  I have the press  "4" to record calls option disabled in my Google Voice settings but nevertheless I sometimes get the "This call is being recorded" voice during a call even though "4" has not been pressed by me or the other party. When this happens, the call is indeed recorded by Google Voice. The Google forum you cited seems to confirm this behavior is probably a bug in Google Voice. The OBi, as far as I know, does not have the capability (at this time) to voice a "This call is being recorded" when it's recording a call.  If legally required to notify the other party, then you'd have to do so, verbally, yourself (nonlegalbeagledisclaimer).

As far as your reboot is concerned, as coincidental as it might seem, I don't have any reason to believe it was a result of running this script to record a call. In testing, I have never experienced a reboot (my UpTime confirmed this).  I doubt the OBi recording a call involves making any changes to a profile.       

The script simply emulates what pressing the "Record" button within the OBi interface does. When you press the "Record" button in the local OBi interface at http://your-obi-ip-address you are essentially launching page
http://your-obi-ip-address/record.au.  You can confirm this by navigating directly to http://your-obi-ip-address/record.au during a call.  Going there with no call in progress results in an empty page.  The script accomplishes this by the lines objHTTP.open "POST", strURL, False, "admin", strPassword and objHTTP.send where strURL = "http://your-obi-ip-address/record.au".
The response, or recording is in objHTTP.responseBody and is obtained by line BinaryStream.Write objHTTP.responseBody into a BinaryStream object that is then written to the target file by line BinaryStream.SaveToFile strFileName, 2.  Remember, all this script code is running on your PC, not the OBi.  The only script interaction with the OBi is through the http://your-obi-ip-address/record.au URL that your browser would use when clicking the "Record" button.

All this can be verified by looking at the html source of the appropriate "frame" of the browser window that the local OBi interface uses.

   

           
Logged

"This has not only been fun, it's been a major expense." - Gallagher
MYOBi
Jr. Member
**
Posts: 21


« Reply #10 on: January 23, 2012, 03:20:51 pm »

Thanks for the detailed explanation.
Logged
mrjoe
Sr. Member
****
Posts: 262


« Reply #11 on: February 21, 2012, 01:21:13 am »

How would I use this script on a Mac?
Thanks
Logged
Stewart
Hero Member
*****
Posts: 1125


« Reply #12 on: February 21, 2012, 03:23:21 am »

How would I use this script on a Mac?
The VBS code runs only under Windows.

If you have Windows for your Mac (Parallels, Fusion, etc.), the script should run fine.  See http://www.macwindows.com/emulator.html .

If there is a Windows PC on your LAN, you could run it there, using remote access software.

Or, you could rewrite the script in another language (perl, python, PHP, etc.) that runs on Mac.
Logged
whoit
Newbie
*
Posts: 9


« Reply #13 on: September 14, 2012, 02:02:43 am »

I tried this script with my new Obi202 and it fails, plus it makes the Obi a bit squirrelly and I have to reboot.
I noticed the Web Admin page 'record.au' doesn't exist - I assume that the web page has been re-written for the current Obi202.
It looks like it's all JavaScript based, so no more individual pages.

Does any one else have an automated way to record calls?

Thanks...
Logged
mrjoe
Sr. Member
****
Posts: 262


« Reply #14 on: October 17, 2012, 02:56:07 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
« Last Edit: October 17, 2012, 03:20:26 am by mrjoe » Logged
Bay11
Newbie
*
Posts: 11



« Reply #15 on: November 02, 2012, 07:07:00 pm »

Infin8loop, can you help me please.  I’m having troubles with the call record script and the OBI rebooting.
I tried the “obi-recordcallinator.vbs” script on an OBI-202 with poor results (my OBI reboots upon running the script).

When I run the script I received a “Windows Script Host” error “Status code = 12152 : Unknown”.

I am running this script on an OBI 202 with the following specifications:
HardwareVersion:   1.3
SoftwareVersion:   3.0.0 (Build: 3460)

When I log into the Obi talk administration webpage and check status, I see the following:
I looked for a reboot reason code under; system status, product information, uptime, I do not see a reboot reason code, nor do I see the amount of free memory reported.

I’m using Microsoft Windows Vista, I’ve checked my firewall settings and directories security settings cannot find a reason why this is occurring (so the script and file, save is not being blocked).

I believe status code 12152 may mean, “error_winhttp_invalid_server_response  – the server response cannot be parsed”.

I have attached a copy of OBI 202 callstatus.htm and DOM_Selection_Source.txt of the record button.  
I hope that this helps, I am not sure if this record script has been run on OBI 202 before?

I appreciate the help you all give and with any luck someone can find a solution.  Thank you!

https://www.box.com/s/kzzau8jkwcr8urd4zg0s
« Last Edit: November 02, 2012, 07:10:22 pm by Bay11 » Logged
skipro
Jr. Member
**
Posts: 68


« Reply #16 on: November 05, 2012, 02:38:19 pm »

Obi 202, Win 7
Trying record script I get an error msg: Status code = 401 : Unauthorized
IP address and passworf are correct. Run "as adminstrator" gets same results.
When I open Obi page, I see no "record" option/button.
Does this work with the 202? Can you record with the 202?
Logged
QBZappy
Hero Member & Beta Tester
*****
Posts: 2322



« Reply #17 on: November 05, 2012, 04:56:21 pm »

skipro,

Try looking at the 'Call Status Page' when a call is active. There should be a Record button. It only shows up in the context of an active call.
Logged

Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.
QBZappy
Hero Member & Beta Tester
*****
Posts: 2322



« Reply #18 on: November 06, 2012, 10:31:17 am »

skipro,

I stand corrected. I just had an opportunity to test this on my OBi202 during an active call. It seems the record button has quietly disappeared!!!  Huh
Logged

Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.
skipro
Jr. Member
**
Posts: 68


« Reply #19 on: November 06, 2012, 10:38:14 am »

QBZappy,
 It exists & works on my 202. I tried it from OBitalk, record button shows but does not work. When accessed from IP on computer, it shows and works.
I tried uploading a screenshot but get error, "The upload folder is full. Please try a smaller file or contact administrator."
File is only 45KB
What I do not understand is why the script does not work with my 202. Is this because the 202 has the record button in a different place?
« Last Edit: November 06, 2012, 10:52:00 am by skipro » Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

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