Page 3 of 4

Posted: Tue Jun 30, 2009 11:08 pm
by vMAC
teddy_b wrote:
vMAC wrote:Any progress on getting this to run as a service/ addon for OpenWRT?
Well... Did you read the post above yours :)? Just compile it using OpenWRT toolchain, and you're good to go...
Sorry :) I hit reply then forgot about the posting for a couple minutes so it looks like you responded before I did. and I didn't see that.

You may want to setup a donation page for all those thankful for the help you all have provided. ;)

Posted: Tue Jun 30, 2009 11:20 pm
by teddy_b
samdaman wrote:Works perfect calling out but incoming goes straight to vm :?
Don't know why - here incoming works perfect, as well as outgoing, with Asterisk and this command to run the proxy:
mjproxy 0.0.0.0 5070 proxy01.my_favorite_proxy.talk4free.com 5070 XXXXXXXXXXXXXXXXXXXX

Posted: Tue Jun 30, 2009 11:28 pm
by samdaman
teddy_b wrote:
samdaman wrote:Works perfect calling out but incoming goes straight to vm :?
Don't know why - here incoming works perfect, as well as outgoing, with Asterisk and this command to run the proxy:
mjproxy 0.0.0.0 5070 proxy01.my_favorite_proxy.talk4free.com 5070 XXXXXXXXXXXXXXXXXXXX
I used the following command

Code: Select all

mjproxy 0.0.0.0 6987 proxy01.my_favorite_proxy.talk4free.com 5070 XXXXXXXXXXXXXXXXXXXX
Ill change the listen port to 5070 and report back brb

POST EDIT: YES! it now works and very clear audio both ways :wink:

My answere to your question is "Yes, I am a newbie for putting 6987 for my listening port as you can see hahaha

Posted: Tue Jun 30, 2009 11:49 pm
by teddy_b
Well, the outgoing should work with any listen port...
However, the responses to incoming INVITEs are sent to the port specified by the server, so if it's different from the listen port they will bypass the proxy.

I should've mentioned it when posting the source, sorry...

PS

Posted: Wed Jul 01, 2009 4:05 am
by netdata
teddy looks like that mediafire link is dead, can you be a champ and reup somewhere?

Thanks - great job buddy

Posted: Wed Jul 01, 2009 4:35 am
by az1324
link is working.

Posted: Wed Jul 01, 2009 10:07 am
by pagemen
thanks for the c code, compiled nicely and works great on my WRT54G w/Kamikaze 8.09.

for anyone with a similar setup, here is the binary(for brcm-2.4, ymmv on other platforms), directly from teddy_b's code without modification

http://www.mediafire.com/download.php?m3tymmejhwu

download, unzip and install with opkg

and to make it run on startup, create /etc/init.d/mjproxy

Code: Select all


#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org

START=70
STOP=70

start() {
        mjproxy 0.0.0.0 5070 proxy01.your_city.talk4free.com 5070 your_password
        }

stop() {
        pkill -9 mjproxy
        }
then run

Code: Select all

chmod a+x /etc/init.d/mjproxy
/etc/init.d/mjproxy enable

Posted: Wed Jul 01, 2009 10:50 am
by RonV
teddy_b wrote:Ok, here's the plain C version of the simple MJ proxy:
http://www.mediafire.com/file/yzwmjzotm ... y.c.tar.gz.
It works exactly the same as the az1324's app - the only difference is that it doesn't need mono to run on Linux - can be compiled for [almost] any linux distribution, including embedded systems like OpenWRT.
Thanks for the C version. I compiled it with no problem and was up and running in about 5 minutes after I repointed my MJ Trunk on my PBX to 127.0.0.1.

Since I don't take inbound calls on the MJ trunk I have upped the proxy port number not to conflict with my PBX's inound ports.

Posted: Wed Jul 01, 2009 12:08 pm
by jaybob413
pagemen, thanks for the upload. This works brilliantly on my OpenWRT router. Great stuff.

Posted: Wed Jul 01, 2009 2:18 pm
by synchron
Many, many thanks to dtm, az1324, teddy_b, Stewart and to all those who contributed to this thread! Great job and good stuff here! This is definitely a start and it will be interesting how long it will last! A true, genuine Tip/Trick/Hack!

I'm curious - if it weren't for algorithm:MD5 in the initial wireshark captures could this have even been accomplished? Could this be done on their end where they don't expose the encryption algorithm or can all things eventually be decrypted, even if the info isn't given?

