[asterisk-bugs] [Asterisk 0009660]: [patch]Asterisk can't establish dialtone after brief hangup

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Nov 5 09:07:13 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9660 
====================================================================== 
Reported By:                mmacvicar
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   9660
Category:                   Channels/chan_zap
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.4.4 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             05-03-2007 14:08 CDT
Last Modified:              11-05-2007 09:07 CST
====================================================================== 
Summary:                    [patch]Asterisk can't establish dialtone after brief
hangup
Description: 
Asterisk can't establish dialtone after brief hangup

When I press the hook-switch (i.e., receiver button) and then let go to
make a new call, the phone doesn't establish dialtone unless I hold it down
for for 4-5 seconds.

Reproducible Steps:
1. Pick up handset and establish dialtone.
2. Press the hook-switch for 1-3 seconds and let go

After letting go of the hookswitch, the sound on the line is silent for a
moment then a computerized squeal is heard briefly and silence continues.
The asterisk console displays the following messages when "core set verbose
10":
--------------------
    -- Starting simple switch on 'Zap/7-1'
    -- Hungup 'Zap/7-1'
[May  3 11:31:45] WARNING[2241]: chan_zap.c:1616 zt_set_hook: zt hook
failed: Device or resource busy
--------------------

We are using analog Astra Telecom 480e phones connected through internal
wiring to TDM400P cards in our asterisk server.


======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0010364 Inbound FEATB calls not working with ch...
related to          0010360 E&M Wink trucks no longer interpret...
====================================================================== 

---------------------------------------------------------------------- 
 meneault - 11-05-07 09:07  
---------------------------------------------------------------------- 
If I could have my say... I don't suffer this problem but I may be of some
help.
Apparently the problem is only related to zaptel and not asterisk.
I guess you are all using kewlstart signalling on your FXS channels,
aren't you?

Ok so the problem lies in two things:
- the flash mechanism which by default is 1250 ms (so an onhook event
would go unoticed by zaptel if you switch off-hook on-hook off-hook too
fast), you can override this setting under zapata.conf with rxflash.
So unless you change this setting you would have to wait for more than 1
sec before attempting a new off-hook sequence.

- And if you are using kewlstart signalling you would have to wait 800
msec more. And this is due to a bug of zaptel... When asterisk makes its
ioctl (ZT_HOOK ZT_ONHOOK) the driver is told to drop the battery on the
line during 500ms at least and then wait 300ms more to be idle...And even
we your TE is already on-hook (this is the bug).

So we have something like that:
- take off-hook (wait debounce= 600 ms)
- goes back on-hook (wait rxflash = 1250ms)
	=> gets noticed by asterisk (some more ms)
		=> zt_hangup called => ioctl ZT_HOOK ZT_ONHOOK
			=> kewl start is made (800ms to wait)
                           (kewlstart shouldn't be made here....)
if you try to go off-hook when in kewlstart you get the busy message!

So two things:
- try to lower the value of rxflash if you want to (otherwise don't expect
to do your off-hook on-hook off-hook too fast).
- apply my patch zaptel-base-c_patch_1_4_rev3121 on revision 3121 branch
1.4 (this is one of the latest available).
If you don't want to apply the patch you probably could try loop start
signalling instead of kewlstart.

Now you shouldn't have to make an asterisk patch anymore.

Note:
I haven't tested my patch because I don't use kewlstart on my FXS lines.
So please try it and give feedback -- it could avoid to patch asterisk and
it may also avoid other race conditions because of kewlstart mishandling. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-05-07 09:07  meneault       Note Added: 0073098                          
======================================================================




More information about the asterisk-bugs mailing list