[asterisk-bugs] [JIRA] (ASTERISK-30307) unreal: Local Channel Not Optimizing

Đặng Lợi (JIRA) noreply at issues.asterisk.org
Wed Nov 16 01:59:09 CST 2022


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

Đặng Lợi commented on ASTERISK-30307:
-------------------------------------

Hi Joshua, sharing my dialplan setup, used with complex AGI script for querying databases, but asterisk's part could be seen as follows:
1. caller will be put in infinite playback loop
[caller]
exten => _X.,1,Ringing()
exten => _X.,n,agi(agi://127.0.0.1/dial) ; AGI EXEC GOTO onpause,1

exten => onpause,1(startpause),ControlPlayback(what_ever.gsm,,,,)
exten => onpause,n,Goto(startpause)

2. Callee channels (1 SIP and 2 Locals) are then triggered by outgoing spool file
$> cat /var/spool/asterisk/outgoing/apicall.2999ab31-1370-40b3-b691-48fa5ede1186
Channel: Local/2999ab31-1370-40b3-b691-48fa5ede1186 at api_ivr_leg1
Extension: 2999ab31-1370-40b3-b691-48fa5ede1186
WaitTime: 360
RetryTime: 5
MaxRetries: 0
Context: api_ivr_leg2
Priority: 1
Set: txnId=2999ab31-1370-40b3-b691-48fa5ede1186


[api_ivr_leg1]
exten => _X.,1,agi(agi://127.0.0.1/dial) ; AGI EXEC GOTO attempt,1
exten => attempt,1,Dial(PJSIP/outgoing at kamailio,15,itb(api_ivr_leg1^callee_handler^1)) ; kamailio is used for distributing

; for executing MixMonitor on the SIP channel instead of Local
exten => callee_handler,1,agi(agi://127.0.0.1/callee_predial)
exten => callee_handler,n,Return()


[api_ivr_leg2]
; script that query caller channel name and do the `EXEC BRIDGE`
exten => _X.,1,agi(agi://127.0.0.1/dial)

Note that some asterisk variables i used were interpreted for simplicity

Actually I used above setup for merely all calls without a problem, the optimization mostly happens until a new client come to town, i can easily reproduce the issue with that client for gathering debug log but i'm unable to point out what caused it.

I'm using Amazon Linux 2 Centos7 and asterisk 18.7.1.

Regards


> unreal: Local Channel Not Optimizing
> ------------------------------------
>
>                 Key: ASTERISK-30307
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30307
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_local
>    Affects Versions: 18.7.1
>         Environment: Amazon Linux 2 Centos7
>            Reporter: Đặng Lợi
>            Assignee: Đặng Lợi
>         Attachments: no_optimization.txt, optimized.txt
>
>
> Hi all, I'm using following scenarios to establish a 2 parties call
> 1. Caller channel held by ControlPlayback()
> 2. Outgoing spool file created to connect to the callee channel with Local ;2 channel, and when callee answers, do the bridge() to the held caller channel with Local ;1 channel.
> Things work as expected, except sometimes the Local channels created for processing the callee were not optimizing.
> I can reproduce the issue, and attached the debug log for both (optimized and not optimizing) cases.
> Try diving into the log myself but the only difference I can point out is the presence of merging of 2 bridges into 1 when the optimization happens, otherwise, 2 bridges exist until the end of call, so as the Local channels.
> I'm aware that there are usages that prevent Local channel optimization listed on the wiki and likely that I do not fall into it.
> So any enlightenment on what i was doing wrong would be appreciated.
> Regards,
> Loi Dang
> --- FAILED  -  Nov  9 07:07:45
> bridge1: 4af0a403-5498-4541-b6f9-cb85951927a3
> - Local/bd3b52eb-1398-451b-9fb7-7fc3630493b1 at api_ivr_leg1-000000ea;2
> - PJSIP/kamailio-000000ae (callee channel)
> bridge2: e8f6bad8-f952-4e77-97ad-4053441a0204
> - Local/bd3b52eb-1398-451b-9fb7-7fc3630493b1 at api_ivr_leg1-000000ea;1
> - PJSIP/tssbc1_vendor-000000ad (caller channel)
> --- WORKING  -  Nov  9 09:50:00
> bridge1: b41ecfa7-31ce-4245-8d09-f5cdfbe01c93
> - Local/b6dcafa4-1587-4514-8eca-11d984752ac9 at api_ivr_leg1-00000018;2
> - PJSIP/kamailio-00000143 (callee channel)
> bridge2: 71519064-208b-486e-b8cc-b825af89560e
> - Local/b6dcafa4-1587-4514-8eca-11d984752ac9 at api_ivr_leg1-00000018;1
> - PJSIP/tssbc1_vendor-00000142 (caller channel)



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



More information about the asterisk-bugs mailing list