Magicjack Patch for Asterisk(updated)

magicJack Tips and Tricks

Moderators: Bill Smith, Pilot

crackerjack
Dan Should Pay Me
Posts: 784
Joined: Fri Nov 16, 2007 9:32 pm

Re: DTMF Not working!

Post by crackerjack »

jaminmc wrote:Magicjack works great for calls! But, try to call anyone that you have to push numbers for, and it doesn't work :(.. I tried it with dtmfmode=inbound, auto, info, and rfc2833. No matter what the setting, I don't get any tones from my magicjack trunk. Now, when I use my callwithus trunk, that has rfc2833 set on it, and call my office phone, it works great. It even works with my ipkal incoming number (Going through google voice too)

So I guess Magicjack doesn't support DTMF?

I haven't tried it on the magicjack itself. I actually haven't plugged it into my computer since I pulled my credentials off of it.
What codec r u using?
s/b g711 ideally
Good Luck

CrackerJack

MagicJack Customer #73
MagicJack user since May 2007
MagicJack abuser since June 2007
"I gots mo' numbers than a Lotto machine!!!"
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Post by norml jack »

Back in my college days I learned to mimic dtmf codes using my voice, thus allowing free calling from payphones. From time to time I have the same problem with MJ not producing dtmf after a call is connected, so I just resort to the ol' golden pipes. Works perfectly every time!
WIN_55,212-2 My new best friend on the recreational playground. It's a gas!
Buttafuoco
magicJack Apprentice
Posts: 24
Joined: Tue Sep 09, 2008 10:39 pm
Contact:

Post by Buttafuoco »

norml jack wrote:Back in my college days I learned to mimic dtmf codes using my voice, thus allowing free calling from payphones. From time to time I have the same problem with MJ not producing dtmf after a call is connected, so I just resort to the ol' golden pipes. Works perfectly every time!
I once came across a guy that could do that, it was very weird to hear those tones come out a human mouth. Can you really do that Norm?
"I have already been judged, and I paid my debt. Please cut me a little slack and perhaps give me the benefit of the doubt. Thank You!"
norml jack
Dan isn't smart enough to hire me
Posts: 115
Joined: Mon Jan 07, 2008 7:08 pm
Location: Humboldt County, Ca.
Contact:

Post by norml jack »

buttafuoco wrote:I once came across a guy that could do that, it was very weird to hear those tones come out a human mouth. Can you really do that Norm?
To be honest with you, yes I can. Many moons ago I demonstrated this alleged talent on-stage at a comedy club amateur night. The end result got me 9 months in LA County jail and just a RCH from a term in Chino State Penitentiary.

Again the answer is yes, but I don't!
WIN_55,212-2 My new best friend on the recreational playground. It's a gas!
kingmony
magicJack Apprentice
Posts: 11
Joined: Sun Feb 01, 2009 12:33 pm

Elastix

Post by kingmony »

can somebody please give step by step instruction on how to do this with elastix. I have download it the souce code for asterisk and don't know what to do.
kingmony
magicJack Apprentice
Posts: 11
Joined: Sun Feb 01, 2009 12:33 pm

Post by kingmony »

now i'm getting this error afterapplying the patch. any help
patch: **** malformed patch at line 4: ast_md5_hash(a2_hash, a2);
JRoque
MagicJack Newbie
Posts: 8
Joined: Wed Jul 29, 2009 1:38 pm

Re: DTMF Not working!

Post by JRoque »

jaminmc wrote:...try to call anyone that you have to push numbers for, and it doesn't work :(.. I tried it with dtmfmode=inbound, auto, info, and rfc2833. So I guess Magicjack doesn't support DTMF?
Hi. It does support DTMF if you enter dtmfmode=inband, not =inbound. In fact, MJ is one of the most reliable DTMF trunk providers I have.

Now, If I can only get that pesky second MJ account to let me make outbound calls (as a trunk) without having to patch chan_sip.so... It had been working fine until a few days ago unpatched. My other MJ account that uses MJM5 proxy still works great.

If only MJ grew up and formally support Asterisk....

JR
kingmony
magicJack Apprentice
Posts: 11
Joined: Sun Feb 01, 2009 12:33 pm

Post by kingmony »

I found out what I did wrong. I used wordpad to make the text file that gave me the error. I fixed that proplem and I was able to patch my 1.4.30 successfully.
I now get an error try to compile it. I use make all 2>&1|tee /tmp/make.all
or just plain make and I get this error....
/bin/sh: build_tools/make_version_h: Permission denied
make: *** [include/asterisk/version.h] Error 126
kingmony
magicJack Apprentice
Posts: 11
Joined: Sun Feb 01, 2009 12:33 pm

