[asterisk-users] AMI potential memory leak

Dan Cropp
2018-03-22T15:47:35Z

We just received a separate call with a Result that seems random...  This is on
a separate box running Asterisk 14.7.5 for this example.  However, I am
comfortable that we will eventually see this on a 13.18.5 asterisk if we
increase the number of simultaneous calls.

I would say the random Result header containing information similar to this
(random, but at least typical ASCII characters) is a more common pattern that we
are seeing.

[03/22 15:33:52.217] DEBUG[529] manager.c: Examining AMI event:
Event: AsyncAGIExec
Privilege: agi,all
Channel: PJSIP/192.168.40.105-00008a2a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 1234
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 10
Context: ABC
Exten: 3002
Priority: 7
Uniqueid: 1521732812.35370
Linkedid: 1521732812.35370
Result: E%2CSuccessfully%20Played%0A
CommandId: C318070


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces
at lists.digium.com] On Behalf Of Dan Cropp
Sent: Thursday, March 22, 2018 9:37 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] AMI potential memory leak

Not sure if this may provide any guidance...

Call comes in and the extension is configured to send it to AsyncAGI We use AMI
to detect when we have control of the call.
We perform some actions (Answer)
Maybe play a few prompts.

At some point, we need to play and collect some digits.
For this portion, we set a variable on the channel.
We end the AsyncAGI with an asyncagi break

Action: AGI
ActionID: C7138
Channel: _____
CommandID: C7138
Command: asyncagi break

The extensions for this call looks at the channel variable and sees it is set.
It then sends the call to ExternalIVR
On an ExternalIVR socket we determine the channel so we know which channel this
ExternalIVR socket represents.
We then perform the play and monitor for digits.
In the tests, no digits are received.
ExternalIVR will end.

Extensions is configured to send the call back to AsyncAGI.
We receive the call and do actions based on what was received.

In the test case I am looking at this morning, there is no dtmf.
It repeats the digit collection (ExternalIVR) process 3 times.
After 3 times of no digits, it plays a good bye prompt.

The data I just sent was what happened after the BYE attempt (no AsyncAGIExec
event with a result).
I just saw another case where the BYE completed, so we sent an Action: Hangup
packet

Asterisk debug log shows it receive the Hangup and started the Soft-Hanging up.
However, there is nothing more for this channel in the Asterisk debug log.

[03/22 08:41:03.354] DEBUG[1228] manager.c: Running action 'Hangup'
[03/22 08:41:03.354] DEBUG[1228] channel.c: Soft-Hanging (0x20) up channel
'SIP/192.168.40.105-00000314'

These are two scenarios we are able to replicate within a couple hours
regularly.

Dan

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces
at lists.digium.com] On Behalf Of Dan Cropp
Sent: Thursday, March 22, 2018 9:20 AM