Can you use the command line to dial magic jack

Having issues with your magicJack? Post here, and we'll try to help you out!

Moderators: Bill Smith, Pilot

Post Reply
hawk1
MagicJack Newbie
Posts: 5
Joined: Fri Jan 13, 2012 11:27 am

Can you use the command line to dial magic jack

Post by hawk1 »

I did a search for this but didn't find anything, sorry if this was already answered. I have a home automation program I'm running and would like dial from a command line. Is this possible? Maybe from a batch file or AutoHotKey script? thanks
redpepper
Dan Should Pay Me
Posts: 501
Joined: Tue Oct 13, 2009 9:26 pm

Post by redpepper »

Here are the command line examples for Windows XP:

PLACE A CALL
"C:\Documents and Settings\YOURUSERNAME\Application Data\mjusbsp\magicJack.exe" /callto 8005551212

HANGUP
"C:\Documents and Settings\YOURUSERNAME\Application Data\mjusbsp\magicJack.exe" /d
hawk1
MagicJack Newbie
Posts: 5
Joined: Fri Jan 13, 2012 11:27 am

Post by hawk1 »

thank you very much! I even did a Google search and couldn't find anything about this. your a life saver! :D
mwCT
MagicJack Contributor
Posts: 58
Joined: Tue Dec 20, 2011 9:10 am

Command Line Arguments

Post by mwCT »

Are there other command line arguments? I would be nice if one could restart the application, e.g. schedule "C:\Documents and Settings\YOURUSERNAME\Application Data\mjusbsp\magicJack.exe" /restart
R/mw
redpepper
Dan Should Pay Me
Posts: 501
Joined: Tue Oct 13, 2009 9:26 pm

Post by redpepper »

You can write a batch file (.BAT) that runs automatically at times you set up in the Task Scheduler in Windows. The Windows XP batch file code below works and simply kills the magicJack program that is running and then starts up the magicJack program again.

Windows XP Batch File Code

TASKKILL /F /IM "magicJack.exe"
"C:\Documents and Settings\YOURUSERNAME\Application Data\mjusbsp\magicJack.exe"

Note: Some Windows XP versions use the command TSKILL and a slightly different set of parameters to kill a program instead of the command TASKKILL.
mwCT
MagicJack Contributor
Posts: 58
Joined: Tue Dec 20, 2011 9:10 am

Taskkill

Post by mwCT »

Thank you. Does MJ terminate gracefully? Some processes will not terminate properly and can lead to instabilities.
R/mw
hawk1
MagicJack Newbie
Posts: 5
Joined: Fri Jan 13, 2012 11:27 am

Post by hawk1 »

Is there a command line to answer a call? Maybe a list somewhere of all the command lines available? thanks
mmagic
MagicJack User
Posts: 43
Joined: Tue Aug 26, 2008 2:42 am

Post by mmagic »

The Application Data directory has moved in Windows 7, and may vary if you are connected to a domain (mine is under "Roaming"). The simplest thing is probably to just use the %appdata% environment variable, which should work in XP or 7:

PLACE A CALL
"%appdata%\mjusbsp\magicJack.exe" /callto 8005551212

HANGUP
"%appdata%\mjusbsp\magicJack.exe" /d

The disappointing thing is that on my system, it takes 6-7 seconds to dial or hang up the call after issuing the command. What kind of response are others seeing?

I had forgotten that MJ is a mod of SJPhone. There are some command-line instructions on page 65 of this manual:

http://www.sjphone.org/doc/SJphone_User_Guide.pdf

I tried adding "+type=phone" and it didn't work, so some functions are apparently disabled. The /lf parameter to create a log file does work. This command creates the log in the directory from which you run the command:

CREATE LOG
"%appdata%\mjusbsp\magicJack.exe" /lf MJ.log

Mark
hawk1
MagicJack Newbie
Posts: 5
Joined: Fri Jan 13, 2012 11:27 am

Post by hawk1 »

It does take about 6 to 7 seconds to hang up, like you said. But I can live with that. Thanks for the info! :D
mmagic
MagicJack User
Posts: 43
Joined: Tue Aug 26, 2008 2:42 am

Post by mmagic »

Yeah the hang-up delay isn't so bad, but the dialing seem unnecessarily slow. I can probably cut and paste a number faster than 6-7 seconds!
hawk1
MagicJack Newbie
Posts: 5
Joined: Fri Jan 13, 2012 11:27 am

Post by hawk1 »

Yea me too. But I'm using a home automation program to do the dialing be voice command, so I'm looking for the wow factor. I would like it to dial and hangup faster but it's still cool! 8)
mwCT
MagicJack Contributor
Posts: 58
Joined: Tue Dec 20, 2011 9:10 am

MJ Now Running as a Service

Post by mwCT »

I took the guidance of redpepper, created a batch file called mjRestart and scheduled it daily using schtasks, hoping a periodic restart would would help with what appears to be a memory leak.

Not wanting to wait until 0300 to see if it would run properly I executed:

schtasks /run /tn mjRestart

For what it's worth, it's running fine (with the admin account credentials it was installed under) as a service.

MJ phone functions are working fine under different non-admin accounts and with no one logged in.

At this point I have not idea if it is stable. I guess at 0300 is will restart and hopefully, the phone functions will still work with no one logged on.
R/mw
mwCT
MagicJack Contributor
Posts: 58
Joined: Tue Dec 20, 2011 9:10 am

MJ Now Running as a Service/Scheduled Task

Post by mwCT »

Ran into voice quality problems as time when on.
R/mw
RussMartin
MagicJack Newbie
Posts: 1
Joined: Wed Jan 25, 2012 1:08 pm

command line examples for use in click.to

Post by RussMartin »

redpepper wrote:Here are the command line examples for Windows XP:

PLACE A CALL
"C:\Documents and Settings\YOURUSERNAME\Application Data\mjusbsp\magicJack.exe" /callto 8005551212

HANGUP
"C:\Documents and Settings\YOURUSERNAME\Application Data\mjusbsp\magicJack.exe" /d
Thanks for this info, I got it to work from the command line.
I am now trying to get it to work with click.to (http://www.clicktoapp.com/)

I get magicJack to load but I am having trouble passing "Arguments of the call:"
My best guess for this field of (/callto "[Text]") except for the (), is not working.

Any suggestions?

Note: the copied text for the variable [Text] is a phone number in the format of (###)_###-###
where _ is a space.
Post Reply