CID (callerid) reception gets timeout in Japan


If this is not a forum to post the following question, please let me know.

I’ve recently started to use Asterisk. I’m using TDM400 FXO with a Japan (NTT) analog line. I’ve found that it often failed (or timeout) after correctly demodulated CID. It seems it is waiting for ringer for 4000 ms.

In the Asterisk 11.5.0, we see the following code in the channels/sig_analog.c

2511 /* Finished with Caller*ID, now wait for a ring to make sure there really is a call coming */ 2512 off_start = ast_tvnow(); 2513 off_ms = 4000;/* This is a typical OFF time between rings. */ 2514 while ((ms = ast_remaining_ms(off_start, off_ms))) { 2515 struct ast_frame *f; 2516 2517 res = ast_waitfor(chan, ms); 2518 if (res <= 0) { 2519 ast_log(LOG_WARNING, "CID timed out waiting for ring. " 2520 "Exiting simple switch\n"); 2521 ast_hangup(chan); 2522 goto quit; 2523 } 2524 if (!(f = ast_read(chan))) { 2525 ast_log(LOG_WARNING, "Hangup received waiting for ring. Exiting simple switch\n"); 2526 ast_hangup(chan); 2527 goto quit; 2528 } 2529 ast_frfree(f); 2530 if (ast_channel_state(chan) == AST_STATE_RING || 2531 ast_channel_state(chan) == AST_STATE_RINGING) 2532 break; /* Got ring */ 2533 }

It frequently timeouts and see “CID timed out waiting for ring. Exiting simple switch.”

I suspected that ringer was actually delayed, but it was not true. But I don’t correctly understand what the 4000 ms corresponds to. I will paste the signal pattern below. Does anybody have a suggestion? Should we extend the timeout?

Atsushi Yokoyama (Tokyo Japan)