Summary:ASTERISK-13090: Unable to Dial() through FXO port until line has rung once
Reporter:xrobau (xrobau)Labels:
Date Opened:2008-11-18 15:18:52.000-0600Date Closed:2008-11-20 10:51:35.000-0600
Versions:Frequency of
Description:It's mentioned in http://bugs.digium.com/view.php?id=13786 -- with the current versions of Asterisk and Zaptel, you can NOT Dial() an extension before the extension has rung once.


The issue seems to be in the HookState code. When the lines are 'broken', they are Hookstate: Onhook. When they're working, they're Hookstate: Offhook (even though they're NOT offhook) - it's a simple Onhook = 'I'm broken' or Offhook='I'm not broken'. It has no relevance to the actual hook state itself.

The lines aren't in alarm, and they're just coming up CHANUNAVAL without any further information. Setting them to fxsls works around it by ignoring the hook state.

Here's an attempt BEFORE the line has rung:
[Nov 18 14:51:18] VERBOSE[5225] logger.c:     -- Executing [441@from-internal:1] Dial("IAX2/190-8071", "Zap/1/0402077155") in new stack
[Nov 18 14:51:18] WARNING[5225] app_dial.c: Unable to create channel of type 'Zap' (cause 0 - Unknown)
[Nov 18 14:51:18] VERBOSE[5225] logger.c:   == Everyone is busy/congested at this time (1:0/0/1)
[Nov 18 14:51:18] DEBUG[5225] rtp.c: Channel 'IAX2/190-8071' has no RTP, not doing anything
[Nov 18 14:51:18] DEBUG[5225] app_dial.c: Exiting with DIALSTATUS=CHANUNAVAIL.

Tzafrir mentions, in that bug:
It seems to expose a bug(?) in zaptel/dahdi where chan->rxhooksig is set to RX_HOOKSIG_INITIAL at the end of chanconfig() which leaves the channel's state there "uninitialized" and even if the channel driver knows better it cannot override this decision. But I'm not sure what's the intended behaviour, so I avoid a seperate bug report on that for now.

...if that may be any help.

Comments:By: Terry Wilson (twilson) 2008-11-19 17:28:21.000-0600

Is this any different from 13786?  Why open a new bug that is a duplicate of the other?

By: Terry Wilson (twilson) 2008-11-19 17:34:01.000-0600

Closing.  We have enough open bugs w/o creating duplicates.  Just continue updating 13786.

By: xrobau (xrobau) 2008-11-20 02:09:01.000-0600

I believe it is a different issue, which is why tzafrir mentions he was going to open a seperate bug in there. I just did it for him, as I had confirmed it was a problem.

By: Terry Wilson (twilson) 2008-11-20 10:51:34.000-0600

I checked with tzafrir on IRC before closing.  He marked it as duplicate and agreed it should be closed.  I am closing again.