Post by kingmony »

i finally got it to work. this was not easy job for someone like me. I do not know any unix. I was using Winscp and it gave me a lot of error.
Thanks for all the helps.
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

ok, i have a brandnew install of trixbix ce and updated. i then downloadee the source for the asterisk version which is 1.6.0.10

i patched the channel/chan_sip.c with code on the first page of this topic.

now what do i do from here? is there a way to compile just that file chan_sip.c and then replace the chan_sip.so in my install?

can this be done and if so, what is the command to compile?

or do i have to re-install asterisk? if this is the way, asterisk was installed from the iso of trixbox, so how do i re-install just asterisk?

please let me know as im confused what to do next.
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

ok, even though not being a Linux Guru and knowing a litle about asterisk, I was able to download the 1.6.0.10 source of asterisk, put it in /usr/src/asterisk-1.6.0.10 and patch the chan_sip.c with the patch on this first topic.

After fidling around a litle, well.... actually after a few hours, i finally got it registering and working for outbound calling.

The problem is inbound. I see the call hitting my trixbox and asterisk plays the number is not in service.

I setup my MJ did as the user context in the trunk settings, and setup the DID with that same number to ring a specific extension... But this does not work.

Here is what the logs show when tail"ing the full log:

Code: Select all

[Apr 11 22:35:26] VERBOSE[3307] logger.c:     -- Executing [s@from-trunk:1] NoOp("SIP/Emymjdidhere01-09988170", "No DID or CID Match") in new stack
[Apr 11 22:35:26] VERBOSE[3307] logger.c:     -- Executing [s@from-trunk:2] Answer("SIP/Emymjdidhere01-09988170", "") in new stack
[Apr 11 22:35:26] VERBOSE[3307] logger.c:     -- Executing [s@from-trunk:3] Wait("SIP/Emymjdidhere01-09988170", "2") in new stack
[Apr 11 22:35:28] VERBOSE[3307] logger.c:     -- Executing [s@from-trunk:4] Playback("SIP/Emymjdidhere01-09988170", "ss-noservice") in new stack
[Apr 11 22:35:28] VERBOSE[3307] logger.c:     -- <SIP/Emymjdidhere01-09988170> Playing 'ss-noservice.gsm' (language 'en')
[Apr 11 22:35:31] VERBOSE[3307] logger.c:   == Spawn extension (from-trunk, s, 4) exited non-zero on 'SIP/Emymjdidhere01-09988170'
[Apr 11 22:35:31] VERBOSE[3307] logger.c:     -- Executing [h@from-trunk:1] Hangup("SIP/Emymjdidhere01-09988170", "") in new stack
[Apr 11 22:35:31] VERBOSE[3307] logger.c:   == Spawn extension (from-trunk, h, 1) exited non-zero on 'SIP/Emymjdidhere01-09988170'

What do I need to do to send all inbound calls from this trunk to a specific extension?
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Post by VaHam »

kitkat0981 wrote:ok, i have a brandnew install of trixbix ce and updated. i then downloadee the source for the asterisk version which is 1.6.0.10

i patched the channel/chan_sip.c with code on the first page of this topic.

now what do i do from here? is there a way to compile just that file chan_sip.c and then replace the chan_sip.so in my install?

can this be done and if so, what is the command to compile?

or do i have to re-install asterisk? if this is the way, asterisk was installed from the iso of trixbox, so how do i re-install just asterisk?

please let me know as im confused what to do next.
The make will compile whatever is in the make file so you could create a make file to only compile chan_sip.so but why not let it just recompile all like the directions in the following post from earlier in the thread suggests? http://www.phoneservicesupport.com/magi ... 43-15.html And then just copy over the chan_sip.so as it says to do.
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

what i did was;
./configure
make
make install

this copied the chan_sip to the location

now, how to make inbound calls working as per the logs shiwn above its not routing calls to the extenstion i have it going to inthe inbound route
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Post by VaHam »

kitkat0981 wrote:what i did was;
./configure
make
make install

this copied the chan_sip to the location

now, how to make inbound calls working as per the logs shiwn above its not routing calls to the extenstion i have it going to inthe inbound route
I am a nix newbie myself but I think the way you did it replaced all the files which were listed in your make file not just the chan_sip.so but if your source matched what you had installed anyway then no harm done.

