<div dir="ltr">Saludos a todos los amigos de la lista, he seguido trabajando sobre el problema aleatorio que ocurre en los canales salientes del E1 de cantv, abajo en el correo esta el planteamiento original del problema, pero en resumen, de forma aleatoria en canales aleatorios, el log de llamadas muestra esto (extracto):<div>

<br></div><div><div>Bits changed from 0x0C to 0x08</div><div>[Chan 17] - CAS Rx &lt;&lt; [0x08] 0x08</div><div>[Chan 17] - Protocol error. Reason = Invalid CAS, R2 State = Seize ACK Received, MF state = MF Engine Off, MF Group = Forward DTMF init, CAS DNIS = 4092442, ANI = 2748100, MF = 0x20</div>
<div>Posterior a esto le indica al llamante que todas las lineas están ocupadas sin intentar con otro canal. Por lo que el llamante debe colgar e intentar de nuevo</div><div>Por un tiempo el log estaba lleno de estos errores solo cuando el numero discado era Movistar (otra operadora Venezolana el patron es 0414XXXXXXX o  0424XXXXXXX), pero han ido apareciendo otros números. El técnico de CANTV coloco un analizador de protocolos y su conclusión es que aleatoriamente la central no esta enviando los tonos DTMF (la señalización saliente es DTMF) con los números discados (efectivamente no se oyen en el analizador de protocolos). A nivel de señalización esto es lo que aparentemente ocurre:</div>
<div><br></div><div>IPBX                                       CANTV</div><div>1001 ------------------------------------ 1001 (Idle)</div><div>0001 ------------------------------------ 1001</div><div>0001 ------------------------------------ 1101 (Inicio de llamada y envío de tono de invitación a marcar por parte de CANTV) (Seize) y (Seize ACK)</div>
<div>cierto tiempo</div><div>0001 ------------------------------------ 1001</div><div>0001 ------------------------------------ 1101</div><div>y nada mas pasa, sigue en este ciclo, a veces el canal se bloquea a veces vuelve a IDLE.</div>
<div><br></div><div>La tarjeta es una Sangoma A102D y ya le actualice el firmware a la ultima versión. Alguien tendrá alguna pista de que puede estar pasando? Alguien sabrá como puedo evitar que Asterisk indique que todas las lineas están ocupadas e intente por otro canal hasta que tenga éxito?</div>
<div><br></div><div>Mil gracias de antemano,</div><div><br></div><div>Rafa</div>
<div><br></div><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 4, 2013 at 12:10 PM, Rafael Angulo <span dir="ltr">&lt;<a href="mailto:rafael.angulo@tarma.com.ve" target="_blank">rafael.angulo@tarma.com.ve</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hola a todos!,<div><br></div><div>Abajo en el correo esta el planteamiento original del problema. Logre determinar que el problema no esta relacionado con ocupación de las lineas, ocurre aun cuando hay lineas disponibles. Y lo problemático es que Asterisk no trata con el siguiente canal disponible después del error sino que envía el mensaje de &quot;todas las lineas están ocupadas&quot; de vuelta al llamante. El problema ocurre aleatorio y por cualquier canal .Por favor si alguien tiene alguna pista sobre la solución, sugerencias de que probar, donde investigar o que leer, mucho lo sabría agradecer. adjunto el archivo de debug de openr2 para una llamada fallida y la configuración del chan-dahdi.conf.</div>



<div><br></div><div><div>[Chan 17] - Call started at Mon Dec 10 08:54:38 2012 on chan 17 [openr2 version 1.3.1, revision exported]</div><div>[Chan 17] - Outgoing call proceeding: ANI=2748100, DNIS=4092442, Category=National Subscriber</div>



<div>[Chan 17] - CAS Tx &gt;&gt; [SEIZE] 0x00</div><div>[Chan 17] - CAS Raw Tx &gt;&gt; 0x01</div><div>[Chan 17] - scheduled timer id 2 (r2_seize)</div><div>[Chan 17] - Bits changed from 0x08 to 0x0C</div><div>[Chan 17] - CAS Rx &lt;&lt; [SEIZE ACK] 0x0C</div>