Synchron 8)

Posted: Wed Jul 01, 2009 2:39 pm
by x0r0
is there a way to make a version for the iphone like a plug in to work with fring?

Posted: Wed Jul 01, 2009 4:17 pm
by grillovillegas
Is there a way to install it on a DDWRT ????

Not working

Posted: Wed Jul 01, 2009 4:45 pm
by grillovillegas
Its not working

Is there anything else that we have to include in the ata setup

Just the proxy ????? what i mean the computerip:5070

Thats all ???

Thanks

Posted: Wed Jul 01, 2009 4:59 pm
by Taken83oveR
pagemen wrote:thanks for the c code, compiled nicely and works great on my WRT54G w/Kamikaze 8.09.

for anyone with a similar setup, here is the binary(for Broadcom 2.4, but should work for other mips router? please report), directly from teddy_b's code without modification

http://www.mediafire.com/download.php?m3tymmejhwu

download, unzip and install with opkg

and to make it run on startup, create /etc/init.d/mjproxy

Code: Select all


#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org

START=70
STOP=70

start() {
        mjproxy 0.0.0.0 5070 proxy01.your_city.talk4free.com 5070 your_password
        }

stop() {
        pkill -9 mjproxy
        }
then run

Code: Select all

chmod a+x /etc/init.d/mjproxy
/etc/init.d/mjproxy enable
I will have to give this a try in a bit. If anyone has done this with a DD-WRT based router, can you give us a step by step, so there is no confusion? Much appreciated.

Posted: Wed Jul 01, 2009 5:52 pm
by vicos
Oh men, I love you guys finally a voice of hope, I had rush to death and could not solve this problem, do you guys have any explanations of why I currently have a working MJ on an ATA?(it never went down and still working) or why does the ATA works after I one change the number on a MJ(even though it does not last long) , weird stuff...

Best Regards

Posted: Wed Jul 01, 2009 6:46 pm
by pagemen
Don't have a DD-WRT router around so I tested the OpenWRT binary on Tomato -- and it doesn't work. Complaining missing "libgcc_s.so.1" at first so I linked it from /lib/libc.so.0 and then it just seg. faulted. If I copied the libgcc_s.so.1 from OpenWRT, it aborded with "User defined signal 1". So I assume the OpenWRT binary wouldn't work on Tomato out of box, have to build another one using Tomato's toolchain.

Posted: Wed Jul 01, 2009 6:56 pm
by desidude2000
i was able to compile the linux command linux mjproxy for arm9 platform (linkstation) just fine. question is: for the credentials, are the old credentials still valid as far as username and password?

Posted: Wed Jul 01, 2009 7:30 pm
by meh123
grillovillegas wrote:Is there a way to install it on a DDWRT ????
I second this! I'd love to see a compatible .ipk for DD-WRT.

Posted: Wed Jul 01, 2009 8:44 pm
by teddy_b
I don't have a DD-WRT router either, but here are a couple binaries compiled using Tomato toolchain.
1. The first one is what I'm running on my Tomato router:
http://www.mediafire.com/file/twkmijnm3 ... ato.tar.gz
It might work on DD-WRT - I have no way to check myself.
2. If the 1st one doesn't work, try the other one:
http://www.mediafire.com/file/n2zzlmkiy ... tic.tar.gz
This one is statically linked with uclibc - the executable is larger but doesn't depend on the libc version - has better chances to run on dd-wrt (only on mipsel routers of course).

Posted: Wed Jul 01, 2009 9:01 pm
by desidude2000
desidude2000 wrote:i was able to compile the linux command linux mjproxy for arm9 platform (linkstation) just fine. question is: for the credentials, are the old credentials still valid as far as username and password?

Code: Select all

linky:~# ps -ef | grep mjproxy
root     13953     1  0 17:42 ?        00:00:00 mjproxy 0.0.0.0 5070 proxy1.losangeles.talk4free.com 5070 XXXXXXXXXXXXXXXXXX
i started the proxy process, but i still can't login using my PAP2. i'm pointing the PAP2 to linkstation's IP address:5070. what gives?

Posted: Wed Jul 01, 2009 9:04 pm
by az1324
Password did change with the upgrade, so you might want to start there.

Posted: Wed Jul 01, 2009 10:05 pm
by onlinepcfun
Thanks pagemen and all others who contributed to make this possible....
Before I put this in start-up script, I ran the proxy manually on my openwrt and MJ registered without any issues...

