[asterisk-users] What makes TDM400 FXS Connection to TELCO go into Off Hook State?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Nov 11 23:53:27 CST 2008


On Tue, Nov 11, 2008 at 07:05:23PM -0500, Jim Duda wrote:
> 
> >> 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?
> 
> Yes, I enabled logging, however, no additional logging was available.
> I instrumented the code myself with additional logging.  I have provided the code snipet 
> from chan_dahdi.c below.  It appears that my problem is caused by the TDM channel being
> in the Onhook state.  Something makes the channel go Offhook, and things begin to work
> properly.  I'm able to solve the Onhook case by changing the code to always return 1
> when Onhook, indicating Offhook.
> 
> I'm hoping someone might shed some light on the "onhook" comments here.  What causes both
> par.rxbits == -1 and par.rxisoffhook == 0?
> 
> chan_dahdi.c line 3786
> 
> if (res) {
> 	ast_log(LOG_WARNING, "Unable to check hook state on channel %d: %s\n", p->channel, strerror(errno));
> } else if ((p->sig == SIG_FXSKS) || (p->sig == SIG_FXSGS)) {
> 	/* When "onhook" that means no battery on the line, and thus
> 	  it is out of service..., if it's on a TDM card... If it's a channel
> 	  bank, there is no telling... */
> 	if (par.rxbits > -1)
> 		return 1;
> 	if (par.rxisoffhook)
> 		return 1;
> 	else {
> 	    ast_log(LOG_WARNING, "available 6c par.rxbits: %d par.rxisoffhook: %d\n", par.rxbits, par.rxisoffhook);
> //            return 0;
> 	    return 1;
> 	}

Interesting. This part was originally ifdef-ed out in chan_zap:
http://bugs.digium.com/13786

-- 
               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



More information about the asterisk-users mailing list