[asterisk-bugs] [JIRA] (ASTERISK-28143) app_amd: Infinite loop on silent calls

Jessie Kid Fernando (JIRA) noreply at issues.asterisk.org
Thu Oct 24 15:33:49 CDT 2019


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

Jessie Kid Fernando commented on ASTERISK-28143:
------------------------------------------------

Hello Everyone, 

Anyone knows why we are still getting stuck calls though we are already using this updated patch. 

root at dialer-pq-apse1-lp27 apps]# asterisk -rx ‘module show like app_amd.so’
Module Description Use Count Status Support Level
app_amd.so Answering Machine Detection Application 1 Running extended
1 modules loaded


6ef6c801516 04:22:47 0000000010 0000000000 ( 0.00%) 0.0000 0000000001
0000000000 ( 0.00%) 0.0003


^C[root at dialer-pq-apse1-lp27 centos]# cat /var/log/asterisk/messages | grep C-00001f43
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407 at default:1] AGI(“Local/818508797407 at default-0000111a;2”, “agi://127.0.0.1:4577/call_log”) in new
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] res_agi.c: AGI Script Executing Application: (EXEC) Options: (Set(_CAMPCUST=OUTSOURC))
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] res_agi.c: <Local/818508797407 at default-0000111a;2>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407 at default:2] Set(“Local/818508797407 at default-0000111a;2”, “CallerIDString=8508989521”) in new sta
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407 at default:3] Set(“Local/818508797407 at default-0000111a;2”, “CALLERID(num)=+18508989521”) in new st
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407 at default:4] NoOp(“Local/818508797407 at default-0000111a;2”, “CallerID : +18508989521”) in new stac
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407 at default:5] Dial(“Local/818508797407 at default-0000111a;2”, “SIP/magna1/18508797407,tTo”) in new
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] netsock2.c: Using SIP RTP CoS mark 5
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] app_dial.c: Called SIP/magna1/18508797407
[Oct 24 11:24:29] VERBOSE[5172][C-00001f43] res_rtp_asterisk.c: 0x7f167807b2c0 – Strict RTP learning after remote address set to: 173.245.44.26:44640
[Oct 24 11:24:29] VERBOSE[16627][C-00001f43] app_dial.c: SIP/magna1-00000ee8 is making progress passing it to Local/818508797407 at default-0000111a;2
[Oct 24 11:24:29] VERBOSE[16627][C-00001f43] app_dial.c: SIP/magna1-00000ee8 redirecting info has changed, passing it to Local/818508797407 at default-0000111a;2
[Oct 24 11:24:31] VERBOSE[16627][C-00001f43] app_dial.c: SIP/magna1-00000ee8 is ringing
[Oct 24 11:24:31] VERBOSE[16627][C-00001f43] app_dial.c: SIP/magna1-00000ee8 is making progress passing it to Local/818508797407 at default-0000111a;2
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] app_dial.c: SIP/magna1-00000ee8 answered Local/818508797407 at default-0000111a;2
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] bridge_channel.c: Channel SIP/magna1-00000ee8 joined ‘simple_bridge’ basic-bridge <211cac66-2869-42b4-a976-6e8230aca605>
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] bridge_channel.c: Channel Local/818508797407 at default-0000111a;2 joined ‘simple_bridge’ basic-bridge <211cac66-2869-42b4-a976-6>
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] bridge_channel.c: Channel SIP/magna1-00000ee8 left ‘simple_bridge’ basic-bridge <211cac66-2869-42b4-a976-6e8230aca605>
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] bridge_channel.c: Channel Local/818508797407 at default-0000111a;2 left ‘simple_bridge’ basic-bridge <211cac66-2869-42b4-a976-6e8
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] pbx.c: Spawn extension (default, 818508797407, 5) exited non-zero on ‘Local/818508797407 at default-0000111a;2’
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] pbx.c: Executing [8387 at default:1] Playback(“SIP/magna1-00000ee8”, “sip-silence”) in new stack
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] pbx.c: Executing [h at default:1] AGI(“Local/818508797407 at default-0000111a;2”, “agi://127.0.0.1:4577/call_log–HVcauses–PRI------16-----ANSWER-----8-----0-----SIP 200 OK)”) in new stack
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] file.c: <SIP/magna1-00000ee8> Playing ‘sip-silence.gsm’ (language ‘en’)
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] res_rtp_asterisk.c: 0x7f167807b2c0 – Strict RTP switching to RTP target address 173.245.44.26:44640 as source
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] pbx.c: Executing [8387 at default:2] AGI(“SIP/magna1-00000ee8”, “agi://127.0.0.1:4577/call_log”) in new stack
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] res_agi.c: AGI Script Executing Application: (EXEC) Options: (Set(_CAMPCUST=OUTSOURC))
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] res_agi.c: <SIP/magna1-00000ee8>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] pbx.c: Executing [8387 at default:3] AMD(“SIP/magna1-00000ee8”, “2000,2000,1000,5000,120,50,4,256”) in new stack
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] app_amd.c: AMD: SIP/magna1-00000ee8 (N/A) (N/A) (Fmt: slin)
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] app_amd.c: AMD: initialSilence [2000] greeting [2000] afterGreetingSilence [1000] totalAnalysisTime [5000] minimumWordLength [nWordsSilence [50] maximumNumberOfWords [4] silenceThreshold [256] maximumWordLength [5000]
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] app_amd.c: AMD: Channel [SIP/magna1-00000ee8]. Detected Talk, previous silence duration: 40
[Oct 24 11:24:34] VERBOSE[16627][C-00001f43] res_agi.c: <Local/818508797407 at default-0000111a;



This is the patch for the latest AMD module. 


           /* Figure out how long we waited */
            if (res >= 0) {
                    ms = 2 * maxWaitTimeForFrame - res;
            }

            /* If we fail to read in a frame, that means they hung up */
            if (!(f = ast_read(chan))) {
                    ast_verb(3, "AMD: Channel [%s]. HANGUP\n", ast_channel_name(chan));
                    ast_debug(1, "Got hangup\n");
                    strcpy(amdStatus, "HANGUP");
                    res = 1;
                    break;
            }

            } else {
                    iTotalTime += ms;
                    if (iTotalTime >= totalAnalysisTime) {
                            ast_frfree(f);
                            strcpy(amdStatus , "NOTSURE");
                            sprintf(amdCause , "TOOLONG-%d", iTotalTime);
                            break;
                    }

> app_amd: Infinite loop on silent calls 
> ---------------------------------------
>
>                 Key: ASTERISK-28143
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28143
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_amd
>    Affects Versions: 15.6.1
>         Environment: Ubuntu with asterisk 
>            Reporter: Abhay Gupta
>            Assignee: Abhay Gupta
>              Labels: patch
>      Target Release: 13.27.0, 16.4.0, 17.0.0
>
>         Attachments: amd.patch
>
>
> On our production server , some of the calls never return from AMD application , from logs we could see that they have last gone into AMD() of dialplan and comes out only when the call is HANGUP .
> The suggested patch is to remove that infinite loop and has been tested for last few months and have been working well .



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



More information about the asterisk-bugs mailing list