[asterisk-bugs] [JIRA] (ASTERISK-27443) Add a dynamic feature on callee channel

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Wed Nov 22 12:48:07 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240238#comment-240238 ] 

Richard Mudgett commented on ASTERISK-27443:
--------------------------------------------

{quote}
According to the documentation, "ActivatedBy is no longer honored. The feature is activated by which channel DYNAMIC_FEATURES includes the feature is on. Use predial to set different values of DYNAMIC_FEATURES on the channels"
{quote}

You can *already* do what you want.  To have a difference between caller and callee you cannot use channel variable inheritance.  You need to use *predial handlers* \[1] to set DYNAMIC_FEATURES on the called side like the below dialplan example:
{noformat}
exten 100,1,NoOp()
same = n,Set(DYNAMIC_FEATURES=caller side settings)
same = n,Dial(PJSIP/100,,b(predial))
same = n,Hangup()
; This pre-dial routine is executed by the called channel.  PJSIP/100-xxxxxxxx in this case.
same = n(predial),NoOp()
same = n,Set(DYNAMIC_FEATURES=called/callee side settings)
same = n,Return()
{noformat}

The reason ActivatedBy is no longer honored is because the bridging system since Asterisk 12 cannot support it.  The bridge can have more than two channels and channels can be moved from bridge to bridge so a caller and callee designation does not make much sense.

More information on dialplan handler routines can be found at \[2].

\[1] https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers
\[2] http://blogs.asterisk.org/2017/03/29/dialplan-handler-routines-allow-customization/

> Add a dynamic feature on callee channel
> ---------------------------------------
>
>                 Key: ASTERISK-27443
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27443
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>            Reporter: Thomas Sevestre
>
> I want to activate a dynamic feature on callee channel only.
> According to the documentation, "ActivatedBy is no longer honored. The feature is activated by which channel DYNAMIC_FEATURES includes the feature is on. Use predial to set different values of DYNAMIC_FEATURES on the channels" 
> https://wiki.asterisk.org/wiki/display/AST/Custom+Dynamic+Features
> With the variable inheritance system, it is not possible to set a variable on the callee channel only. With DYNAMIC_FEATURES, _DYNAMIC_FEATURES, __DYNAMIC_FEATURES caller channel will always have the feature enabled
> I've tried to add a the DYNAMIC_FEATURES variable on the callee channel after bridge, it doesn't work.
> We could add the ability to add a variable on the callee channel. for instance :
> {quote}
>     Set(*DYNAMIC_FEATURES=test)
> {quote}
> This can be implementeded in channel.c / ast_channel_inherit_variables
> by replacing this line :
> {quote}
> 		if (varname[0] == '_') {
> {quote}
> with this one :
> {quote}
> 		if (varname[0] == '_' || varname[0] == '*') {
> {quote}
> If interested I'll provide the patch in gerrit



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list