<div>[Chan 17] - Attempting to cancel timer timer 2</div><div>[Chan 17] - timer id 2 found, cancelling it now</div><div>[Chan 17] - DTMF/R2 call acknowledge!</div><div>[Chan 17] - scheduled timer id 3 (start_dialing_dtmf)</div>



<div>[Chan 17] - scheduled timer id 4 (r2_answer)</div><div>[Chan 17] - Attempting to cancel timer timer 3</div><div>[Chan 17] - timer id 3 found, cancelling it now</div><div>[Chan 17] - calling timer 3 (start_dialing_dtmf) callback</div>



<div>[Chan 17] - Dialing 4092442 with DTMF/R2 (tone on = 50, tone off = 100)</div><div>[Chan 17] - Done with DTMF generation</div><div>[Chan 17] - Attempting to cancel timer timer 0</div><div>[Chan 17] - Cannot cancel timer 0</div>



<div>[Chan 17] - DTMF R2 call is done generating DTMF, forcing accept signal</div><div>[Chan 17] - Bits changed from 0x0C to 0x08</div><div>[Chan 17] - CAS Rx &lt;&lt; [0x08] 0x08</div><div>[Chan 17] - Protocol error. Reason = Invalid CAS, R2 State = Seize ACK Received, MF state = MF Engine Off, MF Group = Forward DTMF init, CAS DNIS = 4092442, ANI = 2748100, MF = 0x20</div>



<div>[Chan 17] - Attempting to cancel timer timer 0</div><div>[Chan 17] - Cannot cancel timer 0</div><div><br></div><div>chan_dahdi.conf</div><div><br></div><div><div>[channels]</div><div>context=default</div><div>usecallerid=yes</div>


<div>hidecallerid=no</div><div>callwaiting=yes</div><div>usecallingpres=yes</div><div>callwaitingcallerid=yes</div><div>threewaycalling=yes</div><div>transfer=yes</div><div>canpark=yes</div><div>cancallforward=yes</div><div>


callreturn=yes</div><div>echocancel=yes</div><div>echocancelwhenbridged=yes</div><div>relaxdtmf=yes</div><div>rxgain=0.0</div><div>txgain=0.0</div><div>;group=1</div><div>callgroup=1</div><div>pickupgroup=1</div><div>immediate=no</div>


<div><br></div><div>group=1</div><div>context=from-trunk</div><div>signalling=mfcr2</div><div>mfcr2_variant=ve</div><div>mfcr2_get_ani_first=yes</div><div>mfcr2_max_ani=10</div><div>mfcr2_max_dnis=4</div><div>mfcr2_immediate_accept=no</div>


<div>mfcr2_category=national_subscriber</div><div>mfcr2_call_files=yes</div><div>mfcr2_logdir=cantv</div><div>mfcr2_logging=all</div><div>mfcr2_mfback_timeout=-1</div><div>;channel =&gt; 1-15,32-46</div><div>channel =&gt; 1-15</div>


<div><br></div><div>group=2</div><div>context=from-internal</div><div>signalling=mfcr2</div><div>mfcr2_variant=ve</div><div>mfcr2_get_ani_first=yes</div><div>mfcr2_immediate_accept=yes</div><div>mfcr2_dtmf_detection=1</div>


<div>mfcr2_dtmf_dialing=1</div><div>mfcr2_max_ani=10</div><div>mfcr2_max_dnis=4</div><div>mfcr2_category=national_subscriber</div><div>mfcr2_logdir=cantv</div><div>mfcr2_logging=all</div><div>mfcr2_mfback_timeout=-1</div>


