Describe Crypto Phone/Stacked Linux-based CPhone Brainstorming/Scripted TX or RX WAV with Asterix here.

               .$$$$$$$$$$$$$$$=..
            .$7$7..          .7$$7:.
          .$$:.                 ,$7.7
        .$7.     7$$$$           .$$77  
     ..$$.       $$$$$            .$$$7 
    ..7$   .?.   $$$$$   .?.       7$$$.
   $.$.   .$$$7. $$$$7 .7$$$.      .$$$.
 .777.   .$$$$$$77$$$77$$$$$7.      $$$,
 $$$~      .7$$$$$$$$$$$$$7.       .$$$.
.$$7          .7$$$$$$$7:          ?$$$.
$$$          ?7$$$$$$$$$$I        .$$$7 
$$$       .7$$$$$$$$$$$$$$$$      :$$$. 
$$$       $$$$$$7$$$$$$$$$$$$    .$$$.  
$$$        $$$   7$$$7  .$$$    .$$$.   
$$$$             $$$$7         .$$$.    
7$$$7            7$$$$        7$$$      
 $$$$$                        $$$       
  $$$$7.                       $$  (TM)     
   $$$$$$$.           .7$$$$$$  $$      
     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$      
       $$$$$$$$$$$$$$$$.                

Sending 32 (non-printable) bytes using a single Asterisk instance as TX and RX

  1. ./bin_to_int_seq.py <(dd if=/boot/vmlinuz-2.6.28-16-generic bs=32 count=1) | ./ast_send.sh 5859199474

  2. tr -d '\n' < /tmp/newest_vm.txt | ./int_seq_to_bin.py /tmp/zed

