Jim Duda
2008-Nov-11 00:34 UTC
[asterisk-users] What makes TDM400 FXS Connection to TELCO go into Off Hook State?
I've been having trouble with making outbound calls to my TELCO from a TDM400 card (FXS KS signalling) after upgrading from 1.6-beta9 to 1.6.0. The problem is completely intermittent. When it fails, I get this message: [Nov 9 19:12:26] WARNING[18916] app_dial.c: Unable to create channel of type 'DAHDI' (cause 0 - Unknown) At some point, it starts working, but I don't know what is triggering asterisk to start working. But I have a theory below. I have instrumented the code with debugging and narrowed it down to some code in chan_dahdi where it appears to be checking for hookstate. I can actually resolve this issue by changing a return code in the available function in chan_dahdi.c This led me to look at dahdi show channel 4 It appears that when outbound calls are working, the Hookstate displays Offhook. It appears that when outobund calls are not working, the Hookstate displays Onhook. Can anyone tell me what the normal state of an FXS line attached to a standard TELCO should be when no call is in progress and when a call is in progress? Can anyone tell me what causes an FXS line attached to a standard TELCO to transition to Off Hook state? It seems to me that the state would transition between off hook and on hook as a call is in progress or idle respectively. Thanks, Jim asterisk*CLI> dahdi show channel 4 Channel: 4LI> File Descriptor: 21 Span: 1 Extension: Dialing: no Context: incoming Caller ID: Calling TON: 0 Caller ID name: Mailbox: 100 Destroy: 0 InAlarm: 0 Signalling Type: FXS Kewlstart Radio: 0 Owner: <None> Real: <None> Callwait: <None> Threeway: <None> Confno: -1 Propagated Conference: -1 Real in conference: 0 DSP: no Busy Detection: no TDD: no Relax DTMF: no Dialing/CallwaitCAS: 0/0 Default law: ulaw Fax Handled: no Pulse phone: no DND: no Echo Cancellation: 128 taps (unless TDM bridged) currently OFF Actual Confinfo: Num/0, Mode/0x0000 Actual Confmute: No Hookstate (FXS only): Offhook --> Working State My chan_dahdi.conf: ;[pstn] mailbox=100 mwimonitor=fsk mwilevel=512 mwimonitornotify=/usr/local/sbin/zapnotify.sh faxdetect=incoming signalling=fxs_ks context=incoming callwaiting=yes callwaitingcallerid=yes echocancel=yes echotraining=no echocancelwhenbridged=no channel => 4 ;[fax] ; FAX machine connected here faxdetect=no signalling=fxo_ks context=internal channel => 1
Tzafrir Cohen
2008-Nov-11 10:02 UTC
[asterisk-users] What makes TDM400 FXS Connection to TELCO go into Off Hook State?
On Mon, Nov 10, 2008 at 07:34:34PM -0500, Jim Duda wrote:> I've been having trouble with making outbound calls to my > TELCO from a TDM400 card (FXS KS signalling) after upgrading > from 1.6-beta9 to 1.6.0. The problem is completely intermittent. > > When it fails, I get this message: > [Nov 9 19:12:26] WARNING[18916] app_dial.c: Unable to create channel of type 'DAHDI' (cause 0 - Unknown)Can you enable debug logging? Do you see any message about the casue for that?> > At some point, it starts working, but I don't know what is > triggering asterisk to start working. But I have a theory below. > > I have instrumented the code with debugging and narrowed it > down to some code in chan_dahdi where it appears to be checking > for hookstate. I can actually resolve this issue by changing > a return code in the available function in chan_dahdi.c > > This led me to look at dahdi show channel 4 > > It appears that when outbound calls are working, > the Hookstate displays Offhook. > > It appears that when outobund calls are not working, > the Hookstate displays Onhook. > > Can anyone tell me what the normal state of an FXS line attached > to a standard TELCO should be when no call is in progress and > when a call is in progress? > > Can anyone tell me what causes an FXS line attached to a > standard TELCO to transition to Off Hook state? It seems > to me that the state would transition between off hook and > on hook as a call is in progress or idle respectively. > > Thanks, > > Jim > > asterisk*CLI> dahdi show channel 4 > Channel: 4LI> > File Descriptor: 21 > Span: 1 > Extension: > Dialing: no > Context: incoming > Caller ID: > Calling TON: 0 > Caller ID name: > Mailbox: 100 > Destroy: 0 > InAlarm: 0 > Signalling Type: FXS Kewlstart > Radio: 0 > Owner: <None> > Real: <None> > Callwait: <None> > Threeway: <None> > Confno: -1 > Propagated Conference: -1 > Real in conference: 0 > DSP: no > Busy Detection: no > TDD: no > Relax DTMF: no > Dialing/CallwaitCAS: 0/0 > Default law: ulaw > Fax Handled: no > Pulse phone: no > DND: no > Echo Cancellation: > 128 taps > (unless TDM bridged) currently OFF > Actual Confinfo: Num/0, Mode/0x0000 > Actual Confmute: No > Hookstate (FXS only): Offhook --> Working State > > > My chan_dahdi.conf: > > ;[pstn] > mailbox=100 > mwimonitor=fsk > mwilevel=512 > mwimonitornotify=/usr/local/sbin/zapnotify.sh > faxdetect=incoming > signalling=fxs_ks > context=incoming > callwaiting=yes > callwaitingcallerid=yes > echocancel=yes > echotraining=no > echocancelwhenbridged=no > channel => 4 > > ;[fax] > ; FAX machine connected here > faxdetect=no > signalling=fxo_ks > context=internal > channel => 1-- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir