Obsolete: outbound Caller ID blocking and spoofing

magicJack Tips and Tricks

Moderators: Pilot, Bill Smith

Post Reply
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Obsolete: outbound Caller ID blocking and spoofing

Post by Stewart »

Here is a simple perl script that provides per-line and per-call (*67) Caller ID blocking, and also allows you to send e.g. your GrandCentral or landline number as your Caller ID.

To use:

1. Be sure that you have a reliable alternate way to make an emergency call, as this script might cause your magicJack service to stop working unexpectedly.
2. If you don't have perl on your PC, you can find a distibution here http://www.activestate.com/store/downlo ... d58c2648ca . The MSI package is easiest to install.
3. Put the script into a file. Edit the values of $srcnum, $spoof, and $cidblock as desired.
4. Edit your hosts file (typically C:\windows\system32\drivers\etc\hosts), adding a line like this:

Code: Select all

127.0.0.1	proxy1.nashville.talk4free.com
5. In a Command Prompt window, start the script running.
6. Restart MJ.

Notes:
1. You cannot block or spoof on toll-free calls.
2. If you choose to block on all calls, per-call unblocking does not work.
3. If you don't run your PC 24/7, you will need to cause the script to run when the PC is started.
4. If you have trouble, undo the change to your hosts file, restart MJ, and you should be back to normal.
5. If you add features or make other improvements, please post them here.

Here is the script:

Code: Select all

#!/usr/bin/perl -w
# Warning: this software may be unstable.  Before using it, be sure that you have
# a reliable alternate means of making an emergency call.
use IO::Socket;

$srcnum = '2124610000';         # change this to your MJ number
$spoof = '2125551212';          # change this to number to send as Caller ID
$cidblock = 0;                  # set to 1 to block ID on all calls
$mjip = '127.0.0.1';            # change if MJ running on different host from this script
$server = '67.90.152.70';       # MJ proxy to use

sub outgoing {                  # handle outgoing call features
    return if $ibuf =~ /sip:911/; # don't mess with 911 calls
    if ($cidblock || $ibuf =~ /Anonymous/) { # want to block
        $ibuf =~ s/\r\n\r\n/\r\nPrivacy: id\r\nP-Asserted-Identity: <sip:$srcnum\@x>\r\n\r\n/;
    }
    elsif ($spoof ne $srcnum) { # want to spoof
        $ibuf =~ s/\r\n\r\n/\r\nP-Asserted-Identity: <sip:$spoof\@x>\r\n\r\n/;
    }
}

$lport = 5070;                  # port to listen on
$dgs = new IO::Socket::INET(LocalPort => $lport, Proto => 'udp') or die "Socket: $!\n";
while (1) {
    $rcv = $dgs->recv($ibuf, 2000, 0);
    next unless $rcv && length($rcv) >= 8; # ignore errors
    $raddr = inet_ntoa((sockaddr_in($rcv))[1]); # get source addr
    if ($raddr eq $mjip) {      # packet from MJ
        if ($ibuf =~ /\nAuthorization:/) { # INVITE packet for outgoing call
            &outgoing();
        }
        $dpaddr = sockaddr_in(5070, inet_aton($server));
        $dgs->send($ibuf, 0, $dpaddr); # send to server
    }
    elsif ($raddr eq $server) { # packet from server
        $dpaddr = sockaddr_in(5060, inet_aton($mjip));
        $dgs->send($ibuf, 0, $dpaddr); # send to MJ
    }
}
Please let me know of any bugs.
ke7doy
magicJack Apprentice
Posts: 16
Joined: Mon Nov 12, 2007 11:14 pm

Post by ke7doy »

Thank you for the information. I will let you know if I experience any problems.
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

This can't be done if I am using an SIP adapter can it? If it can be done how? Same thing with 911 and the SIP adapter. I don't think it will work. Thanks
Will not be on forum until after June 15th.
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

I don't know if it will work with your adapter, but if you want to try:

1. Don't change host file.
2. Edit the value of $mjip to be the static private IP address of your adapter. Adapter must be on same subnet as PC.
3. Set the outbound proxy in adapter to be the static IP address of the PC running the script.

If it doesn't work, post what kind of adapter you are using, what error, if any, you are getting, whether adapter sees any SIP responses, and any other details that may be relevant.
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

smcinaz wrote:Far as I know, you can already do most of this on an ATA just by putting your GC number in where it asks for Caller ID number.
II'll try that... Stewarts way is a little to complex for me, but if your way doesnt work then I'll try Stewarts....
So can't change name?
Does this only work if you will call other VOIP people? Because if you did it the old way and regiedit and entered ur name then only people with VOIP would see the changed CID....Thanks
Will not be on forum until after June 15th.
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

Eh...don't see any such option. Any idea where to go. I have a SPA 2102-r (Sunrocket crap). If anyone knows how then please help me. Otherwise I'll go with Stewarts idea which i also don't get.
Help Apreciated
Will not be on forum until after June 15th.
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

smcinaz wrote:My AC-211 has a space for it.
Ah those damn AC-211...I bricked mine by accident :evil:
Will not be on forum until after June 15th.
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Re: outbound Caller ID blocking and spoofing

Post by MagicHack »

Stewart wrote:Here is a simple perl script that provides per-line and per-call (*67) Caller ID blocking, and also allows you to send e.g. your GrandCentral or landline number as your Caller ID.
Wow. Very very cool.

I rewrote it to be a little more dynamic, and run from the system tray...

So, when you click the icon in the system tray, you are given a little UI to change the caller id number, etc. It allows it to be a little more dynamic. It also dumbs it down a little so even people like kumar can use it. (Sorry kumar - cheap shot at your expense...haha)

Image

As soon as I am sure I have all the bugs worked out, I'll post the source and binaries somewhere if people want it...

MH
anant
Dan isn't smart enough to hire me
Posts: 114
Joined: Mon Nov 12, 2007 7:44 pm

ac-211 working with MJ hardware

Post by anant »

Hi

I hear so much about ac-211 (analog telephone adapter of sunrocket) and its unlocking. Can we unlock ac-211 and use MJ hardware with ac-211. Has anyone successfully tried. If so where can we buy ac-211. I am just curious. This is just for my play and educational purposes. I am a novice in this area. I would appreciate if someone provides me with some links where I can read and learn about this stuff. I have been using vonage service over years and I have ata from vonage supplied when I initially signed up for service. Thanks in anticipation.

anant
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Re: outbound Caller ID blocking and spoofing

Post by kumar »

MagicHack wrote:
Stewart wrote:Here is a simple perl script that provides per-line and per-call (*67) Caller ID blocking, and also allows you to send e.g. your GrandCentral or landline number as your Caller ID.
Wow. Very very cool.

I rewrote it to be a little more dynamic, and run from the system tray...

So, when you click the icon in the system tray, you are given a little UI to change the caller id number, etc. It allows it to be a little more dynamic. It also dumbs it down a little so even people like kumar can use it. (Sorry kumar - cheap shot at your expense...haha)

Image


As soon as I am sure I have all the bugs worked out, I'll post the source and binaries somewhere if people want it...

MH
just got back from shopping....DAMN it we didnt get a TV cuz one really aggressive lady cut in line. Oh well...Home now...And that thin is sweet ass.... So how do i get it to work with an SIP adapter? Or is it not possible... Computer has to be on??
Thanks

MOD EDIT: Had to tone down the language a little, Kumar....

EDIT:...^^Haha sorry....Don't ya hate it when them Indians butt in line....I'm Indian too lol....But i just read MagicHack's post over again...Thanks for putting me in....You should say "Inspired by Stewart Ingenuousness combined with Kumar's dumbness. Put some ads in there ti JK. But again....How do u get this hack to work with a SIP adapter....Specifically the SPA2102-r
Will not be on forum until after June 15th.
aone999
MagicJack User
Posts: 42
Joined: Mon Nov 12, 2007 11:50 pm