As for the incoming route the log says no DID or CID match is the reason for rejection. Try making a "Default" incoming route and leave both DID and CID blank and route that to your extension. That should match any incoming DID and CID. If that works then you can examine the logs and see what the DID or CID your trying to use really looks like and go back and adjust your inbound route accordingly.
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

kitkat0981 wrote:what i did was;
./configure
make
make install

this copied the chan_sip to the location

now, how to make inbound calls working as per the logs shiwn above its not routing calls to the extenstion i have it going to inthe inbound route
Looks like by doing this, I screwed up my trixbox install and now I can no longuer run "asterisk -r", it comes back and says:

[trixbox1.localdomain run]# asterisk -r
Asterisk 1.6.0.10, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
[trixbox1.localdomain run]#


Can anyone help?
jaminmc
MagicJack Newbie
Posts: 5
Joined: Wed Mar 24, 2010 5:56 pm

Post by jaminmc »

Well, The only fix I know of is to reinstall trixbox. They use a different version of asterisk... Well, they patch the heck out of it for their own purposes. That is one reason that Asterisk distro runs so behind on asterisk versions.
kitkat0981 wrote:
kitkat0981 wrote:what i did was;
./configure
make
make install

this copied the chan_sip to the location

now, how to make inbound calls working as per the logs shiwn above its not routing calls to the extenstion i have it going to inthe inbound route
Looks like by doing this, I screwed up my trixbox install and now I can no longuer run "asterisk -r", it comes back and says:

[trixbox1.localdomain run]# asterisk -r
Asterisk 1.6.0.10, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
[trixbox1.localdomain run]#


Can anyone help?
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

thats what i did in the end. although i saved the chan_sip.so and reinstalled trixbox, then copied over the chan sip file. all is good, althout on 4out of 5 calls, the call does not come in, but not a problem, as this will mostly be used for outbound.
patx
MagicJack Newbie
Posts: 1
Joined: Tue Jun 29, 2010 9:59 am

Post by patx »

This patch broke my AsteriskOnUbuntu install...

I followed the howto on page 2 with no errors.

chan_sip.so is patched with talk4free.com but after reboot asterisk doesn't start anymore :(

recompiling the whole thing now...
mykroft
MagicJack User
Posts: 47
Joined: Sun Oct 19, 2008 12:28 am

Post by mykroft »

all i did on my asterisk 1.6 is saved the patch in mjpach.txt from the 1st message.

then in /usr/src/asterisk/channels run

Code: Select all

patch -l < mjpatch.txt
that is a lower case L not a 1

then backup one dir (cd ..) and run make

only thing it should do is recompile chan_sip into a .o and .so file

shutdown asterisk (amportal stop)

copy the chan_sip.so to /usr/lib/asterisk/modules

and restart asterisk

this has worked on both my latest 1.4.x version and current 1.6.2.9 version with no probs
genxweb
Dan isn't smart enough to hire me
Posts: 257
Joined: Thu Mar 11, 2010 4:32 pm
Contact:

Post by genxweb »

I ahve this working on 1.4 and 1.6. Both in pbxinaf, trixbox and elastix
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

Hmmm... all of a sudden, my magicjack is no longer working.

Peer in asterisk shows:
207.155.164.198 N 5070 UNREACHABLE

It's pointing to proxy1.denver.talk4free.com

I'm using the patched chan_sip.so

anyone have this issue?

The file itself has not changed since this was setup back in april 2010
arcadia2uk
Dan isn't smart enough to hire me
Posts: 187
Joined: Sun Dec 07, 2008 9:03 pm

Post by arcadia2uk »

sabresfan wrote:Recent problem with ata users http://www.phoneservicesupport.com/do-n ... t9603.html There's no known cure for this yet.
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

Shit! No more mj... Sucks!
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Post by VaHam »

Well it is kludgy but you can still run MJ on another computer (maybe a thin client) and connect the dongle to an fxo port.
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
kitkat0981
MagicJack User
Posts: 31
Joined: Tue Mar 09, 2010 2:22 pm

Post by kitkat0981 »

i had to power down my server, and move it... Powered it back on and the mj trunk now shows registered and calls are working.... Oddd....
arcadia2uk
Dan isn't smart enough to hire me
Posts: 187
Joined: Sun Dec 07, 2008 9:03 pm

Post by arcadia2uk »

pls read above
genxweb
Dan isn't smart enough to hire me
Posts: 257
Joined: Thu Mar 11, 2010 4:32 pm
Contact:

