Summary:ASTERISK-21793: Segmentation fault when dealing with Agent channels
Reporter:Rodrigo P. Telles (telles)Labels:
Date Opened:2013-05-20 07:44:56Date Closed:2013-05-29 15:14:01
Versions: Frequency of
duplicatesASTERISK-21356 Segfault during bridge channel proxy inspection in a masquerade caused by an AMI Redirect of two channels
Environment:CentOS 5.8 (final) Kernel 2.6.18-238.12.1.el5 Running with a Khomp E1 board with latest channel driver versionAttachments:( 0) backtrace.txt
( 1) backtrace.txt
( 2) jira_asterisk_21793_v1.8.patch
Description:Asterisk died with a Segmentation fault.
Analysing the core dump I presume this issue is related with Agent channel, because it happens (randomly) when an Agent is trying to transfer a call or is receiving a call from a SIP channel.
It happens mainly when the Agent is trying to transfer the call to an extension (9990) wish is a survey system (AGI written in PHP)to qualify the Agent. It also happens when a SIP extensin tries to call an Agent.
Its happens 2 to 5 times a day (today already happend twice).
Comments:By: Rodrigo P. Telles (telles) 2013-05-20 07:47:16.633-0500

Follows the backtrace.

By: Richard Mudgett (rmudgett) 2013-05-20 12:05:25.084-0500

The backtrace attached to the issue is showing a crash as the result of the AMI Redirect action.

This appears to be a duplicate of: ASTERISK-21356

By: Rodrigo P. Telles (telles) 2013-05-20 13:00:28.936-0500

Looks like the patch solved the problem on 21356 and I see it was developed for v11.5.0.
Does that fits on 1.8 LTS? Anything I can do to fix that on or

By: Matt Jordan (mjordan) 2013-05-20 13:57:38.890-0500

That patch was applied to the 1.8 branch as well, and is in

By: Rusty Newton (rnewton) 2013-05-21 18:06:31.595-0500

Please test with and report back. Hit "Send Back" to alert us of your reply.

By: Rodrigo P. Telles (telles) 2013-05-22 06:41:08.878-0500

Hi, I am running since yesterday and the problem happend 6 times till now, so the patch did not solve the problem. Follows the backtrace of the last core dump.

By: Richard Mudgett (rmudgett) 2013-05-22 11:41:33.204-0500

[^jira_asterisk_21793_v1.8.patch] - Checks bridged pointer for NULL to avoid a crash.

This patch will just prevent the crash.

It looks like chan_agent is returning a NULL pointer when it probably should be returning a pointer to the channel the Agent channel is pretending to be.

Please test and report back.

By: Rodrigo P. Telles (telles) 2013-05-22 12:47:20.307-0500

I will apply the patch and see if it solves the problem.
Tks Richard!

By: Rodrigo P. Telles (telles) 2013-05-29 06:37:58.822-0500

Hello Richard!
Your patch solved the problem :-)
Asterisk does not died since than!
I really appreciate your help.