Post by aone999 »

Hi MagicHack

Can you post the binaries so that we can see it in action?
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

aone999 wrote:Hi MagicHack

Can you post the binaries so that we can see it in action?
Sure! Sorry for the delay, I was out of town for Thanksgiving.

To use:
  1. Edit your hosts file, and add the line:

    Code: Select all

    127.0.0.1   proxy1.nashville.talk4free.com
  2. download and run the Spoofing Proxy v1.0 (update: you probably want to download the newer v1.1 Spoofing Proxy
  3. when you first run the proxy, you will see a screen like:
    Image
    Change the values to reflect your real MJ number, and the number you want to send as your caller ID.
  4. click apply (this will keep the proxy running from the system tray)
  5. start your MJ
  6. use your MagicJack as usual
Notes:
  • This was written in C#, and therefor needs .NET to run.
  • this proxy MUST be running the entire time the MJ is running!
Credit for this find goes to Stewart, the magicJack God.

There are probably some bugs - this was a quick hack to get it running - so let me know if you have problems.

Also, depending on where you live, caller ID spoofing might be illegal, so this it provided for your educational use only. I will not be held liable for misuse of this tool.

I was thinking of adding a few additional features like:
  • a windows installer to edit the host file for you
  • run as a service automatically
  • spoof the user agent string (in case you are using an ATA)
  • other features you want/need?
To uninstall, remove the line from your hosts file, and restart your MagicJack.

Questions, comments, etc?
Last edited by MagicHack on Sun Nov 25, 2007 8:40 pm, edited 1 time in total.
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

Great!! i'm trying it right now...hope u haev it out so i can use it with an ata soon.
Thanks a bucha
Kumar

EDIT; works great...thanks
Will not be on forum until after June 15th.
magicjackworld
MagicJack Newbie
Posts: 6
Joined: Tue Nov 13, 2007 12:01 pm

Post by magicjackworld »

WOW, it works perfect, thats amazing.


thanks to magichack and stewart for this, you guys are the best
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

displaying the real phone number for 'anonymous' callers...

Post by MagicHack »

Stewart - I added one new feature to my version (which you can add to the perl version if you'd like)... I'd do it myself, but I suck at perl.

Version "1.1" (which I'll upload soon), contains the ability to show the real phone number for anonymous callers.

This is done by intercepting the SIP invite packet, and replacing the 'From: "Anonymous"' with the real caller's number from the "Contact" portion of the INVITE packet.

- MH
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

smcinaz wrote:What exactly does that mean, Hack? You can see numbers of people who are trying to call you anonymously? From pots lines or only from SIP calls? Or am I just wishfully thinking?
Yes, you can see the phone number of the person who is calling you anonymously. Yes, from POTS, and probably from VoIP as well, unless you spoof that data as well, which you can do with the proxy now...

It means, if you call my magicjack line from your POTS and block your caller id (by dialing *67), normally, the magicJack would display "Anonymous". With this new proxy, if you try to block caller id from your pots, the MagicJack will now display the telephone number of the person calling anonymously.
Here is the new UI:
Image
I'll upload it as soon as I am done testing it...
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

Will the spoofed name show up on POTS?
Thanks
Kumar
Will not be on forum until after June 15th.
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

kumar wrote:Will the spoofed name show up on POTS?
Thanks
Kumar
No. Only on other MagicJack lines (and maybe other VoIPs).

Sorry, we're not hacking the CNAM...

MH
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

Here is version 1.1

Here is the rundown of the UI options:
Image
  • magicJack Number: this is actually the number that is send under the covers when you block your caller ID. If you intend to block you callerID, set this number to your spoofed number as well.
  • Spoofed CallerID: this is the number the caller ID information that will be sent to other callers when you call them. Set this to any number you want - your grand central line, "1234", whatever...
  • CallerID Name: This is the value that is passed if you call another MagicJack User. This value is only passed if ou have your magicjack running on the local machine. If you are using an ATA, set this value in your ATA's settings.
  • Block CallerID: Check this if you wish for you calls to be 'anonymous'. (Remember, it is possible for a creative individual to unblock anonymous callers. Therefor, you should set your magicJack Number to some spoofed number to remain more 'anonymous'.
  • Show Anonymous Callers Real Number: Check this option if you want to see 'anonymous' callers real phone numbers. Normally, when someone dial *67, their number shows as 'anonymous' when they call your magicJack line. If you check this, you will see their real number.
  • magicJack proxy: the proxy address of the real magicJack server
  • Local magicJack IP: the IP address of the machine running the magicJack softphone
  • Apply Changes: Persists the values your configured to the registry, and starts the proxy.
  • Inspired by Stewart's creative genius: Click this link to come to this site. Plus, give credit where credit is due. Stewart is the man.
Questions/Comments/etc, just yell...

MagicHack
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

smcinaz wrote:How to make this work via ATA?
Read Stewarts post from earlier in this thread:
Stewart wrote:I don't know if it will work with your adapter, but if you want to try:

1. Don't change host file.
2. Edit the value of $mjip to be the static private IP address of your adapter. Adapter must be on same subnet as PC.
3. Set the outbound proxy in adapter to be the static IP address of the PC running the script.

If it doesn't work, post what kind of adapter you are using, what error, if any, you are getting, whether adapter sees any SIP responses, and any other details that may be relevant.
So, for you:
1) change the MJ Proxy address in your ATA to point to the machine running the CallerIDSpoof.exe (rather than the real MJ Servers)
2) change the IP address in the callerIDSpoof.exe to be that of your ATA (rather than 127.0.0.1)

Or talk to Kumar - I believe that is how he uses it...

MH
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

The idea of displaying anonymous caller numbers seemed too good to be true, and in one test I did, indeed it was. So we need to find out where this works and where it doesn't. When I tested using a SunRocket/Teleblend account, dialing with *67, calling a Las Vegas MJ number registered with Nashville proxy, the Contact header came in as:

Code: Select all

Contact: <sip:[email protected]:5070>
Unfortunately, I'm traveling and my test capabilites are very limited.

BTW, if you spoof e.g. your POTS number, then the name associated with that number should display to the called party, if his service offers Caller ID Name.
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

Stewart wrote:The idea of displaying anonymous caller numbers seemed too good to be true, and in one test I did, indeed it was. So we need to find out where this works and where it doesn't. When I tested using a SunRocket/Teleblend account, dialing with *67, calling a Las Vegas MJ number registered with Nashville proxy, the Contact header came in as:

Code: Select all

Contact: <sip:[email protected]:5070>
Unfortunately, I'm traveling and my test capabilites are very limited.
Absolutely this is correct. In some cases, this technique does not work. In some cases it does. I really depends on where the caller is calling from. For example, calling from my verizon wireless cell phone, T-Mobile cell phone, and Nextel phone (anonymously with *67), I can easily display the caller ID in MagicJack. Worse case, you still see 'anonymous'. Best case, you can see the person who is calling you...

Of course, spoofing caller ID is the same way. Sometimes the spoofing works, sometimes it does not. For example (as you pointed out), spoofing caller ID to 800 numbers does not normally work...

So, the technique is not perfect, but, does provide 'better' support for 'anonymous' callers...
Stewart wrote:BTW, if you spoof e.g. your POTS number, then the name associated with that number should display to the called party, if his service offers Caller ID Name.
Again, absolutely this is correct. I do have some favorite numbers I use when spoofing - everything from Sperm Banks to Dan Borislow's phone number, but that is a discussion for another time.

If you are bored, PM me your phone number, and I can call you "anonymously" from one of my cell phones, and you will see something like:

Code: Select all

Contact: <sip:[email protected]:5070>
MH
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

MagicHack wrote:
smcinaz wrote:How to make this work via ATA?
Read Stewarts post from earlier in this thread:
Stewart wrote:I don't know if it will work with your adapter, but if you want to try:

1. Don't change host file.
2. Edit the value of $mjip to be the static private IP address of your adapter. Adapter must be on same subnet as PC.
3. Set the outbound proxy in adapter to be the static IP address of the PC running the script.

If it doesn't work, post what kind of adapter you are using, what error, if any, you are getting, whether adapter sees any SIP responses, and any other details that may be relevant.
So, for you:
1) change the MJ Proxy address in your ATA to point to the machine running the CallerIDSpoof.exe (rather than the real MJ Servers)
2) change the IP address in the callerIDSpoof.exe to be that of your ATA (rather than 127.0.0.1)

