[asterisk-bugs] [Asterisk 0012548]: SIP channel protocol illegally reverses direction when ringing channel AMI redirected (to parked channel)

noreply at bugs.digium.com noreply at bugs.digium.com
Fri May 2 12:52:41 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12548 
====================================================================== 
Reported By:                davidw
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12548
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 11463 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-29-2008 09:47 CDT
Last Modified:              05-02-2008 12:52 CDT
====================================================================== 
Summary:                    SIP channel protocol illegally reverses direction
when ringing channel AMI redirected (to parked channel)
Description: 
An outgoing call to a SIP channel was initiated using AMI Originate; the
first channel was a Local/ channel.  Whilst the call was still ringing, the
Local channel was AMI Redirected to a parked channel in the parking lot
(and drops out of the configuration).  A short time later, the call fails
within Asterisk, with the following diagnostics:

[Apr 27 11:09:03] WARNING[10117]: chan_sip.c:1948 retrans_pkt: Maximum
retries e
xceeded on transmission 4dd8e816320e6fac293336971fb18544 at 192.168.130.116
for seq
no 102 (Critical Response)
[Apr 27 11:09:03] WARNING[10117]: chan_sip.c:1972 retrans_pkt: Hanging up
call 4
dd8e816320e6fac293336971fb18544 at 192.168.130.116 - no reply to our critical
packe
t.

The destination phone continues to ring for some time after this.

If the call is answered before the Redirect, there is no problem.

Looking at the SIP traces indicates that Asterisk starts sending OK's (for
NOTIFY) in the same direction as it sent the NOTIFY's for the call setup. 
The called end ignores these.  If it answers after Asterisk has abandoned
it, it Asterisk ignores its OK's, in the correct direction, resulting in
the phone timing out before it considers the call dead.

====================================================================== 

---------------------------------------------------------------------- 
 davidw - 05-02-08 12:52  
---------------------------------------------------------------------- 
I've tried adding AST_FLAGS_OUTGOING into the ast_copy_flags call in
ast_do_masquerade and it certainly gets rid of the premature terminations
of the calls.  It doesn't give ringback tone though and I can't be sure
that there isn't collateral damage, as, whilst the change I've made is very
small it is possibly taking the code into unexplored territory and I don't
think I understand it well enough yet to be confident I can predict
problems.

In the end, we may choose to block this case in our user interface, if the
alternative is to use local patches.  It's a public holiday on Monday, so,
whilst I can answer from home, I can't try anything until Tuesday.

(Incidentally, the fault case for when the call was answered before it
failed is that it worked for the same time as it did for the ringing out
case, and then failed for the same reason.) 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-02-08 12:52  davidw         Note Added: 0086329                          
======================================================================




More information about the asterisk-bugs mailing list