Hi,<br>I have been trying to get caller ID from a PSTN line with a Sangoma USB FXO card since past few days. I want through <a href="https://issues.asterisk.org/view.php?id=6683" target="_blank">https://issues.asterisk.org/view.php?id=6683</a> and got hints on how to proceed. I am using a Bharti PSTN line and am based in Delhi. I have been using Astersisk version 1.6.1.4. I was facing two problems:<br>
<br>1. By the time the caller id digits were received on the pstn line ss_thread had already completed detecting empty caller ID. The caller Id was being received in between the first and second ring on the line, but by that time asterisk had moved from PRERING state to RING state. <br>
<br>/* In dahdi_handle_event */<br>if (ast->_state == AST_STATE_PRERING)<br> ast_setstate(ast, AST_STATE_RING);<br><br>So I made asterisk wait for the second ring before moving from PRERING state to RING state. I am not sure if there is a better way to do this. Suggestions are welcome. I checks the SVN code I had downloaded on 18th November 2009 and it had the same issue. The patch file for the change is attached as chan_dahdi.patch. Please let me know if this is an acceptable way to do the job and if there is value in adding this to the main trunk. <br>
<br>2. The second issue was that some of the DTMF digits in the caller ID were not being detected. I looked at the DTMF log and found lines like<br><br>DTMF end '9' has duration 59 but want minimum 80, emulating on DAHDI/2-1 (I have generally seen the digit duration near 40ms)<br>
<br>and<br><br>DTMF begin ignored '1' on DAHDI/2-1<br><br>So I played around with the #defines in channel.c and settled with the values:<br>AST_DEFAULT_EMULATE_DTMF_DURATION 30<br>AST_MIN_DTMF_DURATION 30<br>AST_MIN_DTMF_GAP 25<br>
<br>At these values I could get all the DTMF digits correctly. <br>However, I do not quite understand the usage of these parameters and I am afraid I may be breaking something by changing these parameters to the above values. I would appreciate it if some one can tell me the purpose of these # defines and if this is the best way to solve my problem. <br>
<br>Thanks,<br><br>Zahir<br>