Or talk to Kumar - I believe that is how he uses it...

MH
Does using the UI version automatically change the hosts file?

I am trying to use with pap2t. Does it matter that MJ is on line 2 of my ata?
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

jeffnyc wrote:I am trying to use with pap2t. Does it matter that MJ is on line 2 of my ata?
Not specifically, but it is required that your device be using local SIP port 5060. By default, PAP2 uses 5060 for line 1 and 5061 for line 2. If that is your case, just swap them and you should be ok.
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

My outbound proxy is 67.106.133.198:5070. If I remove the 5070 it does not work.

I am testing when calling my cell phone.
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

jeffnyc wrote:My outbound proxy is 67.106.133.198:5070. If I remove the 5070 it does not work.
On the PAP, you need to specify <your PC>:5070 for the outbound proxy, and 5060 for the local SIP port. If you still have trouble, use Wireshark to see where it's going wrong.
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

jeffnyc wrote:Does using the UI version automatically change the hosts file?
No, it does not modify your hosts file. You MUST do that manually. I thought about making it automatic, but decided against it, because I wanted to force people to think about what they were doing to their system...

I did have some ideas for additional features, like:
  • call blocking (allow you to program certain phone numbers to automatically go to voice mail... for example, have your in-laws automatically get voicemail, without your phone actually ringing).
  • DND based on times - so you can have it so that your phone does not ring at night (or whenever you program it to...)
  • some UI enhancements, etc...
