[asterisk-bugs] [JIRA] (ASTERISK-26993) ExtenSpy on extension with no active channels

Jared Hull (JIRA) noreply at issues.asterisk.org
Wed May 10 17:17:58 CDT 2017


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

Jared Hull edited comment on ASTERISK-26993 at 5/10/17 5:17 PM:
----------------------------------------------------------------

One of these days I will learn how to follow the rules. Log attached to the issue.

You will see a line in there like this.
{noformat}ast_verb(2, "%s ______________________ %s\n", ast_channel_name(chan), ast_channel_name(autochan->chan));{noformat}
The iterator for autochan is somehow grabbing a channel from another extension. It is as if Asterisk is just returning all active channels in the system rather than finding the ones that correspond with the extension. Of which there are none because the extension being spied on doesn't have any channels open.


was (Author: fortytwo):
One of these days I will learn how to follow the rules.

You will see a line in there like this.
{noformat}ast_verb(2, "%s ______________________ %s\n", ast_channel_name(chan), ast_channel_name(autochan->chan));{noformat}
The iterator for autochan is somehow grabbing a channel from another extension. It is as if Asterisk is just returning all active channels in the system rather than finding the ones that correspond with the extension. Of which there are none because the extension being spied on doesn't have any channels open.

> ExtenSpy on extension with no active channels
> ---------------------------------------------
>
>                 Key: ASTERISK-26993
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26993
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_chanspy
>    Affects Versions: 13.14.0, 14.4.0
>            Reporter: Jared Hull
>            Assignee: Unassigned
>         Attachments: asterisk.txt
>
>
> II have three extensions: 101, 102, 103. If 103 is in a call and I use ExtenSpy from extension 101 spy on extension 102 which has no active channels, it will spy on extension 103.
> {noformat}exten => _*52.,1,ExtenSpy(${EXTEN:3},qS)
> exten => _*53.,1,ExtenSpy(${EXTEN:3},qSw)
> exten => _*54.,1,ExtenSpy(${EXTEN:3},qSB){noformat}
> I inserted a debug statement into 'for (autochan = next_channel(iter, chan);' in common_exec() in apps/app_chanspy.c and see ast_channel_name(autochan->chan) is equal to the 103 channel.
> I would expect that the iterator object should be null since there are no channels for the extension.
> iter = ast_channel_iterator_by_exten_new(exten, context);



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



More information about the asterisk-bugs mailing list