[asterisk-dev] Asterisk mishandling user busy isdn releases (Klaus Darilion)

Ken Leland III k3leland at monmouth.com
Thu Feb 7 16:05:44 CST 2008


The below approach does not work because Asterisk treats the call as an 
answered call not a busy call.
It seems as thought once Asterisk has received an ISDN CONNECT message 
the call is bridged and control will not be returned to the dialplan 
until the special hangup extension at which point it is already too late 
as the audio bridge is turned down.

I have opened a bug report on this:
http://bugs.digium.com/view.php?id=11918

Quoted from original post:
"Asterisk does not play a busy tone when it receives a USER BUSY ISDN 
RELEASE messages following an ISDN CONNECT message"
> I would try this:
> 
> exten => 123,1,Dial(.....)
> exten => 123,2,Gotoif($["${DIALSTATUS}" == "BUSY"]?3:4)
> exten => 123,3,Busy()
> exten => 123,4,Hangup()
> 
> regards
> klaus
> 
> 
> Ken Leland III schrieb:
>>  > > Hello All,
>>  > > I have found that Asterisk does not play a busy tone when it 
>> receives a
>>  > > USER BUSY ISDN RELEASE messages following an ISDN CONNECT message.
>>  > >
>>  > > Details:
>>  > > We are connecting our Asterisk PBX to a Lucent telephone switch via 
>> ISDN
>>  > > PRIs.  The telephone switch provides an authorization code feature 
>> where
>>  > >   every call originated from asterisk is immediately answered by the
>>  > > telephone switch, and prompted for an authorization code, before
>>  > > completing the call.  The sip phone registered with Asterisk dials 
>> a 10
>>  > > digit number, hears the prompt, and dials a 4-digit code.  The 
>> telephone
>>  > > switch authenticates the code and attempts to complete the call. 
>> In the
>>  > > event that the far end is available the telephone switch passes the
>>  > > ringing tones inband over the pri.  In the event that the far end is
>>  > > busy,  the telephone switch sends an ISDN RELEASE message with the
>>  > > cause: USERBUSY.  Asterisk receives the RELEASE message and sends a 
>> BYE
>>  > > message to the sip phone and a RELEASE COMPLETE back to the switch. 
>> This
>>  > > does NOT result in the user hearing a busy signal.  Instead, the user
>>  > > hears a click and dead air as if they were hung up on.
>>  > >
>>  > > Questions:
>>  > > Is there a way to configure this behavior in the dial plan?
>>
>>  > You can check DIALSTATUS after Dial() and play Busy() if the DIALSTATUS
>>  > is busy.
>>  > klaus
>> Thanks klaus,  I gave this a try, with no luck, using the following 
>> hangup extensions:
>>
>> exten => h,1,Gotoif($[${HANGUPCAUSE} = 17]?BUSY:HANGUP)
>> exten => h,n(BUSY),Playtones(busy)
>> exten => h,n(HANGUP),Hangup
>>
>> Here is some partial console output + SIP debug:
>>
>> -- Executing [h at test:1] GotoIf("SIP/testuser-10685f60", "1?BUSY:HANGUP") 
>> in new stack
>> -- Goto (test,h,2)
>> -- Executing [h at test:2] PlayTones("SIP/testuser-10685f60", "busy") in 
>> new stack
>> -- Executing [h at test:3] Hangup("SIP/testuser-10685f60", "") in new stack
>> -- Asterisk sends SIP BYE message.
>>
>> It seems whatever attempts i made at adding audio in the special 'h' 
>> hangup extension would fail.  As you can see the PlayTones("busy") is 
>> happening before the SIP BYE message but it still doesn't make it to the 
>> audio stream.  Does the Dial cmd tear down the rtp session before 
>> returning?  Did you mean for me to check the DIALSTATUS in the special 
>> hangup extension or somewhere else?
>>
>>  > >
>>  > > If not does anyone think that adding the following logic to Asterisk
>>  > > would be a useful patch?
>>  > >
>>  > > If a zap channel is bridged with a sip channel, and the zap channel
>>  > > receives a user busy RELEASE, play a busy tone inband on the sip 
>> channel.
>>  > >
>>  > > Cheers,
>> -
>> Ken W. Leland  III
>> Engineering
>> k3leland at monmouth.com
>> Monmouth Telecom
>> 10 Drs. James Parker Blvd., Suite 110
>> Red Bank, NJ  07701
>> 732-704-1000  X283



More information about the asterisk-dev mailing list