[asterisk-bugs] [JIRA] (ASTERISK-21042) pbx_spool: callfile variables overriding/lost in __ast_request_and_dial()

Roman S. (JIRA) noreply at issues.asterisk.org
Thu Feb 14 03:29:58 CST 2013


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

Roman S. commented on ASTERISK-21042:
-------------------------------------

Please note that this is all about call files (outgoing spool). Possibly {{__ast_request_and_dial()}} should behave differently depending on request source (call file or some other internal channel request source). But I haven't analyzed this part.

1. The idea of inheritance is enhanced by possibility of overriding. I mean if entity B/child should inherit behaviour/properties of entity A/parent but should have something unique then this (difference) should be specified explicitly. If not (only inheritance) then nothing should be specified for B/child. The same is for channels. If people expect only inheritance they omit any {{Set: <var>=<value>}} in call file. But what should they do if some A/parent variable should be definitely overridden for B/child? There is no possibility to perform this without some workaround (e.g. Local channel with additional Set() app.).
2. Call file variables to hide CallerId in SIP message (should be Anonymous):
{noformat}
Set: CONNECTEDLINE(num-pres)=prohib
Set: CONNECTEDLINE(name-pres)=prohib
{noformat}
But unfortunately these variables/functions are processed:
{noformat}
5430                         ast_set_variables(chan, oh->vars);
{noformat}
before:
{noformat}
5470                 connected.id.number.presentation = AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED;
5475                 connected.id.name.presentation = AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED;
5477         ast_channel_set_connected_line(chan, &connected, NULL);
{noformat}
As result CallerID is not "Anonymous".

Thanks
                
> pbx_spool: callfile variables overriding/lost in __ast_request_and_dial()
> -------------------------------------------------------------------------
>
>                 Key: ASTERISK-21042
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21042
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Channels, PBX/pbx_spool
>    Affects Versions: 1.8.20.1
>            Reporter: Roman S.
>            Assignee: Roman S.
>            Severity: Trivial
>         Attachments: originate-vars-fix.diff
>
>
> {{__ast_request_and_dial()}} calls {{ast_set_variables(chan, oh->vars)}} before {{ast_channel_inherit_variables(oh->parent_channel, chan)}} and before {{ast_channel_set_connected_line(chan, &connected, NULL)}}. It causes:
>  1. overriding of some variables from oh struct with values from parent channel (if any)
>  2. overriding/ignore of {{CONNECTEDLINE()}} function job from callfile
> I suppose to call {{ast_set_variables(chan, oh->vars)}} just after {{ast_channel_set_connected_line(chan, &connected, NULL)}}.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list