I am a little hesitant to add additional features, as I am not 100% sure what the web portal will allow. If we can do some of the above with the upcoming portal, reinventing the wheel does not make sense to me...

MH
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

Stewart wrote:
jeffnyc wrote:My outbound proxy is 67.106.133.198:5070. If I remove the 5070 it does not work.
On the PAP, you need to specify <your PC>:5070 for the outbound proxy, and 5060 for the local SIP port. If you still have trouble, use Wireshark to see where it's going wrong.
Awesome :D

The ability to do this has huge ramifications. Hmmm - I can call my ex and make her think its her current boyfriend calling - then have some woman yell out "come back to bed" in the background :lol:
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

Ok i am successful!! I will post screen shots maybe later tonight if i get time or a day where i have no homework.

Thanks for help everyone
Kumar
kumar
Dan Should Pay Me
Posts: 806
Joined: Thu Nov 15, 2007 4:29 pm
Contact:

Post by kumar »

Our school went on lock down cuz there was someone who baracaded themselves in a house next to the school with weapons (Long story) but now i am home and doing homeowrork but I will have screenshots posted by 10:15 Eastern tonight!! Sorry its taking forever for them and sorry i haven't been responding to PMs. This will all be done today or later this week depending on my homework load....
Peace
dogfish
MagicJack Newbie
Posts: 2
Joined: Thu Nov 29, 2007 11:02 pm

Awesome!

Post by dogfish »

Wow. Stewart and MagicHack, you guys are awesome. Your little doohicky works great. Keep up the good work.
cosmicsurfer
MagicJack Newbie
Posts: 5
Joined: Mon Nov 12, 2007 6:48 pm
Location: Texas, USA