Now, I have a question on this startup script... do I have to specify & at the end of mjproxy start command? like...

start() {
mjproxy 0.0.0.0 5070 proxy01.your_city.talk4free.com 5070 your_password &
}

as I am not sure and didn't want my box to get hosed...appreciate your help on this.
pagemen wrote:thanks for the c code, compiled nicely and works great on my WRT54G w/Kamikaze 8.09..........
........
chmod a+x /etc/init.d/mjproxy
/etc/init.d/mjproxy enable

Posted: Wed Jul 01, 2009 10:32 pm
by desidude2000
az1324 wrote:Password did change with the upgrade, so you might want to start there.
thanks, obtained the new credentials, and now i'm back in business. pap2 logged on, now need to test with a real phone when i get home. :-)

Incoming call issue?

Posted: Thu Jul 02, 2009 4:43 am
by pagemen
Outgoing works while incoming always fails. My setup is: PAP2-->OpenWRT w/mjproxy, and both behind a Tomato router. The registry expires value on PAP2 is 1800 to make MJ server happy. Before the update, the ATA talked to MJ server directly, inbound worked once I enable NAT Mapping and NAT Keep Alive, however, it stops working now -- have tried enable NAT keep alive and set dest. to my local OpenWRT or remote MJ server, no luck on both.

So any suggestions? I know it can be fixed by a lower register expires value but its not a preferred solution here.

No incoming ring

Posted: Thu Jul 02, 2009 8:04 am
by Anon
Hi all,

Using the MJmd5 method I got my RTP300 running again! Yay! :-)

But, I don't get an incoming ring. Did anyone figure what to do?

TIA!

Posted: Thu Jul 02, 2009 9:36 am
by kp
using mjproxy i am able to register but not place or receive calls.
i am using the following syntax:
mjproxy 0.0.0.0 5070 proxy01.boston.talk4free.com 5070 password
Both twinkle and my SPA are able able to register but no luck actual calls.

Posted: Thu Jul 02, 2009 1:30 pm
by jamoke
AZ1324 - thank you for putting the CLI MD5 program together.
rusabus - thank you for sharing the example on you run the proxy and relative configurations.

I now have mine up and running on my Asterisk box, acting as my proxy.

Big round of cheers to you and everyone else who contributed. :P

Posted: Thu Jul 02, 2009 3:44 pm
by Taken83oveR
Ok, trying to get running with my DD-WRT router and a PAP2. I got it setup, telneted into my router, and ran "top" to see if it was running. It looks like it is to me. Does this look correct? Ofcourse my actual password is not a bunch of zero's.

Code: Select all

mjproxy 0.0.0.0 5070 proxy01.columbus.talk4free.com 5070 00000000000000000000
In my PAP2, under proxy I have

Code: Select all

192.168.1.1:5070
But I keep getting "Can't connect to login server". I just renewed my subscription to try this out, so hopefully I can get it running. Any thing I might be doing wrong?

Edit: I got it registered. For some reason my password changed again. (most likely dew to me renewing my subscription)

Posted: Thu Jul 02, 2009 4:28 pm
by dtm
Is the address of your router 0.0.0.0?

Posted: Thu Jul 02, 2009 4:44 pm
by Taken83oveR
I think 0.0.0.0 is just a way of listening for any local ip. Works fine for me.

asterisk server on Linksys NSLU2

Posted: Thu Jul 02, 2009 5:06 pm
by shurik05
I have the NSLU2 setup at home with asterisk on it and it works perfectly with joiphone. I had magicjack working on it before the update. Now I compiled the mjproxy and got it working on my NSLU2 and I can connect with my PAP2 to it and it works. But I can't get asterisk to connect to the proxy. I tried installing the proxy on other computers with winxp and the same thing. It will not connect.

I am using this string to register
register => E253xxxxxxx01:[email protected]:5070

Any one get asterisk working. I am using Asterisk ver. 1.2.24

thanks

Posted: Thu Jul 02, 2009 5:30 pm
by UncleRunkle
Taken83oveR wrote:
pagemen wrote:thanks for the c code, compiled nicely and works great on my WRT54G w/Kamikaze 8.09.

for anyone with a similar setup, here is the binary(for Broadcom 2.4, but should work for other mips router? please report), directly from teddy_b's code without modification

http://www.mediafire.com/download.php?m3tymmejhwu

download, unzip and install with opkg

and to make it run on startup, create /etc/init.d/mjproxy

Code: Select all


#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org

START=70
STOP=70

