[asterisk-dev] [Code Review]: Make blind transfers not run the 'h' extension prematurely

Mark Michelson reviewboard at asterisk.org
Fri Jan 20 17:44:03 CST 2012



> On Jan. 20, 2012, 5:43 p.m., Mark Michelson wrote:
> > /branches/1.8/main/features.c, line 4107
> > <https://reviewboard.asterisk.org/r/1685/diff/1/?file=23502#file23502line4107>
> >
> >     This flag gets cleared later in the bridge code. In the stock 1.8 branch, this is on lines 4255 and 4266.
> >     
> >     As far as I can tell, the AST_BRIDGE_HANGUP_DONT flag was created specifically for this purpose. The only place I can find where it is set, prior to this patch's introduction, is in builtin transfer code. It is set to make sure that a transferee does not have his h extension run. This does the same thing except that it applies the principal to technology-specific transfers.

This was meant to be in response to Richard's comment. Oops.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1685/#review5256
-----------------------------------------------------------


On Jan. 20, 2012, 4:54 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1685/
> -----------------------------------------------------------
> 
> (Updated Jan. 20, 2012, 4:54 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> A recent change (rev 347595) caused channel technology-specific blind transfers to fail if the called channel transferred the calling channel, and the calling channel was in a context or macro with an h extension.
> 
> Presumably, there was a pre-existing problem since the h extension was being run on the transferee channel, and the transferee channel was not being hung up in the first place. Rather, the transferer (who does not have a PBX running on his channel) was the one being hung up. With the addition of setting the softhangup flag, the problem was compounded since the channel would be hung up unexpectedly.
> 
> My change is to examine the softhangup value on the channel when a bridge is broken and set the AST_FLAG_BRIDGE_HANGUP_DONT flag on the channel if the cause of the bridge breakage is for a "fake" hangup, such as an async goto. This makes it so the h extension is not run on a channel that's actually still alive, and it makes it so that blind transfers are once again fixed.
> 
> My only hesitation with just committing this is that it means that the h extension is no longer run in situations where it once was. However, in my opinion, it was buggy to be running the h extension since the channel was not actually being hung up.
> 
> 
> This addresses bug ASTERISK-19173.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19173
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/features.c 351501 
> 
> Diff: https://reviewboard.asterisk.org/r/1685/diff
> 
> 
> Testing
> -------
> 
> Tested blind transfers using SIP phones. Worked for me. Asked reporter of ASTERISK-19173 for testing feedback as well.
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120120/73d39d37/attachment-0001.htm>


More information about the asterisk-dev mailing list