[Home]

Summary:ASTERISK-07171: [patch] Local channels get hung on call forwards
Reporter:Terry Wilson (twilson)Labels:
Date Opened:2006-06-14 18:50:44Date Closed:2006-06-16 07:19:24
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) fix_duplicate_request.patch.txt
Description:It looks like a cut and paste error has resulted in ast_request being called twice in wait_for_answer in app_dial.c.  If you get into a call forwarding situation (like a 302 redirect from a SIP phone), this results in two sets of Local channels being created, two of which you are never able to hang up.

****** STEPS TO REPRODUCE ******

[default]
exten => 100,1,Playback(demo-congrats)
exten => 100,n,Hangup
exten => 200,1,Dial(SIP/home)
exten => 200,n,Hangup

SIP/home set to call forward to extension 100

****** ADDITIONAL INFORMATION ******

loki*CLI> dial 200@default
 == Console is full duplex
   -- Executing [200@default:1] Dial("OSS/dsp", "SIP/home") in new stack
   -- Called home
   -- Got SIP response 302 "Moved Temporarily" back from 69.17.122.227
   -- Now forwarding OSS/dsp to 'Local/100@default' (thanks to SIP/home-777e)
   -- Executing [100@default:1] Playback("Local/100@default-95c7,2", "demo-congrats") in new stack
   -- Local/100@default-95c7,1 answered OSS/dsp
<< Console call has been answered >>
   -- Playing 'demo-congrats' (language 'en')
Really destroying SIP dialog '7ee4d13808ae6bf87a90ca0c5f4cc82b@69.17.122.100' Method: INVITE
Jun 14 18:48:17 NOTICE[11255]: sched.c:287 ast_sched_del: Attempted to delete nonexistent schedule entry 7!
loki*CLI> show channels
Channel              Location             State   Application(Data)            
Local/100@default-95 100@default:1        Up      Playback(demo-congrats)      
Local/100@default-95 s@default:1          Up      Bridged Call(OSS/dsp)        
Local/100@default-2b 100@default:1        Ring    (None)                        
Local/100@default-2b s@default:1          Down    (None)                        
OSS/dsp              200@default:1        Up      Dial(SIP/home)                
5 active channels
2 active calls
loki*CLI> hangup
<< Hangup on console >>
loki*CLI> show channels
Channel              Location             State   Application(Data)            
Local/100@default-2b 100@default:1        Ring    (None)                        
Local/100@default-2b s@default:1          Down    (None)                        
2 active channels
0 active calls
loki*CLI> soft hangup Local/100@default-2bb6,1
Requested Hangup on channel 'Local/100@default-2bb6,1'
loki*CLI> show channels
Channel              Location             State   Application(Data)            
Local/100@default-2b 100@default:1        Ring    (None)                        
Local/100@default-2b s@default:1          Down    (None)                        
2 active channels
0 active calls
Comments:By: Serge Vecher (serge-v) 2006-06-15 15:30:30

The patch fixes the issue of ghost local channels on my trunk r34307 system. Thanks

By: BJ Weschke (bweschke) 2006-06-16 07:19:24

Committed to /trunk. Thanks!