start() {
        mjproxy 0.0.0.0 5070 proxy01.your_city.talk4free.com 5070 your_password
        }

stop() {
        pkill -9 mjproxy
        }
then run

Code: Select all

chmod a+x /etc/init.d/mjproxy
/etc/init.d/mjproxy enable
I will have to give this a try in a bit. If anyone has done this with a DD-WRT based router, can you give us a step by step, so there is no confusion? Much appreciated.
If anyone could help with this, I would appreciate a nice walkthrough as well. Seems like it shouldn't be too hard for someone who knows what they are doing...

Posted: Thu Jul 02, 2009 5:40 pm
by jamoke
To the Asterisk Proxy users out there:

I've implemented the MJMD5CLI proxy. It works fine for a few minutes then stops working. What I've found is that when I reload sip, a sip show peers indicates a status of roughly 70 ms. So far so good. A few minutes later, a sip show peers indicates a status of LAGGED (2024 ms) and the call fails. Channel comes back as CHANUNAVAIL.

I've tried changing the qualify statement to qualify=yes and qualify=2000 with no changes.

Does anyone have other suggestions?

Thanks

Posted: Thu Jul 02, 2009 5:44 pm
by dan
yea PAP works great..

Asterisk/Trixbox trunk will not register when using the proxy on my windows PC. For those who have this working could you post your trunk configs and register string please

Thanks

Posted: Thu Jul 02, 2009 5:52 pm
by pagemen
My Asterisk/mjproxy on Openwrt works, the mjproxy must run with 0.0.0.0(I do prefer 127.0.0.1 or 192.168.x.x for security reasons, but both will fail), after that, Asterisk can register with

register => E555123456701:[email protected]:5070/5551234567

Posted: Thu Jul 02, 2009 5:53 pm
by vMAC
Taken83oveR wrote:Ok, trying to get running with my DD-WRT router and a PAP2. I got it setup, telneted into my router, and ran "top" to see if it was running. It looks like it is to me. Does this look correct? Ofcourse my actual password is not a bunch of zero's.

Code: Select all

mjproxy 0.0.0.0 5070 proxy01.columbus.talk4free.com 5070 00000000000000000000
In my PAP2, under proxy I have

Code: Select all

192.168.1.1:5070
But I keep getting "Can't connect to login server". I just renewed my subscription to try this out, so hopefully I can get it running. Any thing I might be doing wrong?

Edit: I got it registered. For some reason my password changed again. (most likely dew to me renewing my subscription)
which version of the program did you run? Can you point to it please because I want to get it running on my DD-WRT router. Thanks.

Posted: Thu Jul 02, 2009 5:57 pm
by Taken83oveR
vMAC wrote:
Taken83oveR wrote:Ok, trying to get running with my DD-WRT router and a PAP2. I got it setup, telneted into my router, and ran "top" to see if it was running. It looks like it is to me. Does this look correct? Ofcourse my actual password is not a bunch of zero's.

Code: Select all

mjproxy 0.0.0.0 5070 proxy01.columbus.talk4free.com 5070 00000000000000000000
In my PAP2, under proxy I have

Code: Select all

192.168.1.1:5070
But I keep getting "Can't connect to login server". I just renewed my subscription to try this out, so hopefully I can get it running. Any thing I might be doing wrong?

Edit: I got it registered. For some reason my password changed again. (most likely dew to me renewing my subscription)
which version of the program did you run? Can you point to it please because I want to get it running on my DD-WRT router. Thanks.
Please see this thread for more info.
http://www.phoneservicesupport.com/ddwr ... t6913.html

Posted: Thu Jul 02, 2009 6:02 pm
by jamoke
My Sip peer looks like this:

[magicjack] ;with proxy
context=from-magicjack ;
username=E**********01
type=peer
secret=***********************
port=5070
nat=yes
insecure=very
host=THE IP ADDRESS OF MY * BOX (not 0.0.0.0)
fromuser=E**********01
dtmfmode=inband
qualify=500

Register Statement:

register => E**********:***************@IP ADDRESS OF BOX:5070

Changing my type=friend seems to have helped, which is how I normally have it set on a SIP trunk. Also tweaked my qualify statement to 500.

Posted: Thu Jul 02, 2009 8:42 pm
by Praetorian
If I missed this Im sorry,but is there a way to run this md5 app twice for 2 separate MJ numbers. Now I have the app of 2 different pc's?

Do you see this running ATA standalone without the app at some point?

Praetorian :D