Post by genxweb »

Mine is working though I notice the unreachable every few days to fix this I do a asterisk -rx "restart gracefully" in a cronjob. You can also just issue a reload and usually that clears it.
kingmony
magicJack Apprentice
Posts: 11
Joined: Sun Feb 01, 2009 12:33 pm

mj patch not working anymore

Post by kingmony »

After a few month my asterisk mj trunk are not working. I patched it 4 month ago and everything worked but today it stoped working. I reboot the system and still no good. I tried it with mjmd5 and it works. What could be wrong? How can i test the patch?
neo2121
Dan isn't smart enough to hire me
Posts: 282
Joined: Wed Jan 09, 2008 10:05 am
Contact:

Post by neo2121 »

Put your dongle into the computer update then re-pull the SIP info the make sure you verify the user name as well as the password.
MST
magicJack Apprentice
Posts: 28
Joined: Mon Nov 02, 2009 11:35 pm

Post by MST »

Well this is exactly what I did with my dongle ....

after changing new SIP I have AUTH SENT ...... forever....


Is that means the end of MJ? Using dongle is pice of shit everyone knows that but using it as a service I cannot complain.

Please advice
MST
RonV
magicJack Apprentice
Posts: 14
Joined: Mon Dec 08, 2008 2:13 pm

Post by RonV »

I haven't had any luck after their "upgrade" which seems to have changed the login hashing. I am for one not going to trunk via a zaptel interface so I will bite the bullet and enable long distance though my local voip service broadvoice.

The world of free or cheap and open voip is drawing to the end folks. Just a word to the wise stay away from the legacy guys selling their voip, comcast, at&t, time warner, etc. They tack on 15 dollars of fees to their base prices.
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

RonV wrote:I haven't had any luck after their "upgrade" which seems to have changed the login hashing. I am for one not going to trunk via a zaptel interface so I will bite the bullet and enable long distance though my local voip service broadvoice.

The world of free or cheap and open voip is drawing to the end folks. Just a word to the wise stay away from the legacy guys selling their voip, comcast, at&t, time warner, etc. They tack on 15 dollars of fees to their base prices.

Free or cheap voip still exists. Google Voice, NetTalk etc...

MJ isnt over - they just thwarted most people's use of ata. Which made a lot of people jump ship and rely heavier on the two providers I just mentioned
randyored
MagicJack Newbie
Posts: 6
Joined: Wed Nov 12, 2008 12:29 am

Post by randyored »

jeffnyc wrote:
Free or cheap voip still exists. Google Voice, NetTalk etc...

MJ isnt over - they just thwarted most people's use of ata. Which made a lot of people jump ship and rely heavier on the two providers I just mentioned
I hate that they did it, but I am so gald that MJ pulled their trigger when they did. Just a week or two later was my renew date. Of course MJ lost me.

Why am I glad? I bought a NetTalk Duo. It is a dream. Not a problem one yet. Awesome. All 7 attached house phones working great. It is everything MJ should have been. $10 more a year. Well worth it.

RandyO
RonV
magicJack Apprentice
Posts: 14
Joined: Mon Dec 08, 2008 2:13 pm

Post by RonV »

jeffnyc wrote:Free or cheap voip still exists. Google Voice, NetTalk etc...

MJ isnt over - they just thwarted most people's use of ata. Which made a lot of people jump ship and rely heavier on the two providers I just mentioned
No thanks on Google voice. They steal enough info from your email and browsing behavior. I am not going to give them the ability to monitor my phone activity, transcode my conversations, and sell them as ad sense to marking companies.

NetTalk is an option until they kill the "open sip" channel.

Just an update, I ordered my NetTalk this afternoon with the discount code. I don't mind paying 10 bucks more a year just to have a reliable PBX trunk for long distance service.
randyored
MagicJack Newbie
Posts: 6
Joined: Wed Nov 12, 2008 12:29 am

Post by randyored »

RonV wrote:NetTalk is an option until they kill the "open sip" channel.
Has someone figured out the NetTalk Duo SIP method for a 3rd party ATA?

RandyO
propizza
MagicJack User
Posts: 46
Joined: Mon Jan 28, 2008 11:45 am

Post by propizza »

randyored wrote:
RonV wrote:NetTalk is an option until they kill the "open sip" channel.
Has someone figured out the NetTalk Duo SIP method for a 3rd party ATA?

RandyO
I don't think so
Post Reply