|Summary:||ASTERISK-14003: Last digit missing when dialing out to pstn and echotraining=yes or echotraining=xx|
|Reporter:||Rafael Angulo (rafuchoucv)||Labels:|
|Date Opened:||2009-04-22 19:25:42||Date Closed:||2011-06-07 14:08:06|
|Description:||In asterisk 18.104.22.168 and dahdi 22.214.171.124 after I activated echotraining=yes, calls to pstn through a Digium TDM400P failed because the last digit of the number I dialed was not send, I can't even hear the busy tone produced by the wrong number dialed. echocancel parameter does not make any diference|
Commenting out echotraining=yes solved the problem, but i need echotraining.
The log shows:
[Apr 22 19:30:58] DEBUG chan_dahdi.c: Dialing '04141060473'
[Apr 22 19:30:58] DEBUG chan_dahdi.c: Deferring dialing...
[Apr 22 19:30:58] DEBUG devicestate.c: Notification of state change to be queued on device/channel DAHDI/1
[Apr 22 19:30:58] VERBOSE logger.c: -- Called 1/04141060473
[Apr 22 19:30:58] DEBUG devicestate.c: Changing state for DAHDI/1 - state 2 (In use)
[Apr 22 19:30:58] DEBUG app_queue.c: Device 'DAHDI/1' changed to state '2' (In use) but we don't care because they're not a member of any queue.
[Apr 22 19:30:58] DEBUG channel.c: Set channel DAHDI/1-1 to read format gsm
[Apr 22 19:30:58] DEBUG channel.c: Set channel SIP/dfreepbx-01a081a0 to read format slin
[Apr 22 19:30:58] DEBUG channel.c: Set channel DAHDI/1-1 to write format slin
[Apr 22 19:30:59] DEBUG chan_dahdi.c: Exception on 15, channel 1
[Apr 22 19:30:59] DEBUG chan_dahdi.c: Got event Hook Transition Complete(12) on channel 1 (index 0)
[Apr 22 19:30:59] DEBUG chan_dahdi.c: Sent deferred digit string: T0414106047
at the end is the number with the last digit stripped.
****** ADDITIONAL INFORMATION ******
channel => 1-2
channel => 3
|Comments:||By: Rafael Angulo (rafuchoucv) 2009-04-22 19:33:15|
I found that changing line 2674 in chan_dahdi.c from:
p->dop.dialstr[strlen(p->dop.dialstr)-2] = '\0';
p->dop.dialstr[strlen(p->dop.dialstr)-1] = '\0';
solved the problem, but I'm not shure why, can any guru around test it and confirm the bug and the solution?
By: Tzafrir Cohen (tzafrir) 2009-05-22 16:51:46
Hi, thanks for your report!
However your patch only cures the symptom. The code you patched is intended to cut off the last digit from the dial string in case echo training is used.
The code there sets echobreak. echobreak is tested when the driver finishes dialing that string and sends up a DAHDI_EVENT_COOMPLETE event.
If all goes well, you should see in a debug trace that event recieved and then immediately after that the last digit sent. After the last digit is sent, you'll also get a DAHDI_EVENT_COMPLETE, of course, but then nothing will follow.
Which of the above actually happens?
Note that this should happen just the same even with your patched code, as you have not modified the setting of echorest and echobreak, and from the fact that your patch has effect, we know that the code that sets those two was reached.
By: Leif Madsen (lmadsen) 2009-09-18 08:54:39
I'm closing as it looks like tzafrir asked a bunch of questions, of which the reporter didn't respond back. If they are still interested in this issue, then feel free to reopen the issue and respond. Thanks!