How to kill a channel automatically that is more than 1 hour?

Need to do it automatically since we are having a bug using 13.21.0 when calling AMD application. There are instances that it took almost 5 hours before the channel hangups.

I am using the below dialplan when passing the call to an AMD detection.

 '8387' =>         1. Playback(sip-silence)                      [pbx_config]
                    2. AGI(agi://127.0.0.1:4577/call_log)         [pbx_config]
                    3. AMD(2000,2000,1000,5000,120,50,4,256)      [pbx_config]
                    4. NoOp(${AMDSTATUS})                         [pbx_config]
                    5. NoOp(${AMDCAUSE})                          [pbx_config]
                    6. AGI(VD_amd.agi,${EXTEN})                   [pbx_config]
                    7. AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LO) [pbx_config]
                    8. Hangup()                                   [pbx_config]

asterisk*CLI> core show function TIMEOUT

1 Like

This a bug on the AMD function, it was fixed newest release of Asterisk, also if there is not RTP traffic you can use the RTP Time Out

1 Like

How about this one? How can I kill this automatically. We have an rtp timeout configured as 60 seconds in general sip.conf.

546558f54d8 03:00:27 0000000024 0000000000 ( 0.00%) 0.0000 0000000003 0000000000 ( 0.00%) 0.0006

The only way that is likely to work against a buggy application is to interpose a local channel and use a time limit on the Dial application for that.

What do you mean by local channel? Do you have a sample syntax?

Also I would like to know if there’s a way to kill a channel where there’s no packet being sent and received.

For example, the value on packets being sent and received doesnt change for almost 3 hours. Seems like a stuck call. This adds additional cost on our organization.

168.215.247.130  05adc868747  02:49:41 0000000420  0000000000 ( 0.00%) 0.0000 0000000003  0000000000 ( 0.00%) 0.0013

https://wiki.asterisk.org/wiki/display/AST/Local+Channel

The second question depends on the channel technology. For chan_sip, if no packets, not even RTCP are being sent, you can use rtptimeout.

Ive used rtptimeout but no avail. This channel stuck therefore our provider keeps on billing us. Seems like an issue with the WaitForSielence application after being executed by an agi.

[root@dialer-pq-apse1-lp27 centos]# asterisk -rx 'sip show channels' | grep 22f53d3c4cb
168.215.247.130  15805146933      22f53d3c4cb7d4d  (ulaw)           No       Tx: ACK                    magna1



