asterisk cli “core show channels” output when call connected.
CLI> core show channels
Channel Location State Application(Data)
Local/s@test-dialout s@test-answer:1 Up Wait(30)
Local/s@test-dialout s@test-dialout:6 Up Dial(SIP/XXXXXXXXXX@siptrunk,
SIP/siptrunk-000007c (None) Up AppDial((Outgoing Line))
3 active channels
2 active calls
As per documentation Local channels should get merged / optimized if \n is not mentioned with local channel. But this is not happening in my case.
Please help me to understand this issue. Please let me know if more details required.
Both sides have to be in a bridge talking to another channel in order for optimization to occur[1]. If one side is merely executing dialplan (as you are) then it won’t occur.
I am executing same dialplan and same code in asterisk 1.8 version and and local channels getting optimized perfectly.
Only difference is that in asterisk 1.8 box (using DAHDI for outgoing calls)its switching to nating bridge and in asterisk 16 box (using SIP for outgoing calls) its switching to simple bridge.
Local channel support and bridging was rewritten and changed in later versions. It is certainly possible that Local channel optimization is no longer supported in your specific scenario.