<div>channel =&gt; 17-31</div><div><br></div><div>group=3</div><div>channel =&gt; 22-31</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sat, Feb 2, 2013 at 1:30 PM,  <span dir="ltr">&lt;<a href="mailto:asterisk-r2-request@lists.digium.com" target="_blank">asterisk-r2-request@lists.digium.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



Send asterisk-r2 mailing list submissions to<br>
        <a href="mailto:asterisk-r2@lists.digium.com" target="_blank">asterisk-r2@lists.digium.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.digium.com/mailman/listinfo/asterisk-r2" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-r2</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:asterisk-r2-request@lists.digium.com" target="_blank">asterisk-r2-request@lists.digium.com</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:asterisk-r2-owner@lists.digium.com" target="_blank">asterisk-r2-owner@lists.digium.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of asterisk-r2 digest...&quot;<br>
<br>Today&#39;s Topics:<br>
<br>
   1. Failed calls E1 CANTV (Rafael Angulo)<br>
<br><br>---------- Forwarded message ----------<br>From: Rafael Angulo &lt;<a href="mailto:rafael.angulo@tarma.com.ve" target="_blank">rafael.angulo@tarma.com.ve</a>&gt;<br>To: <a href="mailto:asterisk-r2@lists.digium.com" target="_blank">asterisk-r2@lists.digium.com</a><br>



Cc: <br>Date: Fri, 1 Feb 2013 16:29:02 -0430<br>Subject: [asterisk-r2] Failed calls E1 CANTV<br><div dir="ltr">Hello everybody, <div><br></div><div>I have an E1 (CANTV VENEZUELA) configured against an elastix appliance. Elastix version is 2.3 asterisk version is 1.8.17.0 and dahdi version is 2.4.1.2. Some calls are failing to go out, writing the &quot;busy/congested&quot; message  into the log and sending the appropriate message back to the caller. I&#39;m not sure why the calling is failing, I think all the outgoing channels in the E1 are getting busy, but when I check the logs, there are some errors and I&#39;m not sure if is the regular way asterisk log when all channels in a E1 are busy or there is actually an error in the progress of the call.<div>




<br></div><div>Any help will be appreciated, right now I&#39;m saving the output of the command mfcr2 show channels executed every two seconds to monitor if all the channels get busy together at any time during the day. Attached to this email is the log with the failing calls, this same behavior happens randomly with many other channels.</div>




<div><br></div><div><div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - Requested to make call (ANI=2748100, DNIS=<a href="tel:04149898199" value="+584149898199" target="_blank">04149898199</a>, category=National Subscriber)</div>



<div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - Call started at Fri Feb  1 09:50:20 2013 on chan 22 [openr2 version 1.3.1, revision exported]</div>
<div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - Outgoing call proceeding: ANI=2748100, DNIS=<a href="tel:04149898199" value="+584149898199" target="_blank">04149898199</a>, Category=National Subscriber</div><div>