Step-by-step w/ Karmic beta in Qemu

  1. start ubuntu guest: qemu w/ -usbdevice host:0a12:0001 (adding at runtime didn't produce "found new device!" msg in guest kernel ring buffer)

  2. pair with phone: bluetooth icon -> set up new device -> etc

  3. install asterisk and its chan_mobile module: asterisk and asterisk-mobile

    • or cheat w/
      • sudo cp channels/chan_mobile.so /usr/lib/asterisk/modules/chan_mobile.so

      • sudo chown root: /usr/lib/asterisk/modules/chan_mobile.so

  4. customize sample chan_mobile cfg and move it into /etc: get sample cfg from ubuntu source pkg
    • on my blackberry curve 8330 i needed to set 'discoverable' to 'yes' in the bluetooth options
    • sudo cp src/asterisk-addons-1.6.2.0~rc1/configs/mobile.conf.sample /etc/asterisk/mobile.conf

    • sudo chown asterisk: /etc/asterisk/mobile.conf

  5. add load => chan_mobile.so to [modules] section in /etc/asterisk.modules.conf (module load chan_mobile at CLI)

  6. wajig restart asterisk

    • cell phone should say "(pc) requests HFP audio gateway. grant?"
      • {X} after i "grant" on phone, "bluetooth radio" icon on phone unlights and mobile show devices shows phone w "connected:no, state:none"

        • grant requests continue ad infinitum every 30sec

sudo /usr/sbin/asterisk -p -U asterisk -vvvvvv

    -- Bluetooth Device V330 has connected, initilizing...
    -- Error initializing Bluetooth device V330.
    -- Bluetooth Device V330 has disconnected.

I saw similar symptoms to the above with my Blackberry Curve 8330 when I also had an active BB->PC connection. Deleting the BB->PC connection solved my problem. I also "declined" the (A/V remote control) pairing request on the PC after restarting the phone.

'backport the trunk version of chan_mobile to 1.6.2' - 0015549: [patch] Initialization error in chan_mobile - Asterisk.org Issue Tracker

channels$ svn cat -r 225349 http://svn.digium.com/svn/asterisk/trunk/addons/chan_mobile.c > chan_mobile.c but why did mnicholson commit to -addons 1.6.2 branch in mid october? do i need that fix too?

Yay, after backport:

    -- Bluetooth Device V330 has connected, initializing...
    -- Bluetooth Device V330 initialized and ready.

mobile show devices shows phone w "connected:yes, state:free"

  1. obtain asterisk command line interface: sudo -u asterisk asterisk -r

First successful dialing/sending of voicemail

"Call file":

Channel: Mobile/g1/8665836913                                                   
Application: playback                                                           
Data: hello-world

Log:

    -- Attempting call on Mobile/g1/8665836913 for application playback(hello-world) (Retry 1)
       > Channel Mobile/V330-8952 was answered.
       > Launching playback(hello-world) on Mobile/V330-8952
    -- <Mobile/V330-8952> Playing 'hello-world.gsm' (language 'en')
[Oct 26 19:47:41] NOTICE[7681]: pbx_spool.c:349 attempt_thread: Call completed to Mobile/g1/8665836913

First successful recording of voicemail

  == Starting Mobile/V330-f2d2 at incoming-mobile,s,1 failed so falling back to exten 's'
  == Starting Mobile/V330-f2d2 at incoming-mobile,s,1 still failed so falling back to context 'default'
    -- Executing [s@default:1] Wait("Mobile/V330-f2d2", "10") in new stack
    -- Executing [s@default:2] Answer("Mobile/V330-f2d2", "") in new stack
    -- Executing [s@default:3] VoiceMail("Mobile/V330-f2d2", "1234@default") in new stack
    -- <Mobile/V330-f2d2> Playing 'vm-intro.gsm' (language 'en')
    -- <Mobile/V330-f2d2> Playing 'beep.gsm' (language 'en')
    -- Recording the message
    -- x=0, open writing:  /var/spool/asterisk/voicemail/default/1234/tmp/xaBp3a format: wav49, 0x7f497907ec18
    -- x=1, open writing:  /var/spool/asterisk/voicemail/default/1234/tmp/xaBp3a format: gsm, 0x7f497907e948
    -- x=2, open writing:  /var/spool/asterisk/voicemail/default/1234/tmp/xaBp3a format: wav, 0x7f497905f248
    -- User hung up

mobile.conf

[general]
interval=30             ; Number of seconds between trying to connect to device$

[adapter]
id=DBT120
address=00:1E:F0:65:FD:2B

[V330]
address=00:13:8B:71:F0:19       ; the address of the phone
port=7                          ; the rfcomm port number (from mobile search)
context=incoming-mobile         ; dialplan context for incoming calls
adapter=DBT120                  ; adapter to use
group=1                         ; this phone is in channel group 1

modules.conf

[modules]
autoload=yes
noload => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
noload => app_intercom.so
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
noload => chan_capi.so
load => res_musiconhold.so
noload => chan_alsa.so
noload => cdr_sqlite.so
noload => app_directory_odbc.so
noload => app_voicemail_odbc.so
noload => app_voicemail_imap.so
noload => res_config_odbc.so
noload => res_config_pgsql.so

noload => chan_vpb.so
load => chan_mobile.so
[global]

RXing call w/ vanilla Asterisk config in Virtualbox

[ 1387.709322] btusb_isoc_complete: hci0 corrupted SCO packet
[ 1387.709479] btusb_isoc_complete: hci0 corrupted SCO packet
[ 1387.709774] hci_scodata_packet: hci0 SCO packet for unknown connection handle 46
[ 1387.709783] hci_scodata_packet: hci0 SCO packet for unknown connection handle 0

Installing Asterisk 1.6.2 from a PPA on Jaunty

Setting up dahdi-dkms (1:2.2.0.2~dfsg-1ubuntu2~jaunty~ppa1) ...
WARNING: /usr/lib/dkms/common.postinst does not exist.
WARNING: /usr/share/dahdi-dkms/postinst does not exist.
ERROR: DKMS version is too old and dahdi-dkms was not
built with legacy DKMS support.
You must either rebuild dahdi-dkms with legacy postinst
support or upgrade DKMS to a more current version.
dpkg: error processing dahdi-dkms (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of dahdi-linux:
 dahdi-linux depends on dahdi-dkms | dahdi-source; however:
  Package dahdi-dkms is not configured yet.
  Package dahdi-source is not installed.
dpkg: error processing dahdi-linux (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dahdi:
 dahdi depends on dahdi-linux; however:
  Package dahdi-linux is not configured yet.
 dahdi depends on dahdi-dkms | dahdi-source; however:
  Package dahdi-dkms is not configured yet.
  Package dahdi-source is not installed.
dpkg: error processing dahdi (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of asterisk:
 asterisk depends on dahdi; however:
  Package dahdi is not configured yet.
dpkg: error processing asterisk (--configure):
 dependency problems - leaving uNo apport report written because the error message indicates its a followup error from a previous failure.
                                                          No apport report written because the error message indicates its a followup error from a previous failure.
    No apport report written because MaxReports is reached already
                                                                  nconfigured
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 dahdi-dkms
 dahdi-linux
 dahdi
 asterisk
E: Sub-process /usr/bin/dpkg returned an error code (1)
logged to /home/tz/misc/wajig.log

Harmless(?) kernel output

  1. Phone is connected to asterisk
  2. BT is disabled on phone

[  949.910540] btusb_isoc_complete: hci0 corrupted SCO packet
[  949.910987] hci_scodata_packet: hci0 SCO packet for unknown connection handle 45
[  949.910997] hci_scodata_packet: hci0 SCO packet for unknown connection handle 0

Testing

Enabling bluetooth on X61 Tablet

  1. Slide "RF Kill" switch to "not killed"
  2. sudo sh -c 'echo "enable" > /proc/acpi/ibm/bluetooth'

Docs

Asterisk

Blackberry

Crypto Phone/Stacked Linux-based CPhone Brainstorming/Scripted TX or RX WAV with Asterisk (last edited 2010-08-23 16:31:41 by Tyler)

All trademarks and copyrights on this page are owned by their respective owners.
Everything else copyright Tyler Oderkirk and Scott Carlson 2006-2010.
Tyler can be reached at "[FirstnameLastname]@gmail.com"