Post by cosmicsurfer »

Thanks alot to Stewart and Magicjack for this, I just installed it and it works great. You guys are truly the best. :D
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

Ditto. Thanks again Stewart and MH. This is amazing. Using with ata and works great!

Now I dont care as much about the portal being forever postponed.

Im not using it this way but spoofing with your Grandcentral number is now a true workaround to a local area code. Outgoing calls from MJ will appear as originating from your GC # and incoming calls will ring on your MJ.
EagleBoy
magicJack Apprentice
Posts: 15
Joined: Sat Dec 01, 2007 4:05 pm

Thanks for this!

Post by EagleBoy »

Just another BIG thank you for this small hack. I only use my MJ for outbound calls. So now, I can display the CallerID of my work phone if I'm working at home that day .. or can display my cell phone number when calling friends (since they won't answer the phone if they don't recognize the callerID).

What a great tool! Thanks! :D
Poo619
MagicJack Expert
Posts: 96
Joined: Tue Nov 20, 2007 9:27 am

Post by Poo619 »

great work on this. love seeing my local # showing up. question is, if someone had the skills and knowhow would it be possible to run straight from an ATA? Or if not possible that way, maybe a script running on a DD-WRT router?
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

will this tool work with other providers or just mj?

if yes, is it possible to have 2 instances running at same time against a non 5060 port?
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

