SSブログ

chan_mobile.conf設定 [asterisk]

bluetoothアダプタのアドレスを調べる
cubie@Cubian:~$ hcitool dev
Devices:
        hci0    00:1B:DC:06:49:22
cubie@Cubian:~$
hcitool scanで携帯のアドレスも調べることできるが情報が少ないのでCLIから調べることにする

携帯のblutoothをオンにしてかつ他の機器から見られるようにして
root@Cubian:~# asterisk -vvvvcr
Cubian*CLI> mobile search
Cubian*CLI>
mobile search打ち込んで直ぐにプロンプトになってしまうがあわてずにしばらく待つと
Cubian*CLI> mobile search
Address           Name                           Usable Type    Port
00:21:FE:C4:D1:2E E71                            Yes    Phone   1
3C:5A:37:B2:D5:27 Galaxy S                     Yes    Phone   1
Cubian*CLI>
アドレスとポート番号を表示する

携帯と BluetoothアダプタのMACアドレスを調べたらchan_mobile.confを修正します。

root@Cubian:/etc/asterisk# pico chan_mobile.conf
;
; chan_mobile.conf
; configuration file for chan_mobile
;
[general]
interval=30             ; Number of seconds between trying to connect to devices.

; The following is a list of adapters we use.
; id must be unique and address is the bdaddr of the adapter from hciconfig.
; Each adapter may only have one device (headset or phone) connected at a time.
; Add an [adapter] entry for each adapter you have.

[adapter]
id=corega         ;識別用にアダプタの名前をつける
address=00:1B:DC:06:49:22 ;hcitool devで調べたアドレス

[adapter]
id=planex          ;2個あればこんな感じで
address=00:90:CC:E1:58:70

[E71]                                   ;mobile serchで調べたアドレスとポート番号を
address=00:21:FE:C4:D1:2E     ; the address of the phone
port=1                                  ; the rfcomm port number (from mobile search)
context=incoming-mobile         ; dialplan context for incoming calls
adapter=corega                     ; adapter to use
group=1                               ; this phone is in channel group 1
;sms=no                               ; support SMS, defaults to yes
;nocallsetup=yes                    ; set this only if your phone reports that it supports
dtmfskip=100    ; 調整必要

[108SH]
address=34:f6:2d:8c:18:5d       ; the address of the phone
port=5                          ; the rfcomm port number (from mobile search)
context=incoming-mobile         ; dialplan context for incoming calls
adapter=planex                 ; adapter to use
group=1                         ; this phone is in channel group 1
;sms=no                         ; support SMS, defaults to yes
;nocallsetup=yes                ; set this only if your phone reports that it supports
dtmfskip=100 ; 調整必要



chan_mobileその12 bluetooth headsetをつなぐ [asterisk]

先日書いたように携帯の接続が特定の相手とならうまくいくが
IVRで切り替えるようにするとうまくいかない
bluetoothの実験ついでにヘッドセットをつないで見た。
機器はソフトバンクセレクションから購入したBT81

chan_mobile.confに
[BT-81]
address=00:08:E0:2B:74:23
port=2
adapter=corega
group=1
type=headset
を追加する。(もちろんアドレスとポートはcliで調べた値) 

[2011]
type=peer
username=BT-81
nat=yes
host=dynamic
reinvite=no
qualify=2000
callerid="BT-81" <2011>
canreinvite=yes
musicclass=default
restrictcid=yes

extensions.confに

;BT-81 HeadSet
;2011
exten => 2011,1,Answer()
exten => 2011,n,Wait(1)
exten => 2011,n,Dial(Mobile/BT-81)
exten => 2011,n,Hangup

などと設定するとヘッドセットと通話ができた
ただし、架電側は直ぐにコネクト表示し、ヘッドセット側は受電した呼び出し音が鳴っているが 架電側はヘッドセットが応答ボタンを押すまで無音なので最初はなにがおきているのかわからなかった


pc版x-liteの映像 [asterisk]

 3CXの右側のボタンを押して出てくる画面は3CXのpreferenceタグでvideo sourceを選択してからconfigureボタンを押すこと及びasterisk側で下記設定することによりPC間での画像の送受信はできた

 

sip.conf

[general]

videosupport=yes 追加

[2001]

allow=gsm

allow=h261 追加

allow=h261p 追加 


どうすりゃいいの [asterisk]

cuiのubuntuはbluetoothが動かない

guiのubuntuはdahdiが動かない

どうすりゃいいの?

dahdiのインストールは同じ事をしているつもりだけどなあ


sshインストール [asterisk]

sakura -ubuntuはsshが無かったのでsshをインストールした
apt-cache serch ssh
sudo apt-get install ssh
sudo apt-get autoremove

追記

toke-ubuntuには最初からインストールされていた 

 


この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。