[asterisk-bugs] [JIRA] (ASTERISK-26681) chan_local: Local Channels Not Optimizing

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Tue Jan 3 18:05:10 CST 2017


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

Richard Mudgett edited comment on ASTERISK-26681 at 1/3/17 6:04 PM:
--------------------------------------------------------------------

This is not a bug.  However, you do point out that there is a deficiency in the documentation of local channels.  Local channel optimization works differently since Asterisk v12 and not because it was pulled into the core.

Asterisk v12 introduced major architectural changes to Asterisk.  As part of the bridging overhaul [1][2][3][4], local channel optimization [5] had to be completely redone [6].  Local channels now optimize themselves out when both ends are in a bridge and the bridge allows optimization.  The scenario you are showing does not have both ends of the local channel in a bridge so optimization will not happen.

[1] https://wiki.asterisk.org/wiki/display/AST/Bridges
[2] http://blogs.asterisk.org/2016/10/05/asterisk-architecture-the-bridging-framework-part-i/
[3] http://blogs.digium.com/2014/10/07/asterisk-13-core-changes-bridging-framework/

Low level details and reasons for the architecture change.
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Bridging+Project

[5] https://wiki.asterisk.org/wiki/display/AST/Local+Channel+Optimization
[6] https://wiki.asterisk.org/wiki/display/AST/AMI+v2+Specification#AMIv2Specification-LocalChannelOptimization



was (Author: rmudgett):
This is not a bug.  However, you do point out a deficiency in the documentation of local channels.  Local channel optimization works differently since Asterisk v12 and not because it was pulled into the core.

Asterisk v12 introduced major architectural changes to Asterisk.  As part of the bridging overhaul [1][2][3][4], local channel optimization [5] had to be completely redone [6].  Local channels now optimize themselves out when both ends are in a bridge and the bridge allows optimization.  The scenario you are showing does not have both ends of the local channel in a bridge so optimization will not happen.

[1] https://wiki.asterisk.org/wiki/display/AST/Bridges
[2] http://blogs.asterisk.org/2016/10/05/asterisk-architecture-the-bridging-framework-part-i/
[3] http://blogs.digium.com/2014/10/07/asterisk-13-core-changes-bridging-framework/

Low level details and reasons for the architecture change.
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Bridging+Project

[5] https://wiki.asterisk.org/wiki/display/AST/Local+Channel+Optimization
[6] https://wiki.asterisk.org/wiki/display/AST/AMI+v2+Specification#AMIv2Specification-LocalChannelOptimization


> chan_local: Local Channels Not Optimizing
> -----------------------------------------
>
>                 Key: ASTERISK-26681
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26681
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_local
>    Affects Versions: 13.13.1
>         Environment: OpenSuSE 42.1, Intel i5, 8gigs RAM, SSD
>            Reporter: Michael Cargile
>         Attachments: cli_output.txt.txt
>
>
> Local Channels created with an AMI Originate are not optimizing when connected, even with 30 seconds of Wait. In Asterisk 11 they usually did this within 200ms.
> Here is the relevant dialplan:
> {noformat}
> exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
> exten => _91NXXNXXXXXX,2,Dial(SIP/office-server/${EXTEN:1},,To)
> exten => _91NXXNXXXXXX,3,Hangup
> exten => 8368,1,Playback(sip-silence)
> exten => 8368,n,Wait(30)
> exten => 8368,n,DumpChan()
> exten => 8368,n,AGI(agi://127.0.0.1:4577/call_log)
> exten => 8368,n,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
> exten => 8368,n,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
> exten => 8368,n,Hangup()
> exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
> {noformat}
> Here is the SIP entry:
> {noformat}
> [office-server]
> type=peer
> context=international
> usecallerid=yes
> trustrpid=yes
> sendrpid=yes
> host=192.168.198.1
> qualify=yes
> insecure=port,invite
> disallow=all
> allow=gsm
> allow=ulaw
> dtmfmode=RFC2833
> {noformat}
> Here is the Originate action:
> {noformat}
> Action: Originate
> Exten: 8368
> Context: default
> Channel: Local/917275777470 at default
> Priority: 1
> Callerid: "V2281648150000060018" <0000000000>
> Timeout: 60000
> {noformat}
> Here is the CLI output:
> [Edit by Rusty - Removed as per guidelines. Attaching as cli_output.txt]
> In Asterisk 11 and earlier Local channel optimization was triggered during audio processing. I am not sure if that is still the case now that it has been moved into the Core, but I have confirmed that there is audio on these calls.
> It would actually be great if the LocalOptimizeAway actually triggered an optimization rather than just clearing the 'n' flag from the channel. Either that or there was a dialplan application that would force an optimization of a Local Channel.



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



More information about the asterisk-bugs mailing list