<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: 11pt; color: rgb(0, 0, 0);">
Lista, tinha faltado criatividade aqui e eu consegui resolver com um simples shell script.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
#------------------------------------------------------------------------------------------------------------------------</div>
<div id="signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:10pt; color:#000000; font-family:Arial,Helvetica,sans-serif">
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><span>#!/bin/bash<br>
</span></p>
<div><br>
</div>
<div>VERIFICATRONCO=`/usr/sbin/asterisk -rx &quot;iax2 show channels&quot; | grep &quot;iax1&quot; | wc -l`<br>
</div>
<div>TRONCOOCUPADO=&quot;1&quot;<br>
</div>
<div><br>
</div>
<div>if [ &quot;${VERIFICATRONCO}&quot; = ${TRONCOOCUPADO} ]; then<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; # Tronoco em uso... :(<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; exit<br>
</div>
<div>fi<br>
</div>
<div><br>
</div>
<div>echo &quot;Tronco não está em uso...&nbsp; :)&quot;<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><span style="font-family: Arial, Helvetica, sans-serif; font-size: 11pt;">#------------------------------------------------------------------------------------------------------------------------</span><br>
</div>
<div style="margin: 0px; font-size: 16px; font-family: &quot;Segoe UI&quot;, &quot;Segoe UI Web (West European)&quot;, &quot;Segoe UI&quot;, -apple-system, BlinkMacSystemFont, Roboto, &quot;Helvetica Neue&quot;, sans-serif; color: rgb(51, 51, 51)">
<div dir="ltr" style="margin: 0px; font-size: 10pt; font-family: Arial, Helvetica, sans-serif; color: rgb(0, 0, 0)">
<br>
</div>
</div>
<br>
<p></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><span style="font-size:11pt; color:rgb(117,123,128)">Att,</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><span style="font-size:11pt; color:rgb(117,123,128)">Samuel</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><br>
</p>
</div>
</div>
<div id="appendonsend"></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 &lt;asteriskbrasil-bounces@listas.asteriskbrasil.org&gt; em nome de Samuel . &lt;lista.asterisk.brasil@outlook.com&gt;<br>
<b>Enviado:</b> quarta-feira, 23 de janeiro de 2019 12:49<br>
<b>Para:</b> Lista Asterisk BR<br>
<b>Assunto:</b> [AsteriskBrasil] .call</font>
<div>&nbsp;</div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Olá, Lista!</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Estou desenvolvendo um pequeno sistema de cobrança usando Asterisk e arquivos .call, mas estou enfrentando problema de tronco ocupado quando excedo a quantidade de troncos disponíveis para uso.&nbsp;</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Existe algum meio de configurar algo no Asterisk para que gere o .call somente quando o tronco estiver livre ou algo parecido?</div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:10pt; color:#000000; font-family:Arial,Helvetica,sans-serif">
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><span style="font-size:11pt; color:rgb(117,123,128)">Att,</span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><span style="font-size:11pt; color:rgb(117,123,128)">Samuel&nbsp;</span></p>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0px; margin-bottom:0px; margin-top:0; margin-bottom:0"><br>
</p>
</div>
</div>
</div>
</body>
</html>