[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - CAS Tx &gt;&gt; [SEIZE] 0x00</div>
<div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - CAS Raw Tx &gt;&gt; 0x01</div><div>[Feb  1 09:50:20] VERBOSE[12104] app_dial.c:     -- Called DAHDI/g3/04149898199</div><div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: bits changed in chan 22</div>




<div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - Bits changed from 0x08 to 0x0C</div><div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - CAS Rx &lt;&lt; [SEIZE ACK] 0x0C</div><div>[Feb  1 09:50:20] DEBUG[12104] chan_dahdi.c: Chan 22 - DTMF/R2 call acknowledge!</div>




<div>[Feb  1 09:50:21] DEBUG[12104] chan_dahdi.c: Chan 22 - calling timer 3 (start_dialing_dtmf) callback</div><div>[Feb  1 09:50:21] VERBOSE[12104] chan_dahdi.c: Chan 22 - Dialing <a href="tel:04149898199" value="+584149898199" target="_blank">04149898199</a> with DTMF/R2 (tone on = 50, tone off = 100)</div>




<div>[Feb  1 09:50:22] DEBUG[12104] chan_dahdi.c: Chan 22 - Done with DTMF generation</div><div>[Feb  1 09:50:22] DEBUG[12104] chan_dahdi.c: Chan 22 - DTMF R2 call is done generating DTMF, forcing accept signal</div><div>




[Feb  1 09:50:22] VERBOSE[12104] chan_dahdi.c: MFC/R2 call has been accepted on forward channel 22</div><div>[Feb  1 09:50:22] VERBOSE[12104] app_dial.c:     -- DAHDI/22-1 is ringing</div><div>[Feb  1 09:50:22] DEBUG[12104] chan_dahdi.c: Enqueuing progress frame after R2 accept in chan 22</div>




<div>[Feb  1 09:50:22] VERBOSE[12104] app_dial.c:     -- DAHDI/22-1 is making progress passing it to SIP/116-000089f0</div><div>[Feb  1 09:50:23] DEBUG[12104] chan_dahdi.c: bits changed in chan 22</div><div>[Feb  1 09:50:23] DEBUG[12104] chan_dahdi.c: Chan 22 - Bits changed from 0x0C to 0x08</div>




<div>[Feb  1 09:50:23] DEBUG[12104] chan_dahdi.c: Chan 22 - CAS Rx &lt;&lt; [0x08] 0x08</div><div>[Feb  1 09:50:23] ERROR[12104] chan_dahdi.c: Chan 22 - Protocol error. Reason = Invalid CAS, R2 State = Seize ACK Received, MF state = MF Engine Off, MF Group = Forwar$</div>




<div>DNIS = <a href="tel:04149898199" value="+584149898199" target="_blank">04149898199</a>, ANI = 2748100, MF = 0x20</div><div>[Feb  1 09:50:23] DEBUG[12104] chan_dahdi.c: Chan 22 - CAS Tx &gt;&gt; [IDLE] 0x08</div><div>



[Feb  1 09:50:23] DEBUG[12104] chan_dahdi.c: Chan 22 - CAS Raw Tx &gt;&gt; 0x09</div>
<div>[Feb  1 09:50:23] ERROR[12104] chan_dahdi.c: MFC/R2 protocol error on chan 22: Invalid CAS</div><div>[Feb  1 09:50:23] VERBOSE[12104] chan_dahdi.c:     -- Hungup &#39;DAHDI/22-1&#39;</div><div>[Feb  1 09:50:23] VERBOSE[12104] app_dial.c:   == Everyone is busy/congested at this time (1:0/0/1)</div>




<div>[Feb  1 09:50:23] VERBOSE[12104] pbx.c:     -- Executing [s@macro-dialout-trunk:20] NoOp(&quot;SIP/116-000089f0&quot;, &quot;Dial failed for some reason with DIALSTATUS = CHANUNAVAIL$</div><div>[Feb  1 09:50:23] VERBOSE[12104] pbx.c:     -- Executing [s@macro-dialout-trunk:21] Goto(&quot;SIP/116-000089f0&quot;, &quot;s-CHANUNAVAIL,1&quot;) in new stack</div>




<div><br></div></div><div><br></div><div><br></div><div><br></div><div><br></div>-- <br>Rafael A Angulo R<br>Director Gerente<br>Tarma Consultores C.A.<br>Cel. (58)(414)106.04.73<br>Ofi. (58)(212)793.49.81<br>
<br>
</div></div>
<br>_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-r2 mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-r2" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-r2</a><span><font color="#888888"><br></font></span></blockquote></div><span><font color="#888888"><br>

<br clear="all"><div><br></div>-- <br>Rafael A Angulo R<br>

Director Gerente<br>Tarma Consultores C.A.<br>Cel. (58)(414)106.04.73<br>Ofi. (58)(212)793.49.81<br><br>
</font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Rafael A Angulo R<br>Director Gerente<br>Tarma Consultores C.A.<br>Cel. (58)(414)106.04.73<br>Ofi. (58)(212)793.49.81<br><br>
</div></div></div></div>