OBiTALK Community

General Support => Day-to-Day Use => Topic started by: MYOBi on January 21, 2012, 12:26:33 pm



Title: Script to record call in progress
Post by: MYOBi 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,



Title: Re: Script to record call in progress
Post by: infin8loop 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.

  


Title: Re: Script to record call in progress
Post by: MYOBi 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...


Title: Re: Script to record call in progress
Post by: mrnaughty on January 22, 2012, 01:14:18 pm
Works good when call in progress.!
Thank you!


Title: Re: Script to record call in progress
Post by: infin8loop 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.


Title: Re: Script to record call in progress
Post by: Judgeless on January 22, 2012, 02:55:18 pm
Works perfect.  Thanks


Title: Re: Script to record call in progress
Post by: MYOBi 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!!"


Title: Re: Script to record call in progress
Post by: RonR on January 22, 2012, 05:39:25 pm
Reboot Reason Codes:

6: New Profile Invoked AND Profile URL Changed


Title: Re: Script to record call in progress
Post by: MYOBi 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 (https://groups.google.com/a/googleproductforums.com/forum/#!category-topic/voice/making-and-receiving-calls/Ct6NL05OgcA)


Thanks,


Title: Re: Script to record call in progress
Post by: infin8loop 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.

   

           


Title: Re: Script to record call in progress
Post by: MYOBi on January 23, 2012, 03:20:51 pm
Thanks for the detailed explanation.


Title: Re: Script to record call in progress
Post by: mrjoe on February 21, 2012, 01:21:13 am
How would I use this script on a Mac?
Thanks


Title: Re: Script to record call in progress
Post by: Stewart 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.


Title: Re: Script to record call in progress
Post by: whoit 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...


Title: Re: Script to record call in progress
Post by: mrjoe 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 (http://www.sustworks.com/sb_site/index.html)
(an Amazing Application)

See the this (https://dl.dropbox.com/u/54704536/Phone%20Amego.png) for how I set it up.

very simple


Title: Re: Script to record call in progress
Post by: Bay11 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


Title: Re: Script to record call in progress
Post by: skipro 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?


Title: Re: Script to record call in progress
Post by: QBZappy 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.


Title: Re: Script to record call in progress
Post by: QBZappy 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!!!  ???


Title: Re: Script to record call in progress
Post by: skipro 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?


Title: Re: Script to record call in progress
Post by: mrjoe on November 06, 2012, 10:40:01 am
Please could someone look at the Source Code and find out.
My Obi202 hasn't arrived yet.


Title: Re: Script to record call in progress
Post by: QBZappy on November 06, 2012, 02:20:55 pm
skipro,

I tried calls both directions. Outbound Call using the OBi phone, I do indeed see the record button in the 'Call Status'. However in an Inbound call I don't get the Record button.  ??? Can you try receiving a call and confirm if the 'Record' button shows. TKS.


Title: Re: Script to record call in progress
Post by: QBZappy on November 06, 2012, 02:38:18 pm
skipro,

Related to your problem re the script, it occurred to me that the urls in the OBi202 are different from the OBi100/110. If the previous script references this, you may need to use a tool like 'Firebug' Firefox addon to identify the proper syntax for the OBi202.
https://getfirebug.com/


Title: Re: Script to record call in progress
Post by: skipro on November 07, 2012, 09:44:15 am
QBZappy,
Confirmed. No record button on receiving calls. Any idea why not?

In reference to your suggestion on the script, I do not use Firefox so the add on is not a solution.
Since the record button is not on the front screen but 2 screens down, Main screen >Status > Call status, does the script need to refer to this location [2 screens from front screen] and this is why it does not work?


Title: Re: Script to record call in progress
Post by: QBZappy on November 07, 2012, 10:02:13 am
skipro,

Then the record button is partially broken. I hope the OBi people have noticed this.

Re: script, I don't use it, so I don't really know how it works. Our friend infin8loop may have something to say about this.

If you use a Mac I believe that there is a very useful product that would serve your needs (not-free).
Phone Amego
http://www.sustworks.com/pa_guide/index.html#.UJqgMGcpYjk.

If you wanted to record your calls it may be simpler to use a hardware approach using a cheap $3 adapter.
RJ11 Telephone Line Pass-Thru to 3.5mm Mini-Jack Conversation Recording/Line-out Adapter
http://dx.com/p/rj11-telephone-line-pass-thru-to-3-5mm-mini-jack-conversation-recording-line-out-adapter-18869


Title: Re: Script to record call in progress
Post by: MikeHObi on November 07, 2012, 06:14:07 pm
I have the Obi202
HardwareVersion   1.3   
SoftwareVersion   3.0.0 (Build: 3460)

Calling into the obi, on the local admin webpage I get record call as an option on the call status page using Chrome web browser.  Clicking it during the call starts a download of a file called record.au which continues to download until the call ends.  Inside this .au file is the audio of the call.

Calling from the obi, on the local admin webpage I get record call as an option on the call status page using the Chrome web browser.  Clicking it during the call starts a download of a file now called record(1).au which continues to download until the call ends.  Inside this .au file is the audio of the call.

Of course if I have an incoming call on my google voice line I can press 4 and it will record the call and store it in google voice.

I didn't try the script.


Title: Re: Script to record call in progress
Post by: QBZappy on November 07, 2012, 06:58:33 pm
The Record button not showing up in my Firefox v16.0.2 could very well be a browser compatibility issue.


Title: Re: Script to record call in progress
Post by: skipro on November 08, 2012, 03:03:56 pm
If I call into the Obi through and phone associated with Obi, a record button will show. If I call into Obi from a phone not associated with Obi I get no record button. Mike, did you call into Obi from a phone /line not associated with Obi?


Title: Re: Script to record call in progress
Post by: MikeHObi on November 08, 2012, 06:02:16 pm
did another test.  Firefox 16.0.2 button allowed recording... asked me to verify the save, but worked, both with me calling via my cell, or calling my cell via the obi.

IE 9 button allowed recording, asking me to save etc same thing, calling my cell or my cell calling in.

So all my browsers work. 

As far as how it's done.  Home phone is on phone port 1 of the obi and it is set to call out using Google Voice.  I have it call my personal google voice number that rings my cell (not my cell's direct number). 
When I call my home on my cell, I have it call using google voice, to the google voice number for my home.  That routes it to an anveo DID with fee incoming calling.

I don't know what associated with the obi means.  the anveo line is setup as sp3, callcentric is still setup as sp2, and google voice is sp1.


Title: Re: Script to record call in progress
Post by: infin8loop on November 09, 2012, 12:26:40 pm
Infin8loop, can you help me please.
...
https://www.box.com/s/kzzau8jkwcr8urd4zg0s

I don't have an OBi202, so I cannot test. 

Looking at the source for callstatus.htm (from an Obi202) in the above "box" file (posted by bay11) I see:

function click_record(p){
var a;
a="record.au?port="+p;
document.forms[0].action=a;
document.forms[0].submit();
}

The above function click_record(p) appears to invoke url
"http://your-obi-ip-address/record.au?port=0"

The port is zero because in the code I'm looking at the function click_record is invoked when clicking
the "record" button by code:

<input class=buttoninput type=button value='Record' onClick="click_record(0)">.

Notice the zero being passed as a parameter to the function.
I don't know if the parameter will always be zero or will vary depending on what call(s) are in progress. 

I suggest someone with both my original script and an Obi202 do the following:

Make sure you modify the following 3 lines in the script as shown:

strURL = "http://192.168.0.40/record.au?port=0"
''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.

Notice the addition of "?port=0" to the strURL string which is not in the original script because the OBi110 doesn't (or didn't) need it. The poster of the htm file (bay11) appears to have had only 1 call in progress at the time of the callstatus.htm source capture.  If memory serves me correctly, an OBi110 only has one "record" button even if more than one call is in progress.  Pressing "record" will record whatever call in on the phone as you "flash" dial between the calls (if that makes sense). I don't know what the OBi202 shows. Does an OBi202 show more than one record button for multiple calls necessitating the port number?   


Title: Re: Script to record call in progress
Post by: mrjoe on November 10, 2012, 09:04:49 am
Infin8loop, thanks so much for your help.

I can confirm the following:
The following URL will record calls only on Phone port 1
"http://your-obi-ip-address/record.au?port=0”

Putting a 1 in place of the 0 will record calls only on Phone port 2
"http://your-obi-ip-address/record.au?port=1”


Title: Re: Script to record call in progress
Post by: MikeHObi on November 10, 2012, 01:04:21 pm
Obi puts up two grids with a record button on the header of each for multiple call presentations on the obi202.
See below.
(https://lh4.googleusercontent.com/-KYlQOv4jEkk/UJ6_JOOtOtI/AAAAAAAADa4/qY2NO15qp1E/s800/TwoCallsOnObi202.jpg)

Now I did test this and and flashing between the callers was wonkey.i.e. the first caller could be flashed to hold, but when I went back they couldn't hear me, but I could hear them.  Recording caught both sides though.  Pressing the second button after pressing the 1st didn't really do anything.  It appears that what it is recording is what is sent or received from the handset, and not the individual sp ports.

Thus if I press record call on the top call, it switched to showing stop recording for both.


Title: Re: Script to record call in progress
Post by: infin8loop on November 10, 2012, 01:23:19 pm
Infin8loop, thanks so much for your help.

I can confirm the following:
The following URL will record calls only on Phone port 1
"http://your-obi-ip-address/record.au?port=0”

Putting a 1 in place of the 0 will record calls only on Phone port 2
"http://your-obi-ip-address/record.au?port=1”

Thanks for the heads-up. I forgot the OBi202 has two phone ports. Makes sense why the port parameter is needed.

Below link points to an updated version of the original script. The phone port (0 or 1) may be passed to the script via the command line. This can be done by creating a shortcut for the script and then editing the properties of the shortcut. Add a 0 or 1 to the end of the shortcut "Target" after the last double quote if there are double quotes surrounding the value. There should be a space between the last double quote and the 0 or 1. Create two different shortcuts, one with a 0 for phone port 1 and another shortcut with a 1 for phone port two. No port needs to be passed for the OBi 100/110.  

Three lines in the script still need to be modified to your own values.
  
script: https://www.box.com/s/hthaoxvqbuidwd6uogqp


Again, I don't have an OBi202, so I cannot test the nuances of script execution.

The upload directory here on the forum shows to be full.

Update: If you have an OBi202 and can't remember to pass the 0 or 1 in the command line then you can add the three lines shown in red below:

if WScript.Arguments.Count = 1 then
    strPort = WScript.Arguments(0)
    if strPort = "0" or strPort = "1" then
        strURL = strURL & "?port=" & strPort   
    else
        wscript.echo "If a port number is passed, it must be 0 or 1"
        wscript.quit(2)
    end if
else
    wscript.echo "You must include the phone port number in the shortcut for an OBi202"
    wscript.quit(2)
end if

I was attempting to make the script generic enough to handle both an OBi100/110 or OBi202. The port is not need for an OBi100/110.


Title: Re: Script to record call in progress
Post by: skipro on November 10, 2012, 04:13:12 pm
Infi8loop,
 Thanks for the scripts.
What script line would send a error msg if no port # was included. You have one if it is not "0" or "1", but what if there is no port # added or included.
Msg Ex:  "You must include the phone port number in the shortcut"

Now all you get is a Windows Script Host error: "Status code = 12152 : unknown"


Title: Re: Script to record call in progress
Post by: infin8loop on November 10, 2012, 05:20:32 pm
Infi8loop,
 Thanks for the scripts.
What script line would send a error msg if no port # was included. You have one if it is not "0" or "1", but what if there is no port # added or included.
Msg Ex:  "You must include the phone port number in the shortcut"

Now all you get is a Windows Script Host error: "Status code = 12152 : unknown"

Please see the update in my earlier post. 

Does the updated script work on an OBi202 if the phone port is passed in the command line? 


Title: Re: Script to record call in progress
Post by: skipro on November 11, 2012, 04:06:54 am
Infi8loop,
 Again, thanks. Works fine.
Another option I used before you updated your script to include the port was to add the port info to your original script, then have 1 script one for port1 and another for port2.  Obviously your updated script is more elegant.

Another idea, have the script request the port number in an input box, then after user input, proceed. How would this be done?


Title: Re: Script to record call in progress
Post by: cyberic68 on February 05, 2013, 08:26:06 pm
Hi infini8loop,

I have an Obi110, I have run your script without a real success

I did update your script with the following

strURL = "http://192.168.11.27/record.au"
strPassword = "xxxxx"
strDirectoryPath = "C:\Users\Eric\Call_Recordings"

I run the script with "Microsoft Windows Based Script Host" under Windows 8 Pro.

Automatically it has created a file under C:\Users\Eric\Call_Recordings

obi_recording_20130205_230448.au with 0kb size

Then I have made a phone call, but nothing has been recorded, the file size was still 0 kb after I hang up.

Would you have an idea ?

thanks

Eric


Title: Re: Script to record call in progress
Post by: infin8loop on February 06, 2013, 02:36:00 pm
cyberic68,

Upon trying to run my OBi related scripts I've discovered they all fail now. I use Windows XP (a work requirement). I don't routinely use the scripts that I have posted. I developed them as a hobbyist and they worked (for me) when posted. I'm not sure exactly what has changed to render the scripts inoperable.
The script to record calls was designed to be launched while a call is in progress on the OBi.  It emulates pressing the "Record" button while on the OBi Call Status page. Or navigating directly to http://your_obi_ip_address/record.au (the same URL the "Record" button on an OBi100/110 Call Status page envokes) in a browser window while a call is in progress used to work. Now that fails for me as well. If I figure it out, I'll post back.
    


Title: Re: Script to record call in progress
Post by: cyberic68 on March 19, 2013, 08:29:49 pm
Hi infin8loop

I really hope that you will find a work around

Thanks

Cyberic68


Title: Re: Script to record call in progress
Post by: opuletn on November 21, 2013, 07:34:06 am
I switched from a Obi110 to a Obi200 and the original script that used to work for the Obi110 stoped working.
Adding the ?port=0 to the strURL as infini8loop suggested fixed it. Even though the Obi200 only has 1 physical phone port.


Title: Script to stop call in progress
Post by: infin8loop 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.


Title: Re: Script to record call in progress
Post by: kommon 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?


Title: Re: Script to record call in progress
Post by: curt00 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 (http://www.sustworks.com/sb_site/index.html)
(an Amazing Application)

See the this (https://dl.dropbox.com/u/54704536/Phone%20Amego.png) 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?



Title: Re: Script to record call in progress
Post by: curt00 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.


Title: Re: Script to record call in progress
Post by: drgeoff 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.


Title: Re: Script to record call in progress
Post by: b3ll 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!!!


Title: Re: Script to record call in progress
Post by: siafu2000 on March 27, 2016, 01:42:05 pm
Is there a script or instructions on how to record all calls automatically in windows?


Title: Re: Script to record call in progress
Post by: restamp 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!


Title: Re: Script to record call in progress
Post by: Ruslan 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.


Title: Re: Script to record call in progress
Post by: ubergoober 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.


Title: Re: Script to record call in progress
Post by: ubergoober 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


Title: Re: Script to record call in progress
Post by: Noodles 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



Title: Re: Script to record call in progress
Post by: vondes on April 11, 2017, 02:07:49 am
I know exactly what an application (http://mobilerecorder24.com) can use to record calls and data, many use spyware of this type.


Title: Re: Script to record call in progress
Post by: ubergoober 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.


Title: Automated Call Recorder, with Filter
Post by: AutoCallRecorder 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!


Title: Re: Script to record call in progress
Post by: GoogleFan 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