Welcome to The Tech 
Guide
Google
 
Web www.thetechguide.com
Geeks with attitude
Navigation
  • Home
  • How-To's
  • Tweaks
  • Hardware
  • Software
  • Games
  • Our Picks
  • Downloads
  • FAQ's
  • Forum
  • Chat
  • Tech Deals
  • Links
  • Email

  • Site News
    Our Black Friday section is now online! Click here to check it out.

    Active Discussions
    [an error occurred while processing this directive]


      

    Unlimited Incoming/Outgoing cellphone calls with Asterisk


    Quick note! This guide is incomplete. If you have a decent understanding of linux and asterisk, you can probably fill in the huge gaping holes. Otherwise, I'd stay far far away! At the very least, don't try this on your production box!

    You will need a cellphone with bluetooth. If it does not have bluetooth, it will not work, simple as that. Also not all phones will work. Personally, I'm using a Motorola Razr V3 (also tested with a Motorola V551). You also need a usb bluetooth dongle with a CSR chipset. Broadcom will not work. I would buy this in a regular retail store so it can be taken back if it has the wrong chipset. I researched this, found the Linksys USBBT100 which has the correct chipset and great range, and ordered it. When I got it, it was a rev2 with a different chipset. The one I'm using now is a Belkin F8T001V ordered from Circuit City here.

    Install Asterisk@Home 2.2 (instructions should be similar, if not identical, for 2.5).

    login: root
    password: password

    Change the following passwords:

    passwd
    passwd admin
    passwd-maint
    passwd-amp
    passwd-meetme


    Setup Networking
    yum -y update

    cd /usr/src/zaptel
    make install-udev


    yum install bluez-libs-devel
    Is this ok [y/N]: Y

    reboot
    rebuild_zaptel
    reboot


    genzaptelconf

    cd /
    wget http://www.thetechguide.com/howto/asterisk/bluetoothfiles.tar.gz
    tar xzf bluetoothfiles.tar.gz

    Ignore errors about time stamp in future
    cd /usr/src/asterisk
    make clean
    make
    make install


    If you see a message displaying WARNING WARNING WARNING pertaining to /usr/lib/asterisk/modules, you can ignore it, those modules are supposed to be there.

    chkconfig bluetooth on
    service bluetooth start


    Now run hcitool scan. You will see output similar to this:

    [root@asterisk1 asterisk]# hcitool scan
    Scanning ...
            00:12:8A:C7:DA:7C       Motorola Phone

    The 00:12:8A:C7:DA:7C is the MAC address of the phone. Now, we need to edit your bluetooth.conf file to use this address:

    cd /etc/asterisk
    nano bluetooth.conf


    Go to the bottom, you will see this:

    ;; A Motorola V551
    [00:12:8A:C7:DA:7C]
    name        = Motorola
    type        = AG
    channel     = 3
    autoconnect = yes

    Replace [00:12:8A:C7:DA:7C] with the MAC address you got from hcitool scan (keep the [] brackets surrounding it). Now, another thing that may cause you problems, is the "channel = 3" part. In the bluetooth.conf, it says to run sdptool search --bdaddr xx:xx:xx:xx:xx:xx 0x111F to find the correct channel number. For mine it reported channel 7, but would not work for me unless set to 3. In case this part is important for you, here's how to see what channel it thinks you should use (I'd try it with channel = 3 first, if that doesn't work then try this, if that doesn't work then start at 1 and work your way up to 13 and see if you get anything). Once you're done editing the file, hit Ctrl-X to exit, Y to save, and the enter key to keep the same filename (so Ctrl-X, Y, enter).

    The xx:xx:xx:xx:xx:xx is the MAC address (the same one you got from hcitool scan), so in our case the command will be sdptool search --bdaddr 00:12:8A:C7:DA:7C 0x111F. Your phone does NOT have to be in Find Me mode to run this tool. Just make sure it's on and the bluetooth service is running. In my case, the output is:

    [root@asterisk1 asterisk]# sdptool search --bdaddr 00:12:8A:C7:DA:7C 0x111F
    Class 0x111F
    Searching for 0x111F on 00:12:8A:C7:DA:7C ...
    Service Name: Hands-Free voice gateway
    Service Description: Hands-Free voice gateway
    Service Provider: Cingular
    Service RecHandle: 0x10007
    Service Class ID List:
    "" (0x111f)
    "Generic Audio" (0x1203)
    Protocol Descriptor List:
    "L2CAP" (0x0100)
    "RFCOMM" (0x0003)
    Channel: 7
    Language Base Attr List:
    code_ISO639: 0x656e
    encoding: 0x6a
    base_offset: 0x100
    code_ISO639: 0x6672
    encoding: 0x6a
    base_offset: 0xd800
    code_ISO639: 0x6573
    encoding: 0x6a
    base_offset: 0xd803
    code_ISO639: 0x7074
    encoding: 0x6a
    base_offset: 0xd806
    Profile Descriptor List:
    "" (0x111e)
    Version: 0x0101

    The part that interests us is the line right under ""RFCOMM" (0x0003)" which says "Channel: 7". So in /etc/asterisk/bluetooth.conf, you want to change "channel = 3" to "channel = 7" (again, note that this did NOT work for me, I had to have it on channel 3).

    At this point I rebooted, to make sure everything would start up automatically:

    reboot

    Once it comes back online, Asterisk will start up and attempt to connect to your phone. The first time this happens, it will ask if you want to connect (say yes) and ask for a PIN. The PIN is 1234. My phone kept asking if I wanted to connect each time asterisk was rebooted or the phone was powered on, you should be able to go in your phone menus and set it to just automatically connect and it won't bother you again.

    Next up, actually making and receiving calls and troubleshooting.

    Click here for the second page, also still in progress (i.e., incomplete).


    Questions? Ask in the forum or email me.

    For the Privacy Policy, click here.
      
    Past Articles
  • Build your own Apple Clone
  • AllofMP3 Review
  • Tutorial to Basic Windows 2000 DOS
  • Extracting and joining MPG2 files from SVCD
  • Modifying your Windows XP Boot Logo
  • Unlocking WinXP's setupp.ini
  • Making a Full Screen Bios Logo
  • Making your WinMe CD bootable
  • Auto-insert your Win9x serial
  • Auto-insert your Office2kserial
  • Why FedEx Sucks