[asterisk-dev] [Code Review] Generic call forward api: ast_call_forward()

Russell Bryant russell at digium.com
Tue Jun 2 10:19:00 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/271/#review815
-----------------------------------------------------------



/trunk/include/asterisk/channel.h
<http://reviewboard.digium.com/r/271/#comment2005>

    Add \since 1.6.3



/trunk/main/channel.c
<http://reviewboard.digium.com/r/271/#comment2007>

    What about replacing the existing forwarding implementations with usage of this one?



/trunk/main/channel.c
<http://reviewboard.digium.com/r/271/#comment2006>

    You can do: S_OR(forward_context, orig->context) and then not even have to worry about checking for a zero length forward context a few lines earlier.


- Russell


On 2009-06-01 17:10:23, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/271/
> -----------------------------------------------------------
> 
> (Updated 2009-06-01 17:10:23)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The function ast_call_forward() forwards a call to an extension specified in an ast_channel's call_forward string.  After an ast_channel is called, if the channel's call_forward string is set this function can be used to forward the call to a new channel and terminate the original one.  I have included this api call in both channel.c's ast_request_and_dial() and feature.c's feature_request_and_dial().  App_dial and app_queue already contain call forward logic specific for their application and options.
> 
> 
> This addresses bug 13630.
>     https://issues.asterisk.org/view.php?id=13630
> 
> 
> Diffs
> -----
> 
>   /trunk/main/features.c 198632 
>   /trunk/main/channel.c 198632 
>   /trunk/include/asterisk/channel.h 198632 
> 
> Diff: http://reviewboard.digium.com/r/271/diff
> 
> 
> Testing
> -------
> 
> I set up Opensips to respond to a SIP INVITE with a different user.  
> 
> 1. Tested ast_call_forward in feature_request_and_dial() by directing an attended transfer to the Opensips extension.
> 2. Tested ast_call_forward in ast_request_and_dial() by using originate to create a call between a sip phone and the Opensips extension.
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list