[root@dialer-pq-apse1-lp27 centos]# cat /var/log/asterisk/messages | grep C-00001efb
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] pbx.c: Executing [815805146933@default:1] AGI("Local/815805146933@default-00001122;2", "agi://127.0.0.1:4577/call_log") in new stack
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] res_agi.c: AGI Script Executing Application: (EXEC) Options: (Set(_CAMPCUST=OUTSOURC))
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] res_agi.c: <Local/815805146933@default-00001122;2>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] pbx.c: Executing [815805146933@default:2] Set("Local/815805146933@default-00001122;2", "CallerIDString=5803240756") in new stack
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] pbx.c: Executing [815805146933@default:3] Set("Local/815805146933@default-00001122;2", "CALLERID(num)=+15803240756") in new stack
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] pbx.c: Executing [815805146933@default:4] NoOp("Local/815805146933@default-00001122;2", "CallerID : +15803240756") in new stack
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] pbx.c: Executing [815805146933@default:5] Dial("Local/815805146933@default-00001122;2", "SIP/magna1/15805146933,,tTo") in new stack
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] netsock2.c: Using SIP RTP CoS mark 5
[Oct 23 11:32:56] VERBOSE[12531][C-00001efb] app_dial.c: Called SIP/magna1/15805146933
[Oct 23 11:33:01] VERBOSE[5183][C-00001efb] res_rtp_asterisk.c: 0x7fd5180aa070 -- Strict RTP learning after remote address set to: 69.252.36.40:10810
[Oct 23 11:33:01] VERBOSE[12531][C-00001efb] app_dial.c: SIP/magna1-00000f33 is making progress passing it to Local/815805146933@default-00001122;2
[Oct 23 11:33:10] VERBOSE[12531][C-00001efb] app_dial.c: SIP/magna1-00000f33 is making progress passing it to Local/815805146933@default-00001122;2
[Oct 23 11:33:11] VERBOSE[12531][C-00001efb] app_dial.c: SIP/magna1-00000f33 answered Local/815805146933@default-00001122;2
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] bridge_channel.c: Channel SIP/magna1-00000f33 joined 'simple_bridge' basic-bridge <9d0b1ee4-600b-4c57-8952-c8eb06450b88>
[Oct 23 11:33:11] VERBOSE[12531][C-00001efb] bridge_channel.c: Channel Local/815805146933@default-00001122;2 joined 'simple_bridge' basic-bridge <9d0b1ee4-600b-4c57-8952-c8eb06450b88>
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] bridge_channel.c: Channel SIP/magna1-00000f33 left 'simple_bridge' basic-bridge <9d0b1ee4-600b-4c57-8952-c8eb06450b88>
[Oct 23 11:33:11] VERBOSE[12531][C-00001efb] bridge_channel.c: Channel Local/815805146933@default-00001122;2 left 'simple_bridge' basic-bridge <9d0b1ee4-600b-4c57-8952-c8eb06450b88>
[Oct 23 11:33:11] VERBOSE[12531][C-00001efb] pbx.c: Spawn extension (default, 815805146933, 5) exited non-zero on 'Local/815805146933@default-00001122;2'
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] pbx.c: Executing [8387@default:1] Playback("SIP/magna1-00000f33", "sip-silence") in new stack
[Oct 23 11:33:11] VERBOSE[12531][C-00001efb] pbx.c: Executing [h@default:1] AGI("Local/815805146933@default-00001122;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----14-----0-----SIP 200 OK)") in new stack
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] file.c: <SIP/magna1-00000f33> Playing 'sip-silence.gsm' (language 'en')
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] res_rtp_asterisk.c: 0x7fd5180aa070 -- Strict RTP switching to RTP target address 69.252.36.40:10810 as source
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] pbx.c: Executing [8387@default:2] AGI("SIP/magna1-00000f33", "agi://127.0.0.1:4577/call_log") in new stack
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] res_rtp_asterisk.c: 0x7fd5180aa070 -- Strict RTP learning complete - Locking on source address 69.252.36.40:10810
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] res_agi.c: AGI Script Executing Application: (EXEC) Options: (Set(_CAMPCUST=OUTSOURC))
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] res_agi.c: <SIP/magna1-00000f33>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] pbx.c: Executing [8387@default:3] AMD("SIP/magna1-00000f33", "2000,2000,1000,5000,120,50,4,256") in new stack
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] app_amd.c: AMD: SIP/magna1-00000f33 (N/A) (N/A) (Fmt: slin)
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] app_amd.c: AMD: initialSilence [2000] greeting [2000] afterGreetingSilence [1000] totalAnalysisTime [5000] minimumWordLength [120] betweenWordsSilence [50] maximumNumberOfWords [4] silenceThreshold [256] maximumWordLength [5000]
[Oct 23 11:33:11] VERBOSE[12896][C-00001efb] app_amd.c: AMD: Channel [SIP/magna1-00000f33]. Changed state to STATE_IN_SILENCE
[Oct 23 11:33:12] VERBOSE[12531][C-00001efb] res_agi.c: <Local/815805146933@default-00001122;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----14-----0-----SIP 200 OK) completed, returning 0
[Oct 23 11:33:13] VERBOSE[12896][C-00001efb] app_amd.c: AMD: Channel [SIP/magna1-00000f33]. ANSWERING MACHINE: silenceDuration:2000 initialSilence:2000
[Oct 23 11:33:13] VERBOSE[12896][C-00001efb] pbx.c: Executing [8387@default:4] NoOp("SIP/magna1-00000f33", "MACHINE") in new stack
[Oct 23 11:33:13] VERBOSE[12896][C-00001efb] pbx.c: Executing [8387@default:5] NoOp("SIP/magna1-00000f33", "INITIALSILENCE-2000-2000") in new stack
[Oct 23 11:33:13] VERBOSE[12896][C-00001efb] pbx.c: Executing [8387@default:6] AGI("SIP/magna1-00000f33", "VD_amd.agi,8387") in new stack
[Oct 23 11:33:13] VERBOSE[12896][C-00001efb] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/VD_amd.agi
[Oct 23 11:33:13] VERBOSE[12896][C-00001efb] res_agi.c: <SIP/magna1-00000f33> Playing 'sip-silence.gsm' (escape_digits=) (sample_offset 0) (language 'en')
[Oct 23 11:33:13] VERBOSE[12896][C-00001efb] res_agi.c: <SIP/magna1-00000f33> Playing 'sip-silence.gsm' (escape_digits=) (sample_offset 0) (language 'en')
[Oct 23 11:33:16] VERBOSE[12896][C-00001efb] res_agi.c: AGI Script Executing Application: (WaitForSilence) Options: (2000,2)
[Oct 23 11:33:16] VERBOSE[12896][C-00001efb] app_waitforsilence.c: Waiting 2 time(s) for 2000ms of silence with 0s timeout