jeffnyc wrote:will this tool work with other providers or just mj?
Perhaps.. (though, If I were to bet, I'd say not likely - as they probably use a port other than 5070(out) and 5060(in)...) What provider did you want to use it with?
jeffnyc wrote:if yes, is it possible to have 2 instances running at same time against a non 5060 port?
I don't believe that would work. Remember that this code listens on port 5070. It simply forwards outgoing requests to the magicjack server on port 5070 (and spoofs the phone number), and forwards incoming requests to the magicjack running on port 5060.

With that said, it would probably be possible to make this work with other VoIP's - you'd need to do a network capture, and look at the actual data. Then you'll need to modify the code - incoming/outgoing ports, and possibly replace some of the extra data in the SIP REGISTER packet depending on your situation/configuration... Keep trying until your 'spoofed' packets look identical to your original packets...
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

I've tried spoofing with two other carriers:

Vitelity: Outbound service is not associated with a number, even if billed to an account that has one or more incoming DIDs. If you are using an IP phone or ATA, you specify the desired outbound caller ID via the web portal, so no need to spoof. If you are using e.g. Asterisk, you can send any caller ID. However, if you send a toll-free number, one of their upstream carriers has a bug that ends up sending the 800 (or 888, etc.) as a country code, so you are in practice limited to geographic NPAs.

SunRocket/Teleblend: Spoofing works, but the call is rejected unless the spoofed number is associated with the calling account, so it's only useful for sending a signature number.
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

Poo619 wrote:if someone had the skills and knowhow would it be possible to run straight from an ATA? Or if not possible that way, maybe a script running on a DD-WRT router?
AFAIK, there are no open source ATAs, so you would need to do a little reverse engineering. The biggest problem would probably be figuring out how to build a valid firmware image. The SPA / PAP devices have an integrity check that I don't understand. If it's a true signature, it may be very difficult to forge. Devices such as AC-211 or Innomedia would be much easier in that regard (though IMO they are crappy ATAs). Of course, if you mess up, you may end up with a brick.

Putting it in a router seems much simpler -- there are many open source router firmwares available. Just take one with a SIP ALG and modify the code to add the required headers.
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

Stewart wrote:I've tried spoofing with two other carriers:

Vitelity: Outbound service is not associated with a number, even if billed to an account that has one or more incoming DIDs. If you are using an IP phone or ATA, you specify the desired outbound caller ID via the web portal, so no need to spoof. If you are using e.g. Asterisk, you can send any caller ID. However, if you send a toll-free number, one of their upstream carriers has a bug that ends up sending the 800 (or 888, etc.) as a country code, so you are in practice limited to geographic NPAs.

SunRocket/Teleblend: Spoofing works, but the call is rejected unless the spoofed number is associated with the calling account, so it's only useful for sending a signature number.
I was thinking Voicestick or Onesuite. I would be more interested in seeing anonymous incoming caller ids than spoofing the outgoing callerid for those services,
MagicHack
Dan isn't smart enough to hire me
Posts: 241
Joined: Mon Nov 12, 2007 4:11 pm
Contact:

Post by MagicHack »

jeffnyc wrote:
Stewart wrote:I've tried spoofing with two other carriers:

Vitelity: Outbound service is not associated with a number, even if billed to an account that has one or more incoming DIDs. If you are using an IP phone or ATA, you specify the desired outbound caller ID via the web portal, so no need to spoof. If you are using e.g. Asterisk, you can send any caller ID. However, if you send a toll-free number, one of their upstream carriers has a bug that ends up sending the 800 (or 888, etc.) as a country code, so you are in practice limited to geographic NPAs.

SunRocket/Teleblend: Spoofing works, but the call is rejected unless the spoofed number is associated with the calling account, so it's only useful for sending a signature number.
I was thinking Voicestick or Onesuite. I would be more interested in seeing anonymous incoming caller ids than spoofing the outgoing callerid for those services,
Do a network capture while receiving an anonymous call for your provider, and see if you see the 'anonymous' phone number in one of the packets.

If you do see the callers phone number in one of the incoming packets, then it is certainly possible (though, some code changes might be required)...
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

jeffnyc wrote:I was thinking Voicestick or Onesuite. I would be more interested in seeing anonymous incoming caller ids than spoofing the outgoing callerid for those services,
I know nothing about those services, but if they have a bug that leaks anonymous caller IDs, IMO they will fix it quickly, once the word gets out. If you really want to know who's calling, get a toll free number. For example, Vitelity charges only $0.019/minute + $0.50/month, and there is no need to hack anything, because the law says that if you are paying for the call you have a right to know who is calling. (If blocking was requested by the caller, there are legal limitations on what business use you can make of his number.)
Poo619
MagicJack Expert
Posts: 96
Joined: Tue Nov 20, 2007 9:27 am

Post by Poo619 »

Stewart wrote: Putting it in a router seems much simpler -- there are many open source router firmwares available. Just take one with a SIP ALG and modify the code to add the required headers.
must be nice knowing what you are talking about :) I'm in the market for a WRT54G. I guess I should start researching what the hell a ALG is. Also when you say modify code do you mean just input numbers hehe
jeffnyc
Dan isn't smart enough to hire me
Posts: 336
Joined: Sat Nov 17, 2007 10:28 am

Post by jeffnyc »

MagicHack wrote:
jeffnyc wrote:
Stewart wrote:I've tried spoofing with two other carriers:

Vitelity: Outbound service is not associated with a number, even if billed to an account that has one or more incoming DIDs. If you are using an IP phone or ATA, you specify the desired outbound caller ID via the web portal, so no need to spoof. If you are using e.g. Asterisk, you can send any caller ID. However, if you send a toll-free number, one of their upstream carriers has a bug that ends up sending the 800 (or 888, etc.) as a country code, so you are in practice limited to geographic NPAs.

SunRocket/Teleblend: Spoofing works, but the call is rejected unless the spoofed number is associated with the calling account, so it's only useful for sending a signature number.
I was thinking Voicestick or Onesuite. I would be more interested in seeing anonymous incoming caller ids than spoofing the outgoing callerid for those services,
Do a network capture while receiving an anonymous call for your provider, and see if you see the 'anonymous' phone number in one of the packets.

If you do see the callers phone number in one of the incoming packets, then it is certainly possible (though, some code changes might be required)...
Can I use fiddler for this (network capture)?
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Post by Stewart »

