Vous êtes sur la page 1sur 3

******************************************************************** %%% instale o Elastix padro %%% baixe e instale o pacote chan_mobile wget -c http://repo.elastix.org/elastix/2/extras/i386/RPMS/asterisk-addons-chan_ mobile-1.6.2.1-0.i386.

rpm rpm -ivh asterisk-addons-chan_mobile-1.6.2.1-0.i386.rpm %%% instale os pacotes para bluetooth yum -y install bluez-utils bluez-libs bluez-libs-devel bluez-hcidump automake au toconf subversion gcc gcc-c++ joe %%% edite o arquivo de configurao do bluetooth cp /etc/bluetooth/hcid.conf /etc/bluetooth/salvo-hcid.conf cat /dev/null > /etc/bluetooth/hcid.conf joe /etc/bluetooth/hcid.conf %%% mudar o conteudo do arquivo hcid.conf pelo abaixo options { autoinit yes; security auto; pairing multi; passkey "1234"; } device { name "pbxip"; class 0x000100; iscan enable; pscan enable; lm accept; lp rswitch,hold,sniff,park; } %%% coloque o bluetooth para inicializar automaticamente e reinicie ele. chkconfig bluetooth on service bluetooth restart %%% veja o status se est tudo ok service bluetooth status %%% veja se sua interface bluetooth est rodando e qual seu MAC Adress hcitool dev %%% crie o arquivo mobile.conf e coloque o id da sua interface joe /etc/asterisk/mobile.conf [adapter] id=blue address=00:51:74:07:D3:68 %%% parear aparelho, ligue seu celular e procure pelo Elastix, e quando solicita do

%%% digite a senha 1234 que colocamos no arquivo hcid.conf dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez/ hci0 org.bluez.Adapter.SetMode string:discoverable %%% reinicie o Elastix reboot %%% procure por seu aparelho hcitool scan %%% deve aparece algo parecido com o abaixo: Scanning ... 00:21:FE:71:EF:5C ou Scanning ... 00:3C:19:FD:F5:D5 %%% verifique sua interface hciconfig %%% execute o asterisk e dentro dele procure por seu celular asterisk -r *CLI> mobile search %%% deve aparece algo parecido com o abaixo, no meu caso eu estava com trs aparec elhos ligados: pbxip*CLI> mobile Address 00:44:FE:66:EF:5F 00:62:A9:85:7E:8F 00:3C:19:FD:F5:D5 search Name N95 LGTIM motorolaV3 Usable Yes Yes Yes Type Phone Phone Phone Port 1 2 7 motorolaV3 N95

%%% edite o mobile.conf e coloque seu celular joe /etc/asterisk/mobile.conf [N95] address=00:44:FE:66:EF:5F port=2 context=from-mobile adapter=blue %%% descaregue o chan_mobile do Asterisk module unload chan_mobile.so %%% deve aparece algo parecido com o abaixo:

Unloaded chan_mobile.so == Unregistered channel type 'Mobile' == Unregistered application 'MobileStatus' == Unregistered application 'MobileSendSMS' %%% e o recarregue novamente module load chan_mobile.so %%% deve aparece algo parecido com o abaixo: Loaded chan_mobile.so == Parsing '/etc/asterisk/mobile.conf': == Found == Registered channel type 'Mobile' (Bluetooth Mobile Device Channel Driver) == Registered application 'MobileStatus' == Registered application 'MobileSendSMS' Loaded chan_mobile.so => (Bluetooth Mobile Device Channel Driver) -- Bluetooth Device N95 has connected, initializing... -- Bluetooth Device N95 initialized and ready. -- Bluetooth Device N95 has disconnected. %%% veja o status dos aparelhos configurados mobile show devices %%% colocar no arquivo /etc/asterisk/extensions_custom.conf o que quer fazer %%% com a chamada entrante, no meu caso mandei chamar o Ramal 200 [from-mobile] exten => s,1,Answer exten => s,n,Wait(3) exten => s,n,Goto(from-did-direct,200,1) exten => s,n,Hangup

Vous aimerez peut-être aussi