Posted: Thu Jul 02, 2009 9:38 pm
by az1324
You will have to implement some more complex routing or packet rewriting before you can run multiple clients. The port 5070 conflict will need to be resolved.

Posted: Thu Jul 02, 2009 9:41 pm
by Praetorian
thats what I thought,now to see if I can figure that out, tnx for the reply

Posted: Thu Jul 02, 2009 9:57 pm
by az1324
Not sure if it would resolve all the conflicts but I would probably start by making a client routing table based on callid and sort out the packets that way. Then you could receive multiple clients on port 5070.

Posted: Thu Jul 02, 2009 10:29 pm
by Praetorian
does the callid stay the same or does it change? I sniffed it and and I see it but didnt know if its random.

Posted: Thu Jul 02, 2009 10:57 pm
by az1324
I'm not sure if it's permanently fixed but each client is only going to be using one callid at a time so it should ensure unique routing.

Posted: Thu Jul 02, 2009 11:17 pm
by Praetorian
thank you, Ill play around a bit with it.

Posted: Fri Jul 03, 2009 12:05 am
by UncleRunkle
Praetorian wrote:If I missed this Im sorry,but is there a way to run this md5 app twice for 2 separate MJ numbers. Now I have the app of 2 different pc's?

Do you see this running ATA standalone without the app at some point?

Praetorian :D
I have a good idea for users such as you with multiple magicjacks...

Use some nice VM software such as VMWare Server or a couple of the alternatives to create multiple vm's each with its own IP address using bridged networking. You could then set up your multiple ATAs to point to each of the VMs that you create. For the VMs, I would use a light version of XP, XPe, or a flavor of linux.

proxy doesn't work for me.

Posted: Fri Jul 03, 2009 2:26 am
by RjG
I added the proxy to DD-WRT, and it runs fine. (thank you for that!)
Using the password which was changed a couple weeks ago, (and double checked tonight) I pointed the PAP2 to the new router proxy, and
now PAP2 syslog debug says "SIP/2.0 401 Unauthorized<013><010>Via: SIP/2.0/UDP ". It doesn't work for me.

BUT, the PAP2 worked before... so I shut the new proxy down, changed the PAP2 back the way it was (made sure the password was the same as I used in the proxy), and I can make calls again no problem.

I tried it a few times, same thing. So my account is still definitely on the "old" system, and will not authorize at all with the new one.

( it's a V3 magicjack purchased in Sept. if anyone wants to know)

I'm sure it will come in handy having it all set up when it does change over, but I thought it would be of some value for others to know they may not be on the new system yet.

weeeeeeeee

Posted: Fri Jul 03, 2009 4:30 am
by Guide_timothy
I love this sooo much i dont wanna run my computer 24/7 so what i did was I slapped the MJDM5 or what ever that lil program is and i put it on my friends computer i just opened up his router port 5070 and made that program run auto on start up on his computer and then I just put his IP address into my ATA and BAMN it works great :P :P looks like im saving money on my electric bill weeeeeeee :wink:
OH yes 1 more thing hes like 900 miles away loool works awsome :P

Re: weeeeeeeee

Posted: Fri Jul 03, 2009 4:38 am
by Taken83oveR
Guide_timothy wrote:I love this sooo much i dont wanna run my computer 24/7 so what i did was I slapped the MJDM5 or what ever that lil program is and i put it on my friends computer i just opened up his router port 5070 and made that program run auto on start up on his computer and then I just put his IP address into my ATA and BAMN it works great :P :P looks like im saving money on my electric bill weeeeeeee :wink:
OH yes 1 more thing hes like 900 miles away loool works awsome :P
Until his Pc turns off, or his internet goes down, or he closes the program ;)
Then your SOL. Better bet is to run locally. Lot easier to troubleshoot.

Posted: Sat Jul 04, 2009 10:30 pm
by emoci
teddy_b wrote:I don't have a DD-WRT router either, but here are a couple binaries compiled using Tomato toolchain.
1. The first one is what I'm running on my Tomato router:
http://www.mediafire.com/file/twkmijnm3 ... ato.tar.gz
It might work on DD-WRT - I have no way to check myself.
2. If the 1st one doesn't work, try the other one:
http://www.mediafire.com/file/n2zzlmkiy ... tic.tar.gz
This one is statically linked with uclibc - the executable is larger but doesn't depend on the libc version - has better chances to run on dd-wrt (only on mipsel routers of course).
Any chance you could write some basic steps about how you got it to run on Tomato...?