<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Qué tal Marcelo, tienes que hacer un poco de investigación en los logs para poder determinar el tiempo en el mf_threshold que requieres para que funcione, lo que yo hice fue analizar llamadas en las que yo sabía qué número era el que debería marcarse, busqué en el log del R2 la llamada de acuerdo al canal y tuve que tomar el tiempo en mseg entre cada dígito recibido, promedio entre dígitos era de 180-200 mseg pero había ocasiones que llegaba a ser hasta de 120 mseg. Cuando un número era "repetido" regularmente el tiempo entre el dígito anterior y este repetido era muy bajo, en mi caso era desde 40 a 80 mseg, por eso el mf_threshold lo puse en 90 para evitar esos dígitos repetidos pero no descartar alguno que fuera válido y que tuviera un tiempo bajo como 100 mseg.<br><br>Como ejemplo te pongo el log de una llamada obtenida a partir del archivo de debug del R2:<br><br>[17:51:50:796] [Thread: 3073014672] [Chan 5] - Call started at Wed Jun 26 17:51:50 2013 on chan 5 [openr2 version 1.3.1, revision exported]<br>[17:51:50:796] [Thread: 3073014672] [Chan 5] - Initialized R2 MF detector<br>[17:51:50:796] [Thread: 3073014672] [Chan 5] - CAS Tx >> [SEIZE ACK] 0x0C<br>[17:51:50:796] [Thread: 3073014672] [Chan 5] - CAS Raw Tx >> 0x0D<br>--> [17:51:51:487] [Thread: 3073014672] [Chan 5] - MF Rx << 0 [ON]<br>[17:51:51:487] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 0<br>[17:51:51:487] [Thread: 3073014672] [Chan 5] - Cannot cancel timer 0<br>[17:51:51:487] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 0<br>[17:51:51:487] [Thread: 3073014672] [Chan 5] - DNIS so far: 0, expected length: 13<br>[17:51:51:487] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:51:487] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:51:487] [Thread: 3073014672] [Chan 5] - scheduled timer id 2 (mf_back_cycle)<br>[17:51:51:587] [Thread: 3073014672] [Chan 5] - MF Rx << 0 [OFF]<br>[17:51:51:587] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:51:687] [Thread: 3073014672] [Chan 5] - MF Rx << 1 [ON]<br>[17:51:51:687] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 2<br>[17:51:51:687] [Thread: 3073014672] [Chan 5] - timer id 2 found, cancelling it now<br>[17:51:51:687] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 1<br>[17:51:51:687] [Thread: 3073014672] [Chan 5] - DNIS so far: 01, expected length: 13<br>[17:51:51:687] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:51:687] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:51:687] [Thread: 3073014672] [Chan 5] - scheduled timer id 3 (mf_back_cycle)<br>[17:51:51:767] [Thread: 3073014672] [Chan 5] - MF Rx << 1 [OFF]<br>[17:51:51:767] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:51:867] [Thread: 3073014672] [Chan 5] - MF Rx << 7 [ON]<br>[17:51:51:867] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 3<br>[17:51:51:867] [Thread: 3073014672] [Chan 5] - timer id 3 found, cancelling it now<br>[17:51:51:867] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 7<br>[17:51:51:867] [Thread: 3073014672] [Chan 5] - DNIS so far: 017, expected length: 13<br>[17:51:51:867] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:51:867] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:51:867] [Thread: 3073014672] [Chan 5] - scheduled timer id 4 (mf_back_cycle)<br>[17:51:51:947] [Thread: 3073014672] [Chan 5] - MF Rx << 7 [OFF]<br>[17:51:51:947] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:52:047] [Thread: 3073014672] [Chan 5] - MF Rx << 7 [ON]<br>[17:51:52:047] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 4<br>[17:51:52:047] [Thread: 3073014672] [Chan 5] - timer id 4 found, cancelling it now<br>[17:51:52:047] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 7<br>[17:51:52:047] [Thread: 3073014672] [Chan 5] - DNIS so far: 0177, expected length: 13<br>[17:51:52:047] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:52:047] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:52:047] [Thread: 3073014672] [Chan 5] - scheduled timer id 5 (mf_back_cycle)<br>[17:51:52:147] [Thread: 3073014672] [Chan 5] - MF Rx << 7 [OFF]<br>[17:51:52:147] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:52:247] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [ON]<br>[17:51:52:247] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 5<br>[17:51:52:247] [Thread: 3073014672] [Chan 5] - timer id 5 found, cancelling it now<br>[17:51:52:247] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 9<br>[17:51:52:247] [Thread: 3073014672] [Chan 5] - DNIS so far: 01779, expected length: 13<br>[17:51:52:247] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:52:247] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:52:247] [Thread: 3073014672] [Chan 5] - scheduled timer id 6 (mf_back_cycle)<br>[17:51:52:327] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [OFF]<br>[17:51:52:327] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:52:427] [Thread: 3073014672] [Chan 5] - MF Rx << 7 [ON]<br>[17:51:52:427] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 6<br>[17:51:52:427] [Thread: 3073014672] [Chan 5] - timer id 6 found, cancelling it now<br>[17:51:52:427] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 7<br>[17:51:52:427] [Thread: 3073014672] [Chan 5] - DNIS so far: 017797, expected length: 13<br>[17:51:52:427] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:52:427] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:52:427] [Thread: 3073014672] [Chan 5] - scheduled timer id 7 (mf_back_cycle)<br>[17:51:52:527] [Thread: 3073014672] [Chan 5] - MF Rx << 7 [OFF]<br>[17:51:52:527] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:52:627] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [ON]<br>[17:51:52:627] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 7<br>[17:51:52:627] [Thread: 3073014672] [Chan 5] - timer id 7 found, cancelling it now<br>[17:51:52:627] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 9<br>[17:51:52:627] [Thread: 3073014672] [Chan 5] - DNIS so far: 0177979, expected length: 13<br>[17:51:52:627] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:52:627] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:52:627] [Thread: 3073014672] [Chan 5] - scheduled timer id 8 (mf_back_cycle)<br>[17:51:52:707] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [OFF]<br>[17:51:52:707] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:52:807] [Thread: 3073014672] [Chan 5] - MF Rx << 6 [ON]<br>[17:51:52:807] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 8<br>[17:51:52:807] [Thread: 3073014672] [Chan 5] - timer id 8 found, cancelling it now<br>[17:51:52:807] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 6<br>[17:51:52:807] [Thread: 3073014672] [Chan 5] - DNIS so far: 01779796, expected length: 13<br>[17:51:52:807] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:52:807] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:52:807] [Thread: 3073014672] [Chan 5] - scheduled timer id 9 (mf_back_cycle)<br>[17:51:52:887] [Thread: 3073014672] [Chan 5] - MF Rx << 6 [OFF]<br>[17:51:52:887] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:52:967] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [ON]<br>[17:51:52:967] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 9<br>[17:51:52:967] [Thread: 3073014672] [Chan 5] - timer id 9 found, cancelling it now<br>[17:51:52:967] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 9<br>[17:51:52:967] [Thread: 3073014672] [Chan 5] - DNIS so far: 017797969, expected length: 13<br>[17:51:52:967] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:52:967] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:52:967] [Thread: 3073014672] [Chan 5] - scheduled timer id 10 (mf_back_cycle)<br>[17:51:52:987] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [OFF]<br>[17:51:52:987] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>-->--> [17:51:53:007] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [ON]<br>[17:51:53:007] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 10<br>[17:51:53:007] [Thread: 3073014672] [Chan 5] - timer id 10 found, cancelling it now<br>[17:51:53:007] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 9<br>[17:51:53:007] [Thread: 3073014672] [Chan 5] - DNIS so far: 0177979699, expected length: 13<br>[17:51:53:007] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:53:007] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:53:007] [Thread: 3073014672] [Chan 5] - scheduled timer id 11 (mf_back_cycle)<br>[17:51:53:087] [Thread: 3073014672] [Chan 5] - MF Rx << 9 [OFF]<br>[17:51:53:087] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:53:187] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [ON]<br>[17:51:53:187] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 11<br>[17:51:53:187] [Thread: 3073014672] [Chan 5] - timer id 11 found, cancelling it now<br>[17:51:53:187] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 2<br>[17:51:53:187] [Thread: 3073014672] [Chan 5] - DNIS so far: 01779796992, expected length: 13<br>[17:51:53:187] [Thread: 3073014672] [Chan 5] - Requesting next DNIS with signal 0x31.<br>[17:51:53:187] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:53:187] [Thread: 3073014672] [Chan 5] - scheduled timer id 12 (mf_back_cycle)<br>[17:51:53:247] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [OFF]<br>[17:51:53:247] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:53:347] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [ON]<br>[17:51:53:347] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 12<br>[17:51:53:347] [Thread: 3073014672] [Chan 5] - timer id 12 found, cancelling it now<br>[17:51:53:347] [Thread: 3073014672] [Chan 5] - Getting DNIS digit 2<br>[17:51:53:347] [Thread: 3073014672] [Chan 5] - DNIS so far: 017797969922, expected length: 13<br>[17:51:53:347] [Thread: 3073014672] [Chan 5] - User requested us to stop getting DNIS!<br>[17:51:53:347] [Thread: 3073014672] [Chan 5] - MF Tx >> 6 [ON]<br>[17:51:53:347] [Thread: 3073014672] [Chan 5] - scheduled timer id 13 (mf_back_cycle)<br>[17:51:53:427] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [OFF]<br>[17:51:53:427] [Thread: 3073014672] [Chan 5] - MF Tx >> 6 [OFF]<br>--> [17:51:53:527] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [ON]<br>[17:51:53:527] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 13<br>[17:51:53:527] [Thread: 3073014672] [Chan 5] - timer id 13 found, cancelling it now<br>[17:51:53:527] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:53:527] [Thread: 3073014672] [Chan 5] - scheduled timer id 14 (mf_back_cycle)<br>[17:51:53:627] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [OFF]<br>[17:51:53:627] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>--> [17:51:53:747] [Thread: 3073014672] [Chan 5] - MF Rx << F [ON]<br>[17:51:53:747] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 14<br>[17:51:53:747] [Thread: 3073014672] [Chan 5] - timer id 14 found, cancelling it now<br>[17:51:53:747] [Thread: 3073014672] [Chan 5] - Got end of ANI<br>[17:51:53:747] [Thread: 3073014672] [Chan 5] - Requesting change to Group II with signal 0x33<br>[17:51:53:747] [Thread: 3073014672] [Chan 5] - MF Tx >> 3 [ON]<br>[17:51:53:747] [Thread: 3073014672] [Chan 5] - scheduled timer id 15 (mf_back_cycle)<br>[17:51:53:847] [Thread: 3073014672] [Chan 5] - MF Rx << F [OFF]<br>[17:51:53:847] [Thread: 3073014672] [Chan 5] - MF Tx >> 3 [OFF]<br>[17:51:53:947] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [ON]<br>[17:51:53:947] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 15<br>[17:51:53:947] [Thread: 3073014672] [Chan 5] - timer id 15 found, cancelling it now<br>[17:51:53:947] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [ON]<br>[17:51:53:947] [Thread: 3073014672] [Chan 5] - scheduled timer id 16 (mf_back_cycle)<br>[17:51:54:047] [Thread: 3073014672] [Chan 5] - MF Rx << 2 [OFF]<br>[17:51:54:047] [Thread: 3073014672] [Chan 5] - MF Tx >> 1 [OFF]<br>[17:51:54:047] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 16<br>[17:51:54:047] [Thread: 3073014672] [Chan 5] - timer id 16 found, cancelling it now<br>[17:51:54:047] [Thread: 3073014672] [Chan 5] - scheduled timer id 17 (r2_answer_delay)<br>[17:51:54:207] [Thread: 3073014672] [Chan 5] - Attempting to cancel timer timer 17<br>[17:51:54:207] [Thread: 3073014672] [Chan 5] - timer id 17 found, cancelling it now<br>[17:51:54:207] [Thread: 3073014672] [Chan 5] - calling timer 17 (r2_answer_delay) callback<br>[17:52:04:222] [Thread: 3068345232] [Chan 5] - CAS Tx >> [ANSWER] 0x04<br>[17:52:04:222] [Thread: 3068345232] [Chan 5] - CAS Raw Tx >> 0x05<br>[17:52:22:731] [Thread: 3068345232] [Chan 5] - Bits changed from 0x00 to 0x08<br>[17:52:22:731] [Thread: 3068345232] [Chan 5] - CAS Rx << [CLEAR FORWARD] 0x08<br>[17:52:22:731] [Thread: 3068345232] [Chan 5] - Far end disconnected. Reason: Normal Clearing<br>[17:52:22:750] [Thread: 3068345232] [Chan 5] - Call ended<br>[17:52:22:750] [Thread: 3068345232] [Chan 5] - Attempting to cancel timer timer 0<br>[17:52:22:750] [Thread: 3068345232] [Chan 5] - Cannot cancel timer 0<br><br>Las líneas con flechas indican cuándo un nuevo dígito es recibido, entonces tomendo como referencia esto, tenemos lo siguiente:<br><br>Número: 017797969922<br>0 -> 1 200ms<br>1 -> 7 180ms<br>7 -> 7 180ms<br>7 -> 9 200ms<br>9 -> 7 180ms<br>7 -> 9 200ms<br>9 -> 6 180ms<br>6 -> 9 180ms<br>9 -> 9 40ms ----> Dígito repetido<br>9 -> 2 180ms<br>2 -> 2 160ms<br><br>Tienes que analizar varias llamadas para poder determinar el tiempo correcto.<br><br>Espero te sirva esta descripción.<br><br>Oscar Rocha.<br><br><br><br><div><hr id="stopSpelling">From: marceloeduardo12345678@hotmail.com<br>To: asterisk-r2@lists.digium.com<br>Date: Fri, 30 Aug 2013 21:01:38 +0000<br>Subject: [asterisk-r2] problemas con R2 con central NEC<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr"><div>Hola, los molesto con la siguiente consulta.</div><div>Tengo una elastix 2.4 conectada a una central NEC a traves de una E1 por R2 y tengo un problema similar al descripto en:</div><div><a href="http://lists.digium.com/pipermail/asterisk-r2/2013-July/002931.html" target="_blank">http://lists.digium.com/pipermail/asterisk-r2/2013-July/002931.html</a></div><div>Tanto con el ANI como con el DNIS sucede que a veces (muy frecuentemente) elastix recibe dígitos repetidos.</div><div>Por ejemplo en NEC tengo el 2500 que llama al 5288 del elastix.</div><div>Respecto al ANI a veces llega 5228 o 5528 de manera que se interpreta en forma repetida un dígito y luego se trunca al llegar a los 4 digitos totales dando el marcado erróneo.</div><div>Tambien sucede con el DNIS solo que allí obviamente el numero no es truncado, llega 25000 o 22500 por ejemplo.</div><div>Habilitando el debug no hay nada anormal, la secuencia se completa perfectamente como si el numero marcado fuera efectivamente el erroneo cuando en realidad no es así.</div><div><br></div><div>He intentado implementar la solucion descripta en:</div><div><a href="http://lists.digium.com/pipermail/asterisk-r2/2013-July/002939.html" target="_blank">http://lists.digium.com/pipermail/asterisk-r2/2013-July/002939.html</a></div><div>Modificando el <span style="font-size:12pt;">mf_threshold sin lograr solucionarlo.</span></div><div><span style="font-size:12pt;">De hecho he tratado de "forzar" el fallo para que ocurra en el 100% de los casos para confirmar si el problema es ese pero ponga el valor que ponga en </span><span style="font-size:12pt;">mf_threshold el fallo es igual, falla la mitad de las veces mas o menos (5 de 10), a veces mas, a veces menos.</span></div><div><pre>mf_threshold lo he puesto en 9, en 90, en 900, en 9000 y es lo mismo.</pre><pre><br></pre><pre>Tambien he modificado el resto de los timers del r2proto.conf uno por uno en mas y en menos (multiplicado por 10 o dividiendo por 10) sin éxito.</pre><pre>Es decir si el valor es 8000 una prueba es 80000 la otra 800.</pre><pre><br></pre><pre># Timers in milliseconds
# Use -1 to leave default, or just comment it out for that matter
timers.mf_back_cycle=1500
timers.mf_back_resume_cycle=150
timers.mf_fwd_safety=10000
timers.r2_seize=8000
timers.r2_answer=80000
timers.r2_metering_pulse=0
timers.r2_double_answer=400
timers.r2_answer_delay=150
timers.cas_persistence_check=500
timers.dtmf_start_dial=100
## misc settings ##
# time that a MF tone should persist before handling it
mf_threshold=90
</pre><pre><br></pre><pre>No puedo solucionar el problema y tampoco puedo tocar un parámetro que me de fallo 100% de los intentos como para confirmar que esto sea así.</pre><pre><br></pre><pre>Adjunto link de descarga con los logs de varios ejemplos, en todos los casos el 2500 de NEC llama al 5288 de elastix.</pre><pre>Archivos .call con error de ANI y error de DNIS descriptos en el nimbre mismo del archivo.</pre><pre><a href="https://www.hightail.com/download/bWJwZ295eFVRWUs5TE1UQw" target="_blank">https://www.hightail.com/download/bWJwZ295eFVRWUs5TE1UQw</a></pre><pre><br></pre><pre>Desde ya muy agradecido por el tiempo dispensado.</pre></div><div><br></div>                                            </div>
<br>--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-r2 mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-r2</div>                                            </div></body>
</html>