[asterisk-bugs] [Asterisk 0017149]: Busy(xx) exits immediately on IAX channel

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Apr 8 10:50:00 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17149 
====================================================================== 
Reported By:                jlamanna
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17149
Category:                   Applications/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           Older 1.4 - please test a newer version 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-04-08 00:30 CDT
Last Modified:              2010-04-08 10:50 CDT
====================================================================== 
Summary:                    Busy(xx) exits immediately on IAX channel
Description: 
I'm running Asterisk 1.4.26.3 and I've noticed an interesting problem
when trying to play a Busy tone over a IAX trunk from the PSTN.
It seems as though Busy(20) returns immediately (it does not
wait 20s), so the caller never hears the busy tone, but
the call just appears to hang up.
I don't believe this happens when trying to play a Busy on a SIP trunk.

The busy part of the dialplan looks like this,

exten => s-BUSY,1,Noop(Dial failed due to trunk reporting BUSY - giving
up)
exten => s-BUSY,n,Playtones(busy)
exten => s-BUSY,n,Busy(20)

The only way to remedy this is to put a Wait(20) between the
Playtones() and Busy().
Any ideas on why this only fails on IAX and not SIP?

I cannot test a later version of Asterisk because of the SIP relay bug.
====================================================================== 

---------------------------------------------------------------------- 
 (0120207) jlamanna (reporter) - 2010-04-08 10:50
 https://issues.asterisk.org/view.php?id=17149#c120207 
---------------------------------------------------------------------- 
Sorry I wasn't more clear.

Lets say you have a phone P, and 2 asterisk boxes A & B.
- A & B have an IAX trunk (to-pstn) set up between them.
- B has a PSTN connection (PRI)
- P is registered to A.

P tries to dial out, so you have executed on A:
Dial(IAX2/to-pstn/1xxxxxxxxxx)

This triggers B's dialplan to dialout to the PRI at some point:

[macro-dialout-trunk]
...
exten => s,n,Dial(Zap/g0/${NUMBER},300)
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-BUSY,1,Noop(Dial failed due to trunk reporting busy)
exten => s-BUSY,n,Playtones(busy)
exten => s-BUSY,n,Busy(20)

At this point say the Dial command returns DIALSTATUS == BUSY.
You would expect Busy(20) to wait for 20 seconds before the call is hungup
so that the caller at phone P can hear the busy tone. However, Busy(20)
returns immediately, so the caller at phone P just sees the line
disconnected and hears no busy tone.

Here is a snippet of the logfile that shows Busy(20) returning
immediately:

[Apr  7 10:03:28] VERBOSE[23882] logger.c:     -- Executing
[s-BUSY at macro-dialout-trunk:4] Busy("IAX2/w2bpstn-15047", "20") in new
stack
[Apr  7 10:03:28] VERBOSE[23882] logger.c:   == Spawn extension
(macro-dialout-trunk, s-BUSY, 4) exited non-zero on 'IAX2/w2bpstn-15047' in
macro 'dialout-trunk'

If the trunk between A & B is SIP, it does not have this problem. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-04-08 10:50 jlamanna       Note Added: 0120207                          
======================================================================




More information about the asterisk-bugs mailing list