Every 1.0s: asterisk -rx 'sip show channelstats' | grep 168.215.247.130 | sort                                                                                      
168.215.247.130  22f53d3c4cb  01:36:53 0000000580  0000000000 ( 0.00%) 0.0000 0000000003  0000000000 ( 0.00%) 0.0010

Also this one. This is a stuck call. The problem here is that the amd didnt return the AMDSTATUS nor the AMDCAUSE.

[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407@default:1] AGI("Local/818508797407@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@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@default:2] Set("Local/818508797407@default-0000111a;2", "CallerIDString=8508989521") in new sta
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407@default:3] Set("Local/818508797407@default-0000111a;2", "CALLERID(num)=+18508989521") in new st
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407@default:4] NoOp("Local/818508797407@default-0000111a;2", "CallerID : +18508989521") in new stac
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407@default:5] Dial("Local/818508797407@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@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@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@default-0000111a;2
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] app_dial.c: SIP/magna1-00000ee8 answered Local/818508797407@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@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@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@default-0000111a;2'
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] pbx.c: Executing [8387@default:1] Playback("SIP/magna1-00000ee8", "sip-silence") in new stack
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] pbx.c: Executing [h@default:1] AGI("Local/818508797407@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@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@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@default-0000111a;

This one is a stuck call. Though we are using already the 13.27 where there’s a patch on the amd application.

root@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@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@default:1] AGI(“Local/818508797407@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@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@default:2] Set(“Local/818508797407@default-0000111a;2”, “CallerIDString=8508989521”) in new sta
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407@default:3] Set(“Local/818508797407@default-0000111a;2”, “CALLERID(num)=+18508989521”) in new st
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407@default:4] NoOp(“Local/818508797407@default-0000111a;2”, “CallerID : +18508989521”) in new stac
[Oct 24 11:24:25] VERBOSE[16627][C-00001f43] pbx.c: Executing [818508797407@default:5] Dial(“Local/818508797407@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@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@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@default-0000111a;2
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] app_dial.c: SIP/magna1-00000ee8 answered Local/818508797407@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@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@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@default-0000111a;2’
[Oct 24 11:24:33] VERBOSE[16786][C-00001f43] pbx.c: Executing [8387@default:1] Playback(“SIP/magna1-00000ee8”, “sip-silence”) in new stack
[Oct 24 11:24:33] VERBOSE[16627][C-00001f43] pbx.c: Executing [h@default:1] AGI(“Local/818508797407@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@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@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@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;
                }

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.