[asterisk-bugs] [JIRA] (ASTERISK-21215) Unexpected Behavior in Adaptive CDR when U() used on Dial

Matt Jordan (JIRA) noreply at issues.asterisk.org
Wed Mar 6 22:35:01 CST 2013


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

Matt Jordan edited comment on ASTERISK-21215 at 3/6/13 10:34 PM:
-----------------------------------------------------------------

No, this isn't a bug.

{quote}
U - Execute via Gosub the routine x for the called channel before connecting to the calling channel. Arguments can be specified to the Gosub using ^ as a delimiter. The Gosub routine can set the variable GOSUB_RESULT to specify the following actions after the Gosub returns.
{quote}

The U option is executed on the called channels, not the calling channel. The CDR function is modifying properties on the called channels in the subroutine, while the CDR that gets written is for the calling channel.

If you want to modify properties on the calling channel, use the B pre-dial option.
                
      was (Author: mjordan):
    No, this isn't a bug.

{quote}
U - Execute via Gosub the routine x for the called channel before connecting to the calling channel. Arguments can be specified to the Gosub using ^ as a delimiter. The Gosub routine can set the variable GOSUB_RESULT to specify the following actions after the Gosub returns.
{quote}

The U option is executed on the called channel, not the calling channels. The CDR function is modifying properties on the called channels in the subroutine, while the CDR that gets written is for the calling channels.

If you want to modify properties on the calling channel, use the B pre-dial option.
                  
> Unexpected Behavior in Adaptive CDR when U() used on Dial
> ---------------------------------------------------------
>
>                 Key: ASTERISK-21215
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21215
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CDR/cdr_adaptive_odbc
>    Affects Versions: 11.2.1
>            Reporter: JoshE
>
> Issuing these two lines in dialplan:
> same => n,Set(CDR(extension_family)=My Family)
> same => n,Dial(SIP/1-Tenant&SIP/2-Tenant,60,grU(set-CallGroupInfo,s,1))
> Where, set-CallGroupInfo = 
> {noformat} 
> [set-CallGroupInfo]
> exten => s,1,NoOp(Setting Call Group Information)
> same => n,Set(TEMP=${CUT(CHANNEL,/,2)})
> same => n,Set(EXTENSION=${CUT(TEMP,-,1)})
> same => n,ExecIf($[ "${TENANT}" = "" ]?Set(__TENANT=${CUT(TEMP,-,2)}))
> same => n,Set(CDR(extension)=${EXTENSION})
> same => n,Set(ARRAY(EXT_NAME,EXT_LOCATION)=${ODBC_GET_EXTENSION_NAME_LOCATION(${EXTENSION},${TENANT})})
> same => n,Set(CDR(extension_name)=${EXT_NAME})
> same => n,Set(CDR(extension_location)=${EXT_LOCATION})
> {noformat} 
> Does not write those fields to the CDR line generated for the call.  The adaptive CDR simply ignores them when writing out the record.
> However, the line above Dial (extension_family) is written properly.  I believe the expected behavior, based on the documentation I have, is that those fields should be written when called from GoSub.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list