[asterisk-users] Disable transfer on all calls

Eric Wieling eric at fnords.org
Thu Apr 24 15:43:38 CDT 2008


In 1.2 it is documented in /path/to/src/asterisk/doc/README.variables, 
in 1.4 the file is called /path/to/src/asterisk/doc/channelvariables.txt

The "doc" directory is the only official source of documentation for 
Asterisk that I am aware of.  Read it.

bee.beeep at gmail.com wrote:
> Dinesh Nair пишет:
>> On Tue, 22 Apr 2008 11:54:41 +0100, Grey Man wrote:
>>   
>>> The best option is to put a SIP Proxy in front of your Asterisk sever
>>> and block REFER requests.
>>>     
>> or just comment out the block in chan_sip.c which handles the refers. 
>>
>>   
> 
> Thanks to your answers, but i found more beautiful way to do this - 
> there is some system variable __TRANSFER_CONTEXT, which defines context 
> to handle the transfered number, so you can create a new context and 
> there you can do anything with transfered call - i just hang it up.
> 
> It's really strange that this is in fact undocumented function - you can 
> find it only in comments on wiki at voip-info.org. Man there said that 
> he found this variable while hacking source code of asterisk:
> 
> $ grep -R TRANSFER_CONTEXT /usr/src/asterisk-1.2.15/
> /usr/src/asterisk-1.2.15/channels/chan_sip.c: *transfercontext = 
> pbx_builtin_getvar_helper(sip_pvt->owner, "TRANSFER_CONTEXT");
> /usr/src/asterisk-1.2.15/doc/README.variables:${TRANSFER_CONTEXT} 
> Context for transferred calls
> /usr/src/asterisk-1.2.15/ChangeLog: * channels/chan_sip.c: chan_sip did 
> not use the TRANSFER_CONTEXT
> /usr/src/asterisk-1.2.15/res/res_features.c: if 
> (!(transferer_real_context = pbx_builtin_getvar_helper(transferee, 
> "TRANSFER_CONTEXT")) &&
> /usr/src/asterisk-1.2.15/res/res_features.c: !(transferer_real_context = 
> pbx_builtin_getvar_helper(transferer, "TRANSFER_CONTEXT"))) {
> /usr/src/asterisk-1.2.15/res/res_features.c: if 
> (!(transferer_real_context=pbx_builtin_getvar_helper(transferee, 
> "TRANSFER_CONTEXT")) &&
> /usr/src/asterisk-1.2.15/res/res_features.c: 
> !(transferer_real_context=pbx_builtin_getvar_helper(transferer, 
> "TRANSFER_CONTEXT"))) {
> 
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Consulting for Asterisk, Polycom, Sangoma, Digium, Cisco, LAN, WAN, QoS, 
T-1, PRI, Frame Relay, Linux, and network design.  Based near 
Birmingham, AL.  Now accepting clients worldwide.




More information about the asterisk-users mailing list