<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
entao faz assim :<br>
<div>root@chipeira:/etc/asterisk# cat dongle.sh</div>
<div>#!/bin/bash</div>
<div>LOCK=/tmp/dongle.lock</div>
<div>control_c () {</div>
<div> echo -e "\nO Script Foi Encerrado!"</div>
<div> rm $LOCK</div>
<div> exit 0</div>
<div>}</div>
<div></div>
<div>trap control_c INT HUP TERM</div>
<div></div>
<div>if [ ! -f $LOCK ]</div>
<div>then</div>
<div> touch $LOCK</div>
<div> while true</div>
<div> do</div>
<div> asterisk -rx"dongle show devices" | grep -v asterisk | cut -c 1-68 > /var/www/html/dongles.txt</div>
<div> sleep 5</div>
<div> done</div>
<div>else</div>
<div> echo "o Script ja esta em uso"</div>
<div> exit 0</div>
<div>fi</div>
<div>root@chipeira:/etc/asterisk#</div>
<div></div>
<div><br>
</div>
e coloca no teu site, pra dar um refresh a cada 5 segundo, fuciona bem.<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
<br>
<img size="15463" contenttype="image/png" style="max-width: 100%; -moz-user-select: none;" crossorigin="use-credentials" unselectable="on" src="cid:2e7721b6-a3c8-46a4-a721-e3e5cc341567"><br>
Olha como fiz o meu....<br>
<br>
</div>
<div id="signature">
<pre style="line-height:17px; white-space:normal; color:rgb(42,42,42); background-color:rgb(255,255,255)">Hudson??<br>(048) 8413-7000<br>Para quem nao cre, nenhuma prova converte,Para aquele que cre, nenhuma prova precisa.??</pre>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> asteriskbrasil-bounces@listas.asteriskbrasil.org <asteriskbrasil-bounces@listas.asteriskbrasil.org> em nome de Vanessa Sather <vanessasather@bol.com.br><br>
<b>Enviado:</b> segunda-feira, 5 de fevereiro de 2018 11:23<br>
<b>Para:</b> asteriskbrasil@listas.asteriskbrasil.org<br>
<b>Assunto:</b> Re: [AsteriskBrasil] Problemas com hint/BLF com canal dongle Yealink phones</font>
<div> </div>
</div>
<div>
<div><br>
Hudson,<br>
<br>
</div>
<div>bom dia.</div>
<div> </div>
<div>Que pena que não consigo monitorar os canais dongle.. :(</div>
<div>Tlz se fosse desenvolvido o BLF deles baseado no dongle show devices daria certo, uma vez que lá mostra em tempo real se o canal esta ou não ocupado.</div>
<div> </div>
<div>De qualquer forma obrigada.</div>
<div> </div>
<hr style="border-top:1px solid #ccc">
<div><br>
<strong>De:</strong> hudsoncardoso@hotmail.com<br>
<strong>Enviada:</strong> Domingo, 4 de Fevereiro de 2018 14:55<br>
<strong>Para:</strong> asteriskbrasil@listas.asteriskbrasil.org<br>
<strong>Assunto:</strong> [AsteriskBrasil] Problemas com hint/BLF com canal dongle Yealink phones<br>
<br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:#000000; background-color:rgba(0,0,0,0)">
<div>Ele só funciona pra SIP, dongle nao vai rolar...<br>
Olha meu exemplo...<br>
context hints{</div>
<div>// hint(SIP/${EXTEN}) _. => {noop(${EXTENSION_STATE(${EXTEN}@todos)});}</div>
<div> hint(SIP/${EXTEN}) _XXXXXXXX => {noop(${EXTENSION_STATE(${EXTEN}@todos)});}</div>
<div> hint(SIP/${EXTEN:1}) _5XXXXXXXX => {noop(${EXTENSION_STATE(${EXTEN}@todos)});}</div>
<div> //hint(SIP/${EXTEN:1}) _1XXXXXXXX => {noop(${EXTENSION_STATE(${EXTEN}@todos)});}</div>
<div>}</div>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:#000000">
</div>
<div id="x_signature">
<pre style="line-height:17px; white-space:normal; color:#2a2a2a; background-color:#ffffff">Hudson??<br>(048) 8413-7000<br>Para quem nao cre, nenhuma prova converte,Para aquele que cre, nenhuma prova precisa.??</pre>
</div>
<hr style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><span style="font-size:11pt; color:#000000; font-family:Calibri,sans-serif"><strong>De:</strong> asteriskbrasil-bounces@listas.asteriskbrasil.org <asteriskbrasil-bounces@listas.asteriskbrasil.org> em nome de Vanessa Sather
<vanessasather@bol.com.br><br>
<strong>Enviado:</strong> sexta-feira, 2 de fevereiro de 2018 15:29<br>
<strong>Para:</strong> asteriskbrasil@listas.asteriskbrasil.org<br>
<strong>Assunto:</strong> [AsteriskBrasil] Problemas com hint/BLF com canal dongle Yealink phones</span>
<div> </div>
</div>
<div>
<div>Boa tarde.</div>
<div> </div>
<div>Pessoal, estou tento um super problema para acender corretamente os leds do BLF do aparelho Yealink.</div>
<div>Ele acende mas não funciona corretamente. Observar que o problema pode vir do asterisk.</div>
<div> </div>
<div>Mesmo com o canal, por exemplo, dongle/chip-claro1 estiver desocupado e sem uso, no STATE do "core show hints" aparece como InUse</div>
<div>Se eu restarto ele volta a IDLE mas logo qndo eu faço uma chamada, ele já fica eternamente como InUSE mesmo após o hangup.</div>
<div> </div>
<div>O canal não se comporta da forma correta. Alguem já lidou com esse tipo de problema? Alguma sugestão?</div>
<div> </div>
<div>Obrigada,</div>
<div>Vanessa Sather.</div>
<div> </div>
<div> </div>
<div>
<div><span style="font-family:'courier new',courier">Asterisk 11.25.3 </span></div>
<div><span style="font-family:'courier new',courier">CentOS 7 3.10.0-693.5.2.el7.x86_64</span></div>
<div>
<div><span style="font-size:12.8px; font-family:'courier new',courier">Yealink T20P </span><span style="font-family:'courier new',courier">9.73.0.40</span></div>
</div>
<div> </div>
<div><strong><span style="font-family:'courier new',courier">extensions.conf</span></strong></div>
<div><span style="font-family:'courier new',courier">[hints]</span></div>
<div><span style="font-family:'courier new',courier">exten => *300,hint,dongle/chip-claro1</span></div>
<div><span style="font-family:'courier new',courier">exten => *a301,hint,dongle/chip-claro2</span></div>
<div> </div>
<div> </div>
<div><strong><span style="font-family:'courier new',courier">sip.conf</span></strong></div>
<div><strong><span style="font-family:'courier new',courier">[general]</span></strong></div>
<div><span style="font-family:'courier new',courier">allowsubscribe=yes</span></div>
<div><span style="font-family:'courier new',courier">subscribecontext=hints</span></div>
<div><span style="font-family:'courier new',courier">call-limit=10</span></div>
<div> </div>
<div> </div>
<div><strong><span style="font-family:'courier new',courier">ipbx*CLI> core show hints</span></strong></div>
<div> </div>
<div><span style="font-family:'courier new',courier"> -= Registered Asterisk Dial Plan Hints =-</span></div>
<div><span style="font-family:'courier new',courier"> *300@hints : dongle/chip-claro1
<strong>State:InUse </strong> Watchers 5</span></div>
<div><span style="font-family:'courier new',courier"> *301@hints : dongle/chip-claro2 State:Idle Watchers 5</span></div>
<div><span style="font-family:'courier new',courier"> 1000@demo : SIP/1000 State:Unavailable Watchers 0</span></div>
<div><span style="font-family:'courier new',courier"> 1001@demo : SIP/1001 State:Unavailable Watchers 0</span></div>
<div> </div>
<div><span style="font-family:'courier new',courier">----------------</span></div>
<div><span style="font-family:'courier new',courier">- 4 hints registered</span></div>
<div> </div>
<div> </div>
<div> </div>
<div><strong><span style="font-family:'courier new',courier">ipbx*CLI> core show channels</span></strong></div>
<div><span style="font-family:'courier new',courier">Channel Location State Application(Data)</span></div>
<div><span style="font-family:'courier new',courier">0 active channels</span></div>
<div><span style="font-family:'courier new',courier">0 active calls</span></div>
<div><span style="font-family:'courier new',courier">54 calls processed</span></div>
<div> </div>
<div> </div>
<div><span style="font-family:'courier new',courier">ipbx*CLI> dongle show devices</span></div>
<div><span style="font-family:'courier new',courier">ID Group State RSSI Mode Submode Provider Name Model Firmware </span></div>
<div><span style="font-family:'courier new',courier">chip-claro1 0 Free 14 3 2 Claro E160X 11.609.10.02.432 </span></div>
<div><span style="font-family:'courier new',courier">chip-claro2 0 Free 10 3 2 Claro E160X 11.609.10.02.432 </span></div>
<div> </div>
<div> </div>
<div> </div>
<div><strong><span style="font-family:'courier new',courier">ipbx*CLI> dongle show device state chip-claro1</span></strong></div>
<div><span style="font-family:'courier new',courier">-------------- Status -------------</span></div>
<div><span style="font-family:'courier new',courier"> Device : chip-claro1</span></div>
<div><span style="font-family:'courier new',courier"> State : Free</span></div>
<div><span style="font-family:'courier new',courier"> Audio : /dev/ttyUSB1</span></div>
<div><span style="font-family:'courier new',courier"> Data : /dev/ttyUSB2</span></div>
<div><span style="font-family:'courier new',courier"> Voice : Yes</span></div>
<div><span style="font-family:'courier new',courier"> SMS : Yes</span></div>
<div><span style="font-family:'courier new',courier"> Manufacturer : huawei</span></div>
<div><span style="font-family:'courier new',courier"> Model : E160X</span></div>
<div><span style="font-family:'courier new',courier"> Firmware : 11.609.10.02.432</span></div>
<div><span style="font-family:'courier new',courier"> IMEI : </span></div>
<div><span style="font-family:'courier new',courier"> IMSI : </span></div>
<div><span style="font-family:'courier new',courier"> GSM Registration Status : Registered, roaming</span></div>
<div><span style="font-family:'courier new',courier"> RSSI : 14, -117 dBm</span></div>
<div><span style="font-family:'courier new',courier"> Mode : GSM/GPRS</span></div>
<div><span style="font-family:'courier new',courier"> Submode : GPRS</span></div>
<div><span style="font-family:'courier new',courier"> Provider Name : Claro</span></div>
<div><span style="font-family:'courier new',courier"> Location area code : 142</span></div>
<div><span style="font-family:'courier new',courier"> Cell ID : 4E8C</span></div>
<div><span style="font-family:'courier new',courier"> Subscriber Number : </span></div>
<div><span style="font-family:'courier new',courier"> SMS Service Center : </span></div>
<div><span style="font-family:'courier new',courier"> Use UCS-2 encoding : Yes</span></div>
<div><span style="font-family:'courier new',courier"> USSD use 7 bit encoding : Yes</span></div>
<div><span style="font-family:'courier new',courier"> USSD use UCS-2 decoding : No</span></div>
<div><span style="font-family:'courier new',courier"> Tasks in queue : 0</span></div>
<div><span style="font-family:'courier new',courier"> Commands in queue : 0</span></div>
<div><span style="font-family:'courier new',courier"> Call Waiting : Disabled</span></div>
<div><span style="font-family:'courier new',courier"> Current device state : start</span></div>
<div><span style="font-family:'courier new',courier"> Desired device state : start</span></div>
<div><span style="font-family:'courier new',courier"> When change state : now</span></div>
<div><span style="font-family:'courier new',courier"> Calls/Channels : 0</span></div>
<div><span style="font-family:'courier new',courier"> Active : 0</span></div>
<div><span style="font-family:'courier new',courier"> Held : 0</span></div>
<div><span style="font-family:'courier new',courier"> Dialing : 0</span></div>
<div><span style="font-family:'courier new',courier"> Alerting : 0</span></div>
<div><span style="font-family:'courier new',courier"> Incoming : 0</span></div>
<div><span style="font-family:'courier new',courier"> Waiting : 0</span></div>
<div><span style="font-family:'courier new',courier"> Releasing : 0</span></div>
<div><span style="font-family:'courier new',courier"> Initializing : 0</span></div>
</div>
<div> </div>
</div>
<div>_______________________________________________<br>
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1<br>
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7<br>
Intercomunicador e acesso remoto via rede IP e telefones IP<br>
Conheça todo o portfólio em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a><br>
_______________________________________________<br>
Para remover seu email desta lista, basta enviar um email em branco para asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</div>
</div>
</body>
</html>