jeffnyc wrote:Can I use fiddler for this (network capture)?
No, Fiddler only works for HTTP and HTTPS (and FTP under some conditions). However, Wireshark is pretty easy to use. The problem, regardless of what capture tool you use, is getting the tool to see the packets. If your other provider's connection is via an ATA or IP phone, you need a dumb hub, managed switch, or bridging through your PC to get the packets to the capture tool. If supported by the provider, using a softphone for your test incoming call would be simplest.
testing123
Dan Should Pay Me
Posts: 703
Joined: Tue Nov 13, 2007 2:36 pm
Contact:

Works

Post by testing123 »

Stewart, MagicHack: Gotta give some credit and praise -- this works very well.

1) I have only tried the MagicHack version running on win2000 Pro. (And yes, I was running win2000 on top of VMware on top of Linux :lol: )

a. I did run into a problem where it kept crashing and it was not clear WHAT the problem was; I rebooted and it started working again. (Honestly, I just don't trust this .NET framework crap, but oh well).


2) I really would rather run this on Linux so I am looking into Stewart's PERL version to try it out. I'll let you know.


3) It is only because of 1a above that I can't recommend for MISSION CRITICAL phone service (i.e., if the app crashes, no Calls will come in or out)

Otherwise, this is a GREAT job. Many thanks.

Followups
1) Can you add the capability to support multiple MagicJack lines simultaneously -- I didn't try it; will it work, as is?
2) I will also try to make it an NT service on Windoze to see how it behaves
Last edited by testing123 on Sun Feb 10, 2008 6:06 pm, edited 1 time in total.
Stewart
Dan Should Pay Me
Posts: 663
Joined: Tue Nov 13, 2007 2:58 pm

Re: Works

Post by Stewart »

testing123 wrote:1) Can you add the capability to support multiple MagicJack lines simultaneously -- I didn't try it; will it work, as is?
The problem is that the present software has port 5060 hardwired in. If your ATA can use the same local port for multiple lines, e.g. InnoMedia, then you should be ok. I don't know whether a PAP2 or similar unit will work if you assign port 5060 to both lines. Otherwise, you could either modify the code to allow for a variable device port (and run multiple instances), or make it smarter about seeing where registrations come from, sending return packets back to the appropriate place.
testing123
Dan Should Pay Me
Posts: 703
Joined: Tue Nov 13, 2007 2:36 pm
Contact:

Re: Works

Post by testing123 »

Stewart wrote:
testing123 wrote:1) Can you add the capability to support multiple MagicJack lines simultaneously -- I didn't try it; will it work, as is?
The problem is that the present software has port 5060 hardwired in. If your ATA can use the same local port for multiple lines, e.g. InnoMedia, then you should be ok. I don't know whether a PAP2 or similar unit will work if you assign port 5060 to both lines. Otherwise, you could either modify the code to allow for a variable device port (and run multiple instances), or make it smarter about seeing where registrations come from, sending return packets back to the appropriate place.
Interesting ... I actually have quite a few of the Innomedias. 8)
DavidRGallagher
MagicJack Newbie
Posts: 2
Joined: Wed Nov 28, 2007 3:08 am

MH's app with ATA - enable Vertical Service Activation Codes

Post by DavidRGallagher »

I have a question about enabling Vertical Service Activation Codes using a SPA-2102 and MagicHack's App. I've tried to just enable *82 and *67 via the web interface of the ATA and when I dial with either prefix it will give me a busy signal. Any calls without the prefix work no problem. I'd like to be able block my number via MH's app and unblock it per call or vice versa.

Thanks in advance for any help you can provide.

-DG
voipjunk
MagicJack Newbie
Posts: 3
Joined: Tue Dec 04, 2007 9:31 pm

caller id

Post by voipjunk »

To use:
  1. Edit your hosts file, and add the line:

    Code: Select all

    127.0.0.1   proxy1.nashville.talk4free.com
    How can I edit hosts file?
Post Reply